Skip to content
IMU / Accelerometer

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

InterfaceI2C (400kHz) or SPI (1MHz register config, 20MHz data reads)
I2C address0x68 (AD0 to GND) or 0x69 (AD0 to VCC)
Operating voltage2.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 addressMagnetometer accessible directly at 0x0C when bypass mode is enabled
Output data rateUp to 1kHz for gyro/accel via internal digital low-pass filter

Pinout

PinNameDescription
1VCCPower, 2.4–3.6V (check breakout for 5V tolerance)
2GNDGround
3SCLI2C clock (or SPI SCK)
4SDAI2C data (or SPI SDI/MOSI)
5AD0I2C address select (GND = 0x68, VCC = 0x69) — also SPI SDO/MISO
6NCSSPI chip select — tie HIGH to force I2C mode
7INTInterrupt 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

VariantTemp rangeHum rangeAccuracyProtocolPrice
MPU6050~$1–2
MPU9250~$3–6
ICM-20948~$5–8

Board Integration

Library

MPU9250_WEby Wolfgang Ewald

Arduino IDE → Library Manager → search "MPU9250_WE"

Wiring

Component pinBoard pinNote
VCC5V (if module has onboard regulator) or 3.3V
GNDGND
SCLA5
SDAA4
AD0GND (sets address to 0x68)
NCSVCC (forces I2C mode)

Code

C++

Notes

Keep the board perfectly still during autoOffsets() at startup — it calibrates gyro/accel zero-offsets from that initial reading.