Hello,
In this article, we are going to learn more about the real-time motion sensor MPU-9050. 

MPU-9250 sensor module

  • MPU9250 is a multi-purpose sensor that is based on the Micro Electro Mechanical Systems architecture (MEMS). The MPU9250 is a 9 DOF real-time motion tracking device. It contains a 3D Gyroscope, 3D magnetometer, and 3D accelerometer. It has a very small high-performance IC that has a 16-bit analog-to-digital converter. This module also has an in-built temperature sensor. This module uses an I2C communication protocol for interfacing with the microcontrollers.

  • The MPU9250 9-DOF sensor Module can provide acceleration, angle change, and magnetic field on 3 axes x, y, and z with high speed and accuracy. This module also features an in-built temperature sensor that can measure the temperature range between -40 to +85 degrees Celsius. 

  • The above figure shows the default orientations. The orientations for the accelerometer and the gyroscope are the same.
  • But the axes of orientation for the compass (magnetometer) are very much different. 

Specifications of the MPU9250 Sensor

Features and Peripherals Availability
Structure MEMS
SPI Data Rate 1 Mhz
SPI Fast Data Reading Rate 20 Mhz
I2C Data Rate 400 kHz
Shock tolerance 10,000g
FIFO buffer 512 Bytes
Auxiliary I2C interface 1
SPI 1
I2C 1
Operating Voltage 2.4-3.6 Volts
Operating Current 3.5mA
VIDEO Yes
Digital Output Temperature Sensor Yes
Cross-Sensitivity Minimum
User-Programmable Digital Filters Yes
Package Type QFN
Dimensions 3x3x1mm

Construction of the Sensor

  • First comes the MPU9250 IC which contains a magnetometer, a gyroscope, and an accelerometer. The IC also does all the processing. 
  • The Input/output headers are used to supply power to the board and to transfer data to and from the microcontrollers. 
  • The LDO is used as a voltage regulator. It is used to reduce the voltage to 3.3V to increase the efficiency of the IC. 
  • The Decoupling capacitors will remove the unwanted noise from the signals. 

Pin Configuration for MPU9250

  • INT: Interrupt Pin.
  • nCS: Chip selection.
  • FSYNC: Frame synchronization input pin.
  • AD0: I2C Address.
  • ECL: I2C Serial clock for external sensors.
  • EDA: I2C Serial data for external sensors.
  • SCL: I2C/SPI Serial clock.
  • SDA: I2C/SPI Serial data.
  • GND: Ground pin.
  • VCC: Power supply pin.

Interfacing with Arduino

Pins on MPU-9250

Pins on Arduino Uno

VCC

5V

GND

GND

SDA

A4

SCL

A5

Arduino Code

  • First, download the MPU-9250 library and then install it. You can download that library here
  • Install the library in Arduino IDE. Restart Arduino IDE.
  • Upload the code to the Arduino board. 
  • This example code will print 3 gyro values, 3 accelerometer values, and 3 magnetic field values to the serial monitor.

 

 

 

I hope you learned something about the MPU9250 sensor today and I hope you liked it. Thank you.