The MPU6050 sensor module is a complete 6-axis motion tracking device. It combines a 3-axis gyroscope, 3-axis accelerometer, and digital motion processor in one small package. It also has an additional sensor function. The chip has an I2C bus interface for communication with microcontrollers—Auxiliary I2C bus to communicate with other sensor devices such as 3-axis magnetometer, pressure sensor, etc. When the 3-axis magnetometer is connected to the auxiliary I2C bus, the MPU6050 can provide a full 9-axis motion fusion output. Let’s look at the internal sensors of the MPU6050.

The MPU6050 devices combine a 3-axis gyroscope and a 3-axis accelerometer on the same silicon together with an onboard Digital Motion Processor (DMP) capable of processing complex 9-axis MotionFusion algorithms. To get more insights about specifications, visit the MPU6050 datasheet.

Specification of MPU6050

  1. Chip built-in 16bit AD converter, 16-bit data output
  2. Driver Chip: MPU6050
  3. Operating Voltage: 3-5V DC
  4. Communication: I2C/IIC Protocol
  5. Gyro Range: ± 250, 500, 1000, 2000 °/s
  6. Accelerometer Range: ± 2 ± 4 ± 8 ± 16 g

3-axis gyroscope

The MPU6050 consists of a 3-axis gyroscope with a microelectromechanical system and # 40; MEMS & # 41; It is used to sense the speed of rotation along the X, Y, and Z axes as shown in the following figure.

3-axis gyroscope
3-axis gyroscope

When the gyroscopes rotate around one of the detection axes, the Coriolis effect causes a vibration, which is detected by a MEM inside the MPU6050. 

The resulting signal is amplified, demodulated and filtered to produce a voltage proportional to the angular velocity.

 This voltage is digitized with a 16-bit ADC to scan each axis.

 The full scale range is + / 250, + / 500, + / 1000, + / 2000. Measures the angular velocity along each axis in degrees per second.

3-Axis Accelerometer

The MPU6050 consists of a 3-axis accelerometer with microelectromechanical technology (MEM) that is used to sense the tilt angle or tilt along the X, Y and Z axes, as shown in the following figure.

3-Axis Accelerometer
3-Axis Accelerometer

Acceleration along the axes deflects the moving mass.

 This displacement of the moving plate (mass) unbalances the differential capacitor, resulting in sensor output.

 The output amplitude is proportional to the acceleration. 

The 16-bit ADC is used to get a digitized output. 

The full acceleration range is + / 2 g, + / 4 g, + / 8 g, + / 16 g. It is measured in g units (gravity). 

When the device is placed on a flat surface, it measures 0 g on the X and Y axes and + 1 g on the Z-axis.

PinOut of MPU6050 (Gyroscope + Accelerometer ) Sensor Module

 MPU6050 pinout
MPU6050 pinout

INT: Interrupt digital output pin.

AD0: I2C Slave Address LSB pin. This is the 0th bit in the 7-bit slave address of the device. If connected to VCC, then it is read as logic one, and slave address changes.

XCL: Auxiliary Serial Clock pin. This pin is used to connect other I2C interface enabled sensors SCL pin to MPU-6050.

XDA: Auxiliary Serial Data pin. This pin is used to connect other I2C interface enabled sensors SDA pin to MPU-6050.

SCL: Serial Clock pin. Connect this pin to the microcontrollers SCL pin.

SDA: Serial Data pin. Connect this pin to the microcontrollers SDA pin.

GND: Ground pin. Connect this pin to the ground connection.

VCC: Power supply pin. Connect this pin to +5V DC supply.

MPU-6050 module has Slave address (When AD0 = 0, i.e. it is not connected to Vcc) as,

Slave Write address(SLA+W): 0xD0

Slave Read address(SLA+R): 0xD1

Calculations

Note that gyroscope and accelerometer sensor data of MPU6050 module consists of 16-bit raw data in 2’s complement form.

Temperature sensor data of MPU6050 module consists of 16-bit data (not in 2’s complement form).

Now suppose we have selected,

–  Accelerometer full-scale range of +/- 2g with Sensitivity Scale Factor of 16,384 LSB(Count)/g.

–  Gyroscope full-scale range of +/- 250 °/s with Sensitivity Scale Factor of 131 LSB (Count)/°/s.

then,

To get sensor raw data, we need to first perform 2’s complement on sensor data of Accelerometer and gyroscope.

After getting sensor raw data, we can calculate acceleration and angular velocity by dividing sensor raw data with their sensitivity scale factor as follows,

Accelerometer values in g (g force)

Acceleration along the X-axis = (Accelerometer X-axis raw data/16384) g.

Acceleration along with the Y-axis = (Accelerometer Y-axis raw data/16384) g.

Acceleration along with the Z-axis = (Accelerometer Z-axis raw data/16384) g.

Gyroscope values in °/s (degree per second)

Angular velocity along the X-axis = (Gyroscope X-axis raw data/131) °/s.

Angular velocity along the Y-axis = (Gyroscope Y-axis raw data/131) °/s.

Angular velocity along the Z-axis = (Gyroscope Z-axis raw data/131) °/s.

Temperature value in °/c (degree per Celsius)

Temperature in degrees C = ((temperature sensor data)/340 + 36.53) °/c.

For example,

Suppose, after 2’ complement we get accelerometer X axes raw value = +15454

Then Ax = +15454/16384 = 0.94 g.

Author

Write A Comment