Skip to content

alaeimo/InvertedPendulumRobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Self-Balancing Two-Wheeled Inverted Pendulum Robot

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.


πŸš€ Demo

Demo

πŸš€ Schematic

Schematic


🧩 Features

  • πŸ€– 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

πŸ› οΈ Tech Stack

Category Technologies
Programming C++
Embedded System Arduino
Sensors GY-953 IMU
Control PID Control, Sensor Fusion
Motors PWM-controlled DC Motors

🧠 How It Works

  1. 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.

  2. 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.

  3. Motor Control
    PWM signals drive two DC motors bidirectionally. Motor power is adjusted in real time according to tilt angle errors.

  4. Debugging & Monitoring
    Serial output logs IMU data, current angle, and motor power for performance assessment.


🧾 Example

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Β°).


πŸ‘¨β€πŸ’» About the Author

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages