MPU-6050 6-Axis Accelerometer & Gyroscope
The standard 6-axis IMU for balancing robots, drones, and orientation tracking — cheap and well-supported.
The MPU-6050 packs a 3-axis MEMS accelerometer and a 3-axis MEMS gyroscope into a single chip, plus an onboard temperature sensor, and exposes all of it over I2C. It's the standard first IMU for balancing robots, drones, motion-gesture input, orientation tracking, and step counting — cheap, well documented, and supported by a mature Adafruit library that also handles unit conversion for you.
Under the hood the chip also has a Digital Motion Processor (DMP) capable of onboard sensor fusion, but most projects never touch it — reading raw accelerometer and gyroscope values and combining them in software (or with a library like a Madgwick/Kalman filter) is more than enough for the majority of use cases and far easier to get running. If a project needs heading/compass data too, look at the pin-compatible MPU-9250 instead — see the variants table below.
Specifications
| Operating voltage | 3V – 5V (most breakout modules have an onboard regulator; the bare IC needs 2.375V–3.46V) |
| Interface | I2C, up to 400 kHz (Fast Mode) |
| I2C address | 0x68 default, 0x69 if AD0 is pulled HIGH |
| Accelerometer range | Selectable ±2g / ±4g / ±8g / ±16g |
| Gyroscope range | Selectable ±250 / ±500 / ±1000 / ±2000 °/s |
| Resolution | 16-bit ADC per axis (accel and gyro) |
| Extras | Built-in temperature sensor, 1024-byte FIFO buffer, onboard Digital Motion Processor (DMP) for sensor fusion |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power — 3V to 5V on most breakout boards (onboard regulator steps down to the chip's 3.3V logic) |
| 2 | GND | Ground |
| 3 | SCL | I2C clock line |
| 4 | SDA | I2C data line |
| 5 | XDA | Auxiliary I2C data line — used to chain an external magnetometer/compass through the MPU-6050's I2C master. Leave unconnected for standard projects. |
| 6 | XCL | Auxiliary I2C clock line — pairs with XDA. Leave unconnected for standard projects. |
| 7 | AD0 | I2C address select — leave LOW/unconnected for address 0x68, pull HIGH for 0x69 (needed when running two MPU-6050s on the same bus) |
| 8 | INT | Interrupt output — signals data-ready or motion events. Optional; not needed for simple polling code. |
Common GY-521 breakout boards already include the pull-up resistors SDA/SCL need for I2C, and those pull-ups are tied to VCC. That means the voltage you feed VCC sets your I2C logic level — power the module from 3.3V on 3.3V-only boards (ESP32, Raspberry Pi, STM32) so the bus never rises above what those GPIOs can tolerate, even though the module itself will happily accept 5V. XDA/XCL and INT can be left disconnected entirely unless you're chaining an external compass or using interrupt-driven reads.
Variants
The plain MPU-6050 covers the large majority of motion-sensing projects — tilt, motion detection, basic orientation, step/impact detection. If a project needs true compass heading (not just relative rotation from the gyro, which drifts over time), move up to the pin-compatible MPU-9250 or the newer ICM-20948, both of which add a magnetometer on the same I2C bus.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| MPU-6050 | ~$2–4 | ||||
| MPU-6500 | ~$3–5 | ||||
| MPU-9250 | ~$4–7 | ||||
| ICM-20948 | ~$5–9 |