Skip to content

erenolmez/microstrain-3dm-gx2-imu-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroStrain 3DM-GX2 IMU Driver (Python)

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.

๐Ÿง  Features

  • ๐Ÿ“ก 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

๐Ÿ–ฅ๏ธ GUI Preview

Main Interface

IMU GUI

Use the interface to start/stop data streaming, choose measurement mode, and visualize sensor data.

Measurement Options

IMU GUI Measurement Options

Measurement modes:

  1. Acceleration, Angular Rate & Magnetometer Vector
  2. Temperatures
  3. Raw Accelerometer and Angular Rate Sensor Outputs
  4. Gyro Stabilized Acceleration, Angular Rate & Magnetometer Vector
  5. DeltaAngle & DeltaVelocity & Magnetometer Vectors
  6. Euler Angles and Angular Rates
  7. Orientation Matrix
  8. Attitude Update Matrix

โš™๏ธ Usage

๐Ÿ–ฅ GUI Version

python imu_gui.py

Use the GUI to start/stop, select data mode, and plot data.

๐Ÿงฑ Headless Mode (No GUI)

python imu_data.py

Modify the choice = "optX" line in the script to set your desired mode.


๐Ÿšจ Embedded Use Cases

  • 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

๐Ÿ“œ License

This project is licensed under the MIT License.
You can add a license using the GitHub UI or by including a LICENSE file.


๐Ÿง  Credits

Developed for academic & prototyping purposes using the MicroStrain 3DM-GX2 sensor.

If this helps you, feel free to โญ the repo!

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages