GY-MPU9250 9DOF nine-axis/9-axis attitude acceleration compass gyroscope magnetic field sensor

Introduction

MPU9250 is a QFN packaged composite chip, composed of 2 parts. 3-axis gyroscope, accelerometer and magnetometer, chip built-in 16bit AD converter, 16-bit data output; support I2C and SPI protocol. Gyroscope range: ±250 500 1000 2000°/s; acceleration range: ±2 ±4 ±8 ±16g; magnetic field range: ±4800uT; I2C communication speed is 400Khz, and SPI communication speed is up to 1Mhz. It can be widely used in drones, robots, VR and other fields.

Module pin description

Schematic diagram
Insert picture description here
Pin description
VCC: 3-5V
GND: ground
SCL: I2C serial clock line/SPI serial clock port
SDA: I2C serial data line/SPI serial data input
EDA: connect other I2C device host data port
ECL: for I2C The device provides clock
AD0/SO0: I2C device address selection bit/SPI serial data output
INT: Interrupt pin
NCS: Chip selection
FSYNC: Digital synchronization access frame, ground when not in use

GY-MPU9250 and Arduino UNO wiring

Insert picture description here
VCC——5V
GND——GND
SDA——A4
SCL——A5

Arduino example code

Find a MPU9520 example in the library manager. Insert picture description here
After downloading and installing it, upload it, Insert picture description here
open the serial port detector, set the baud rate to 115200, Insert picture description here
move the module, and you can see the corresponding changes of X, Y, and Z each time.Insert picture description here
Insert picture description here

to sum up

Many modules can find the corresponding routines in the Arduino library manager, which is especially suitable for the novice community; if you publish similar articles for a long time, you are welcome to pay attention, and you are welcome to leave a message at any time. You can also leave a message below if you need a program or software!

Guess you like

Origin blog.csdn.net/qq_42250136/article/details/109496259