Table of Contents

LamaPLC: GY-9250 MPU-9250/6500 9-axis Attitude Sensor Board

MPU-9250 The MPU-9250 is among the most sophisticated compact sensors, combining an accelerometer, gyroscope, and compass. It replaces the MPU-9150, offering reduced power consumption, better gyro noise performance, and an expanded full-scale range for the compass.

This sensor features advanced capabilities like low-pass filtering, motion detection, and a programmable specialized processor. Inside, it incorporates the MPU-6500, which houses a 3-axis gyroscope and 3-axis accelerometer, and the AK8963, a high-performance 3-axis digital compass. The MPU-9250 employs 16-bit ADCs to digitize data from all nine axes.

Features

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 22:38

Specification

MPU9250 Module Pinout

Pin NumberPin NameDescription
1VCCPower Supply
2GNDGround Reference
3SCLI²C Serial Clock
4SDAI²C Serial Data
5EDAAuxiliary Serial Data
6ECLAuxiliary Serial Clock
7AD0I²C/SPI Address Select
8INTInterrupt
9NCSSPI Chip Select
10FSYNCFrame Synchronization

The MPU-9250 I2C address is typically 0x68 (when the AD0 pin is grounded) or 0x69 (when AD0 is pulled high), with 0x68 being the default. The internal magnetometer (AK8963) has a fixed I²C address of 0x0C

Internal Circuit Diagram for MPU9250 Module

The circuit includes a low-dropout (LDO) linear regulator that reduces the 5V supply to the 3.3V required by the MPU9250. Because of their small size and limited power dissipation, the board's LDOs cannot manage high voltages, so powering them from 5V is optimal. The module also features the necessary decoupling capacitors for the LDO.

The MPU9250 includes the required pull-up and pull-down resistors for the I²C/SPI lines, the address select, and the frame synchronization pin. Because the I²C pull-up values are high, additional external pull-ups of a lower value can be added to enhance speed. Adequate decoupling is also provided for the chip's various power pins.

Arduino & MPU9250

To use the MPU9250 module with an Arduino via the I²C interface, you can use a library like the MPU9250_WE library by Wolfgang Ewald.

Arduino Wiring (I²C Mode)

Basic Example Code

Install the MPU9250_WE library from the Arduino Library Manager (Sketch > Include Library > Manage Libraries) and use the following code to read acceleration, gyroscope, and magnetometer data.

#include <MPU9250_WE.h>
#include <Wire.h>
 
#define MPU9250_ADDR 0x68 // I2C address is 0x68 when AD0 pin is grounded
 
MPU9250_WE myMPU9250 = MPU9250_WE(MPU9250_ADDR);
 
void setup() {
  Serial.begin(115200);
  Wire.begin(); // Initialize I2C communication
 
  if (!myMPU9250.init()) { // Initialize the MPU9250 sensor
    Serial.println("MPU9250 does not respond");
    while (1); // Stop program
  } else {
    Serial.println("MPU9250 is connected");
  }
 
  // Set sensor ranges (optional, defaults are 2G, 250 DPS)
  myMPU9250.setAccelRange(MPU9250_ACCEL_RANGE_2G); 
  myMPU9250.setGyroRange(MPU9250_GYRO_RANGE_250DPS);
  // Magnetometer range is fixed
}
 
void loop() {
  // Read the sensor data
  xyzFloat accel = myMPU9250.getAccelRawValues();
  xyzFloat gyro = myMPU9250.getGyroRawValues();
  xyzFloat mag = myMPU9250.getMagRawValues();
  float temp = myMPU9250.getTemperature();
 
  // Print the data to the Serial Monitor
  Serial.print("AccelX: "); Serial.print(accel.x); Serial.print("\t");
  Serial.print("AccelY: "); Serial.print(accel.y); Serial.print("\t");
  Serial.print("AccelZ: "); Serial.println(accel.z);
 
  Serial.print("GyroX: "); Serial.print(gyro.x); Serial.print("\t");
  Serial.print("GyroY: "); Serial.print(gyro.y); Serial.print("\t");
  Serial.print("GyroZ: "); Serial.println(gyro.z);
 
  Serial.print("MagX: "); Serial.print(mag.x); Serial.print("\t");
  Serial.print("MagY: "); Serial.print(mag.y); Serial.print("\t");
  Serial.print("MagZ: "); Serial.println(mag.z);
 
  Serial.print("Temperature: "); Serial.print(temp); Serial.println(" C");
 
  Serial.println();
  delay(200);
}

I²C topics on lamaPLC

PageDateTags
2025/05/31 21:56, , , , , , ,
2025/09/23 19:25, , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/03/28 22:07, , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2025/11/21 23:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:45, , , , , , , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/28 18:02, , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 17:27, , , , , , , , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 22:52, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2026/02/14 22:53, , , , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/14 22:47, , , ,
2026/02/14 22:51, , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:27, , , , , , ,

This page has been accessed for: Today: 1, Until now: 37