The Grove IMU 9DOF is a high-performance Inertial Measurement Unit (IMU) that integrates a 9-axis sensor system. It combines the LCM20600, a 6-axis motion sensor (3-axis gyroscope and 3-axis accelerometer), with the AK09918, a 3-axis magnetometer. This combination enables precise motion tracking and orientation detection, making it ideal for applications such as robotics, drones, wearable devices, and gaming controllers.
Parameter | Value |
---|---|
Gyroscope Range | ±250, ±500, ±1000, ±2000 dps |
Accelerometer Range | ±2g, ±4g, ±8g, ±16g |
Magnetometer Range | ±1200 µT |
Communication Interface | I2C |
Operating Voltage | 3.3V / 5V |
Operating Temperature | -40°C to +85°C |
Dimensions | 20mm x 40mm |
The Grove IMU 9DOF uses a standard Grove I2C interface. Below is the pin configuration:
Pin Name | Description |
---|---|
VCC | Power supply (3.3V or 5V) |
GND | Ground |
SDA | I2C data line |
SCL | I2C clock line |
Connect the IMU to a Microcontroller:
Install Required Libraries:
Adafruit_Sensor
library and the Seeed_9DOF_IMU
library from the Arduino Library Manager.Write and Upload Code:
#include <Wire.h>
#include "Seeed_9DOF_IMU.h" // Include the library for the Grove IMU 9DOF
// Create an instance of the IMU class
Seeed_9DOF_IMU imu;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Wire.begin(); // Initialize I2C communication
// Initialize the IMU
if (!imu.begin()) {
Serial.println("Failed to initialize IMU!");
while (1); // Halt the program if initialization fails
}
Serial.println("IMU initialized successfully!");
}
void loop() {
// Variables to store sensor data
float ax, ay, az; // Accelerometer data
float gx, gy, gz; // Gyroscope data
float mx, my, mz; // Magnetometer data
// Read accelerometer data
imu.getAccel(&ax, &ay, &az);
Serial.print("Accel: ");
Serial.print(ax); Serial.print(", ");
Serial.print(ay); Serial.print(", ");
Serial.println(az);
// Read gyroscope data
imu.getGyro(&gx, &gy, &gz);
Serial.print("Gyro: ");
Serial.print(gx); Serial.print(", ");
Serial.print(gy); Serial.print(", ");
Serial.println(gz);
// Read magnetometer data
imu.getMag(&mx, &my, &mz);
Serial.print("Mag: ");
Serial.print(mx); Serial.print(", ");
Serial.print(my); Serial.print(", ");
Serial.println(mz);
delay(500); // Wait for 500ms before the next reading
}
0x68
for the LCM20600 and 0x0C
for the AK09918. Ensure no address conflicts with other devices on the I2C bus.IMU Not Detected:
Inaccurate Sensor Readings:
No Data Output:
Q: Can the IMU 9DOF be used with a Raspberry Pi?
A: Yes, the IMU 9DOF can be used with a Raspberry Pi via the I2C interface. Use Python libraries such as smbus
to communicate with the IMU.
Q: How do I calibrate the magnetometer?
A: Rotate the IMU in all directions to collect data for calibration. Use software tools or algorithms to compute the calibration offsets.
Q: What is the maximum sampling rate of the IMU?
A: The LCM20600 supports a maximum sampling rate of 1 kHz for the gyroscope and accelerometer. The AK09918 supports a maximum sampling rate of 100 Hz for the magnetometer.
By following this documentation, you can effectively integrate and utilize the Grove IMU 9DOF in your projects.