The MPU925 is a motion tracking device or MEMS (Micro Electro Mechanical System). A SIP (System in a Package) combining two components the MPU6500 & AK8963.

The MPU6500 which is contains 3 axis gyroscope, 3 axis accelerometer, and onboard digital motion processor (DMP) capable of processing complex sensor fusion algorithm from InvenSense. Please refer to the datasheet below for more information.

AK8963 is 3-AXIS electronic compass integrated circuit (IC) with high sensitive hall sensor technology on a small package. The AK8963 integrates magnetic sensor for detecting terrestrial magnetism in the X-AXIS, Y-AXIS, and Z-AXIS, a sensor driving circuit, signal amplifier chain, and arithmetic circuit for processing the signal from each sensor, it has self-test function integrated. This devise suitable for map heading in GPS equipment cellphone to realize pedestrian navigation function.



The MPU9250 sensor has an on-chip 1024 byte FIFO buffer and values are programmed to be placed in the FIFO buffer. Buffer will be read using Microcontroller or Arduino. The FIFO buffer will be used together with the interrupt signal, if the MPU9250 take place data into the FIFO buffer, it signals the MCU with the interrupt then the Arduino Knows that there is data into the FIFO buffer waiting to be read.

Sensor Fusion is a process which data from the several different sensor are FUSED to calculate something more than could be determined by any sensor alone or improve accuracy and reliability. On other words, it requires an estimation position and orientation on a dimensional space. A prerequisite for sensor fusion into calibration. The MPU itself it has to be calibrated and provide measurement in units. When using multiple sensor you need to calibrate in order to work well.


In this illustration we will going to wire the 3 type of sensors and each sensor has its own functionality and limitations.

  • ACCELEROMTER > X, Y, & Z linear axis motion sensing ( sensitive to vibration )
  • GYROSCOPE > Pitch, Roll Yaw Rotational Sensing (Gyroscope Drift)
  • MAGNETOMETER > X, Y, & Z axis magnetic field sensing (Sensitive to magnetic interface)

The gyroscope sense the orientation through angular velocity changes and therefore need to find the orientation, there is a tendency to drift over time because it only sense the changes and there is no fixed frame of reference.


Gyroscopic Drift or Null Drift Bias is an (Angular Velocity that represent as K * Vout) ω ≠ 0. This drift function changes with temperature and shows hysteresis.



Gyroscope is sensitive to gravity and vibration.

Accelerometer sense the changes in a direction with gravity which can orient a gyroscope to have more exact angular displacement. However, Accelerometers are more accurate in a static calculations when the system is reach to its fixed reference point of motion whereas the Gyroscope are good at detecting orientation when the system is in motion. Accelerometers tend to distort the acceleration due to external force as gravitational forces in motion which accumulates as noise at the system and error spikes on the output. With the addition of the accuracy of the Gyroscope merge with the accuracy of the accelerometer these sensor can be combined to avail more accurate orientation by utilizing the output of each sensor.

This device can be improved using special algorithms and filtering techniques, familiarizing more types of sensors and using them into correct error from one input to another to reduce the propagation error.

Required Components

  • Arduino UNO,NANO,PRO,DUE,LEO, ESP8266, AVR
  • MPU 9250 Breakout Board
  • Jumper wires / DuPont Wires
  • Solder less Breadboard

Wiring Diagram


Source Code / Sketch Code

Download Datasheet & Code Libraries

  • Download MPU9250 Registers | PDF
  • Download MPU9250 Datasheet & Manual | PDF
  • Download MPU9250 Libraries | Zip
Wiring the MPU9250 9 AXIS Motion Tracking Micro Electro Mechanical System
Tagged on:             

3 thoughts on “Wiring the MPU9250 9 AXIS Motion Tracking Micro Electro Mechanical System

  • at

    This wiring diagram is WRONG! The 9250 is a 3.3V device, NOT 5V. Do NOT connect Vcc to 5V… it could destroy the device.

    • at

      Some MPU 9250 immune to 5v. make it sure your board has LD1117, AMS1117, MCP1700 regulator. for safe usage use 3.3v.

  • at

    tengo este error, use la ibreria q arriba aparece el link
    ‘class MPU9250’ has no member named ‘initialize’

    Serial.println(“Initializing I2C devices, please wait…”);
    accelgyro.initialize(); // in this part signal the error


Leave a Reply

Your email address will not be published. Required fields are marked *