6 DOF Sensor - MPU6050


At the beginning,the inertial measurement unit is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers, gyroscopes, and magnetometers. Now IMUs are commonly used in the Human-computer interaction (HCI), navigational purposes and balancing technology used in the Segway Personal Transporter as we all known.

The MPU-6000/MPU-6050 family of parts are the world’s first and only 6-axis MotionTracking devices designed for the low power, low cost, and high performance requirements of smartphones, tablets and wearable sensors.

The MPU-6000/6050 devices combine a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die together with an onboard Digital Motion Processor (DMP) capable of processing complex 9-axis MotionFusion algorithms. The parts’ integrated 9-axis MotionFusion algorithms access external magnetometers or other sensors through an auxiliary master I2C bus, allowing the devices to gather a full set of sensor data without intervention from the system processor.

The 6 Dof sensor breakout integrate with the MPU6050 sensor and the low noise 3.3v regulator and pull-up resistors for the I2C bus. So it's available to directly hook up the sensor with the Arduino processors for your robotics,HCI and wearable projects. With the Arduino library from i2cdevlib it's easy for you to drive this sensor and get the pitch, roll, yaw, quaternion, euler data.


Connection Diagram

6 dof mpu6050

Sample Code

Please download the [libraries](http://www.dfrobot.com/image/data/SEN0142/6 Dof - MPU6050 library.zip) for the all the IMU sensors first!

 # Product: 6 DOF Sensor-MPU6050
 # SKU    : SEN0142
 # Description:
 # To read  accel/gyro data from 6 DOF Sensor

#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050.h"
MPU6050 accelgyro;
int16_t ax, ay, az;  // define accel as ax,ay,az
int16_t gx, gy, gz;  // define gyro as gx,gy,gz

#define LED_PIN 13
bool blinkState = false;

void setup() {
  Wire.begin();      // join I2C bus
  Serial.begin(38400);    //  initialize serial communication
  Serial.println("Initializing I2C devices...");

  // verify connection
  Serial.println("Testing device connections...");
  Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed");

  pinMode(LED_PIN, OUTPUT);  // configure LED pin

void loop() {
  accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);  // read measurements from device

  // display tab-separated accel/gyro x/y/z values

  // blink LED to indicate activity
  blinkState = !blinkState;
  digitalWrite(LED_PIN, blinkState);

More Documents

DFshopping_car1.png Get 6 DOF Sensor-MPU6050 from DFRobot Store or DFRobot Distributor.

Category: DFRobot > Sensors & Modules > Sensors > IMU Sensors

category: Product Manual category: SEN Series category: Sensor

category: Diagram category: DFRobot

Turn to the Top