Skip to content
sensors / mpu6050.md

MPU6050

Combined 3-axis accelerometer + 3-axis gyroscope on a single I²C die, with an on-chip Digital Motion Processor (DMP) for sensor fusion.

In stock InvenSense 2 files · 335 KB

Specs

Spec Value
Accel range ±2 / ±4 / ±8 / ±16 g
Gyro range ±250 / ±500 / ±1000 / ±2000 °/s
Resolution 16-bit
Bus I²C (up to 400 kHz)
I²C address 0x68 (or 0x69 if AD0 = HIGH)
Voltage 3.3 V (most modules have 5 V regulator + LS)
FIFO 1024 B for DMP

Wiring (Arduino Uno)

Module Arduino
VCC 5 V (module has regulator)
GND GND
SCL A5
SDA A4
INT optional, e.g. D2

Code

#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>

Adafruit_MPU6050 mpu;
void setup() {
  Serial.begin(115200);
  if (!mpu.begin()) { Serial.println("MPU6050 not found"); while (1); }
  mpu.setAccelerometerRange(MPU6050_RANGE_4_G);
  mpu.setGyroRange(MPU6050_RANGE_500_DEG);
}
void loop() {
  sensors_event_t a, g, t;
  mpu.getEvent(&a, &g, &t);
  Serial.printf("a: %.2f %.2f %.2f  g: %.2f %.2f %.2f\n",
    a.acceleration.x, a.acceleration.y, a.acceleration.z,
    g.gyro.x, g.gyro.y, g.gyro.z);
  delay(100);
}

Schematic

The MPU6050 die-level reference circuit is on page 26 of the datasheet PDF. GY-521 module schematic: chip + 3.3 V LDO + I²C pull-ups + cap.

Last updated: 2026-05-13 · Source on GitHub