A real-time inertial sensing and visualization system based on the MPU6050 IMU, Arduino Mega, Python, and OpenGL.
This project implements a complete real-time sensing pipeline:
MPU6050 → Arduino Mega → Serial Communication → Python → SO(3) Attitude Estimation → 3D Visualization
The system acquires 6-axis inertial measurements at 500 Hz, performs sensor calibration and attitude estimation, and visualizes the estimated motion in real time.
- 6-axis accelerometer and gyroscope acquisition
- 500 Hz MPU6050 sampling
- 250-sample initial calibration
- Gyroscope bias compensation
- SO(3)-based attitude propagation
- Gravity-based roll/pitch correction
- Acceleration deadband and drift mitigation
- Real-time OpenGL visualization
- Arduino Mega 2560
- MPU6050 IMU
- Arduino C/C++
- Python
- NumPy
- PySerial
- PyQt6
- PyOpenGL
- Upload
MPU6050.inoto the Arduino Mega. - Connect the MPU6050 through I2C.
- Install the required Python packages.
- Run:
python imu_visualization.py
A detailed project report is included in this repository.
