Cảm biến GY-9250 9DOF IMU MPU9250 có khả năng đo 9 thông số: 3 trục Góc quay (Gyro), 3 trục gia tốc hướng (Accelerometer) và 3 trục từ trường (Magnetometer) chỉ bằng một cảm biến duy nhất là MPU9250 (phiên bản upgrade của MPU6050) đang rất phổ biến hiện nay.
Cảm biến GY-9250 9DOF IMU MPU9250 có code mẫu đầy đủ và rất nhiều tài liệu từ cộng đồng, thích hợp cho các ứng dụng: con lắc động, xe tự cân bằng, máy bay,…
Thông số kỹ thuật:
- Điện áp sử dụng: 3~5VDC
- Điện áp giao tiếp: 3~5VDC
- Chuẩn giao tiếp: I2C / SPI
- Three 16-bit analog-to-digital converters (ADCs) for digitizing the gyroscope outputs
- Three 16-bit ADCs for digitizing the accelerometer outputs
- Three 16-bit ADCs for digitizing the magnetometer outputs
- Gyroscope full-scale range of ±250, ±500, ±1000, and ±2000°/sec (dps)
- Accelerometer full-scale range of ±2g, ±4g, ±8g, and ±16g
- Magnetometer full-scale range of ±4800μT
- Kích thước: 15 x 25mm, khoảng cách chân 2.54mm
Applications
- TouchAnywhere™ technology (for “no touch” UI Application Control/Navigation)
- MotionCommand™ technology (for Gesture Short-cuts)
- Motion-enabled game and application framework
- Location based services, points of interest, and dead reckoning
- Handset and portable gaming
- Motion-based game controllers
- 3D remote controls for Internet connected DTVs and set top boxes, 3D mice
- Wearable sensors for health, fitness and sports
Sơ đồ kết nối cảm biến GY-9250 9DOF IMU MPU9250

————————-CODE THAM KHẢO————————–
/***************************************************
Kết nối:
MPU9250 UNO R3 MEGA
VIN 5V 5V
GND GND GND
SCL A5 SCL
SDA A4 SDA
Nạp code mở Serial Monitor chọn No line ending, baud 9600.
****************************************************/
#include "MPU9250.h"
// an MPU9250 object with the MPU-9250 sensor on I2C bus 0 with address 0x68
MPU9250 IMU(Wire,0x68);
int status;
void setup() {
// serial to display data
Serial.begin(115200);
while(!Serial) {}
// start communication with IMU
status = IMU.begin();
if (status < 0) {
Serial.println("IMU initialization unsuccessful");
Serial.println("Check IMU wiring or try cycling power");
Serial.print("Status: ");
Serial.println(status);
while(1) {}
}
}
void loop() {
// read the sensor
IMU.readSensor();
// display the data
Serial.print(IMU.getAccelX_mss(),6);
Serial.print("t");
Serial.print(IMU.getAccelY_mss(),6);
Serial.print("t");
Serial.print(IMU.getAccelZ_mss(),6);
Serial.print("t");
Serial.print(IMU.getGyroX_rads(),6);
Serial.print("t");
Serial.print(IMU.getGyroY_rads(),6);
Serial.print("t");
Serial.print(IMU.getGyroZ_rads(),6);
Serial.print("t");
Serial.print(IMU.getMagX_uT(),6);
Serial.print("t");
Serial.print(IMU.getMagY_uT(),6);
Serial.print("t");
Serial.print(IMU.getMagZ_uT(),6);
Serial.print("t");
Serial.println(IMU.getTemperature_C(),6);
delay(100);
}









