A two-wheeled mobile robot capable of self-balancing using sensor fusion and PID control. This project demonstrates embedded robotics, real-time motion control, and system stabilization through precise feedback loops.
- π€ Real-time self-balancing using GY-953 IMU sensor
- β‘ PID-based control for stable motion and tilt correction
- π οΈ PWM motor control for bidirectional wheel movement
- π Sensor fusion combining accelerometer and gyroscope data to compute pitch, roll, and yaw
- π§ͺ Adjustable control parameters (Kp, Ki, Kd) for optimal performance
- π₯οΈ Serial output monitoring for debugging and analysis
| Category | Technologies |
|---|---|
| Programming | C++ |
| Embedded System | Arduino |
| Sensors | GY-953 IMU |
| Control | PID Control, Sensor Fusion |
| Motors | PWM-controlled DC Motors |
-
IMU Sensor Reading
The GY-953 module provides accelerometer and gyroscope data. The robot continuously reads these values to calculate pitch, roll, and yaw angles. -
PID Control Loop
A PID algorithm adjusts motor PWM signals to keep the robot upright. Control parameters Kp, Ki, and Kd are tuned for balance stability. -
Motor Control
PWM signals drive two DC motors bidirectionally. Motor power is adjusted in real time according to tilt angle errors. -
Debugging & Monitoring
Serial output logs IMU data, current angle, and motor power for performance assessment.
Current Angle: 3.5Β°
Motor Power: 120 (forward)
The PID controller calculates the necessary motor adjustments to bring the robot back to its target angle (-6Β°).
Mohammad Alaei
AI Researcher & Computer Engineer π Personal Website
This project highlights embedded control, sensor integration, and algorithmic design for real-time robotic stabilization. It reflects hands-on experience with electronics, firmware programming, and robotic system engineering.

