MPU9250 9-Axis IMU
6-DOF IMU plus magnetometer for full orientation sensing.
The MPU9250 combines a 3-axis gyroscope, 3-axis accelerometer, and a 3-axis AK8963 magnetometer into one package, giving full 9-degrees-of-freedom orientation sensing in a single I2C or SPI device. The gyro and accelerometer are read directly from the main MPU9250 registers, while the magnetometer is technically a separate chip wired internally as an auxiliary I2C slave — most libraries handle this transparently, but it's worth knowing if you ever need to talk to the magnetometer at its own address (0x0C) directly.
It's the standard choice for drones, robotics balancing, and any project needing full orientation (not just tilt) via sensor-fusion algorithms like a Madgwick or Mahony filter. The catch that trips people up is calibration: the accelerometer and especially the magnetometer carry real per-unit offset and scale errors out of the box, and skipping a calibration routine (recording min/max readings while rotating the sensor through all axes) will make yaw heading drift or read wildly wrong.
Specifications
| Interface | I2C (400kHz) or SPI (1MHz register config, 20MHz data reads) |
| I2C address | 0x68 (AD0 to GND) or 0x69 (AD0 to VCC) |
| Operating voltage | 2.4–3.6V (breakout boards commonly add a 5V-tolerant regulator) |
| Gyroscope range | ±250/500/1000/2000 °/s, selectable |
| Accelerometer range | ±2/4/8/16 g, selectable |
| Magnetometer (AK8963) | ±4800 µT, 14 or 16-bit resolution |
| Auxiliary I2C address | Magnetometer accessible directly at 0x0C when bypass mode is enabled |
| Output data rate | Up to 1kHz for gyro/accel via internal digital low-pass filter |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 2.4–3.6V (check breakout for 5V tolerance) |
| 2 | GND | Ground |
| 3 | SCL | I2C clock (or SPI SCK) |
| 4 | SDA | I2C data (or SPI SDI/MOSI) |
| 5 | AD0 | I2C address select (GND = 0x68, VCC = 0x69) — also SPI SDO/MISO |
| 6 | NCS | SPI chip select — tie HIGH to force I2C mode |
| 7 | INT | Interrupt output — configurable for data-ready or motion events |
For I2C mode (the common case), tie NCS to VCC. AD0 sets the I2C address. INT is optional and only needed if you want interrupt-driven reads instead of polling.
Variants
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| MPU6050 | ~$1–2 | ||||
| MPU9250 | ~$3–6 | ||||
| ICM-20948 | ~$5–8 |