This repository provides a Python-based driver for the MicroStrain 3DM-GX2 Inertial Measurement Unit (IMU), including both GUI and headless (terminal) modes for real-time data acquisition, visualization, and basic alerting logic.
- ๐ก Serial communication with the 3DM-GX2 via USB
- ๐๏ธ GUI interface for selecting and plotting different sensor modes
- ๐งฎ Headless version for embedded use (e.g., Raspberry Pi)
- ๐ Real-time plotting with low-pass filtering
- โ๏ธ Options for acceleration, gyroscope, magnetometer, temperature, orientation, and more
- ๐ Optional fall detection / door detection logic
- ๐ Data logging to local
.txt
files
Use the interface to start/stop data streaming, choose measurement mode, and visualize sensor data.
Measurement modes:
- Acceleration, Angular Rate & Magnetometer Vector
- Temperatures
- Raw Accelerometer and Angular Rate Sensor Outputs
- Gyro Stabilized Acceleration, Angular Rate & Magnetometer Vector
- DeltaAngle & DeltaVelocity & Magnetometer Vectors
- Euler Angles and Angular Rates
- Orientation Matrix
- Attitude Update Matrix
python imu_gui.py
Use the GUI to start/stop, select data mode, and plot data.
python imu_data.py
Modify the choice = "optX"
line in the script to set your desired mode.
- Fall Detection: Detect sudden changes in angular velocity (e.g., from a falling shower head)
- Door Opening Detection: Monitor magnetic vector changes to detect motion in smart home setups
- Body Movement Detection: Combine with radar input for elderly monitoring systems
This project is licensed under the MIT License.
You can add a license using the GitHub UI or by including a LICENSE file.
Developed for academic & prototyping purposes using the MicroStrain 3DM-GX2 sensor.
If this helps you, feel free to โญ the repo!