PinLab › Components › MPU-6050
MPU-6050 VCC GND SCL SDA XDA XCL AD0 INT ZX

MPU-6050

accelerometer + gyroscope (6 axes), I2C

Measures acceleration and rotation on 3 axes. From that you know whether the board is tilted, shaking or falling. Used in drones, self-balancing robots and motion controllers.

Open the course →

How it works

Inside there are tiny mechanical structures (MEMS) that move under acceleration. The accelerometer measures gravity, so you can calculate the tilt from it. The gyroscope measures the speed of rotation (°/s). Data is read over I2C (address 0x68). The accelerometer is accurate in the long run, the gyroscope in the short run, so it is best to combine them (complementary filter).

Pins and wiring

PinWhat it isWhere it connects / why
VCCSupply→ 3V3 (the module has a regulator).
GNDGround→ GND.
SCLI2C clock→ GPIO 22.
SDAI2C data→ GPIO 21.
XDA / XCLAuxiliary I2C busNot connected.
AD0Address selectGND/open = 0x68, 3V3 = 0x69.
INTInterrupt (new data)Optional → GPIO.

Specifications

Axes3 accelerometer + 3 gyroscope
Accel range±2 / 4 / 8 / 16 g
Gyro range±250 – 2000 °/s
I2C address0x68 / 0x69
Supply3.3 – 5 V (module)

Tips and typical mistakes