Overview

The MPU-6050 is a 6-axis MotionTracking sensor manufactured by InvenSense (now TDK). It combines a 3-axis MEMS gyroscope, a 3-axis MEMS accelerometer, an internal temperature sensor, and an onboard hardware Digital Motion Processor (DMP) on a single silicon die.

Breakout boards (such as the GY-521) include an onboard 3.3 V low-dropout (LDO) regulator, enabling safe operation with 5 V or 3.3 V microcontrollers, along with I2C pull-up resistors and decoupling capacitors.

Quick reference

Module VCC3.3 V to 5.0 V DC (onboard LDO)
Sensor VDD (chip)2.375 V to 3.46 V DC
Communication interfaceI2C (up to 400 kHz Fast Mode)
I2C address0x68 (AD0 = LOW) / 0x69 (AD0 = HIGH)
Gyroscope range±250,±500,±1000,±2000 /s\pm 250, \pm 500, \pm 1000, \pm 2000\text{ }^\circ/\text{s}
Accelerometer range±2 g,±4 g,±8 g,±16 g\pm 2\text{ g}, \pm 4\text{ g}, \pm 8\text{ g}, \pm 16\text{ g}
ADC resolution16-bit (per axis for gyro & accel)

Pinout

Standard GY-521 Breakout Header

PinNameTypeDescription
1VCCPowerSupply voltage input (+3.3 V to +5.0 V)
2GNDPowerGround (0 V)
3SCLDigital InputI2C Clock line
4SDADigital I/OI2C Data line
5XDADigital I/OAuxiliary I2C Data line (master for external magnetometer)
6XCLDigital OutputAuxiliary I2C Clock line
7AD0Digital InputI2C Address select (LOW = 0x68, HIGH = 0x69)
8INTDigital OutputInterrupt output pin (Active-HIGH, programmable)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Chip Supply VoltageVDDV_{DD}2.3753.33.46V
Operating CurrentIDDI_{DD}3.84.2mAGyro + Accel active
Sleep CurrentIsleepI_{sleep}510µASleep mode enabled
Gyro Full Scale RangeFSGYROFS_{GYRO}±250\pm 250±2000\pm 2000°/sUser selectable
Gyro SensitivitySGYROS_{GYRO}16.4131LSB/(°/s)131 at ±250/s131 \text{ at } \pm 250^\circ/\text{s}, 16.4 at ±2000/s16.4 \text{ at } \pm 2000^\circ/\text{s}
Accel Full Scale RangeFSACCELFS_{ACCEL}±2\pm 2±16\pm 16gUser selectable
Accel SensitivitySACCELS_{ACCEL}204816384LSB/g16384 at ±2g16384 \text{ at } \pm 2\text{g}, 2048 at ±16g2048 \text{ at } \pm 16\text{g}
Temperature RangeTOPT_{OP}-4085°C

Register map

AddressRegisterAccessResetDescription
0x1BGYRO_CONFIGR/W0x00Gyroscope full scale select (FS_SEL bits [4:3])
0x1CACCEL_CONFIGR/W0x00Accelerometer full scale select (AFS_SEL bits [4:3])
0x3BACCEL_XOUT_HR0x00Accelerometer X-axis High byte (Read 6 bytes for X,Y,Z)
0x41TEMP_OUT_HR0x00Temperature High byte (Read 2 bytes)
0x43GYRO_XOUT_HR0x00Gyroscope X-axis High byte (Read 6 bytes for X,Y,Z)
0x6BPWR_MGMT_1R/W0x40Power management 1 (Bit 6 SLEEP = 1 on reset)
0x75WHO_AM_IR0x68I2C Device ID register (returns 0x68)

Wiring

GY-521 (MPU-6050)Microcontroller (Arduino Uno / ESP32)Notes
VCC5V (or 3.3V)Power input to onboard 3.3V regulator
GNDGNDGround
SCLSCL (A5 on Uno, GPIO22 on ESP32)I2C Clock
SDASDA (A4 on Uno, GPIO21 on ESP32)I2C Data
AD0GNDPull LOW for address 0x68, HIGH for 0x69
Warning

The MPU-6050 powers up in SLEEP mode (PWR_MGMT_1 = 0x40). Software MUST clear the sleep bit by writing 0x00 to register 0x6B before sensor readings will update.

Common mistakes

  • Forgetting to wake the chip: Sensor outputs will remain static zero or frozen values if PWR_MGMT_1 register (0x6B) is not written with 0x00 upon initialization.
  • Incorrect 16-bit signed integer conversion: Accelerometer and gyroscope data registers are 16-bit two's complement numbers stored in Big-Endian format (HIGH byte first). Re-assemble bytes using (int16_t)((high << 8) | low).
  • Gyroscope drift: Raw gyroscope values accumulate integration drift over time. Combine accelerometer and gyroscope readings using a Complementary Filter or Kalman Filter, or use the DMP.

Notes

  • Temperature calculation formula: Temperature in C=TEMP_OUT340+36.53\text{Temperature in } ^\circ\text{C} = \frac{\text{TEMP\_OUT}}{340} + 36.53.

Assets & downloads