⚡ Project Level: Advanced
⏱ Time Required: 2–3 Hours
💰 Budget: Medium
🤖 Function: Self Balancing Robot
INTRODUCTION
Want to build a robot that balances itself like a Segway? 🤖 In this project, you will learn how to make a Self Balancing Robot using Arduino UNO, MPU6050 sensor, and L298N motor driver.
This robot uses PID control algorithm to maintain balance automatically by adjusting motor speed continuously.
WATCH YOUTUBE VIDEO
COMPONENTS REQUIRED
| Image | Name | Qty | Buy |
|---|---|---|---|
![]() |
Arduino UNO | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
MPU6050 Sensor | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
L298N Motor Driver | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
DC Motors | 2 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Battery Pack | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Jumper Wires | - | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
TOOLS REQUIRED
| Image | Tool | Qty | Buy |
|---|---|---|---|
![]() |
Screwdriver | 1 | {getButton} $text={Buy Tool} $icon={cart} $color={#007bff} |
![]() |
Wire Cutter | 1 | {getButton} $text={Buy Tool} $icon={cart} $color={#007bff} |
APPS AND ONLINE SERVICES
| Logo | App | Access |
|---|---|---|
![]() |
Arduino IDE | {getButton} $text={Download} $icon={download} $color={#007bff} |
CIRCUIT DIAGRAM
Add your circuit diagram image here
WIRING CONNECTIONS
MPU6050 ↔ Arduino UNO
| VCC | 5V |
| GND | GND |
| SCL | A5 |
| SDA | A4 |
L298N ↔ Arduino UNO
| IN1 | 7 |
| IN2 | 6 |
| IN3 | 5 |
| IN4 | 4 |
| ENA | 11 |
| ENB | 10 |
ARDUINO CODE
WORKING PRINCIPLE
The MPU6050 sensor measures tilt angle of the robot continuously.
Arduino processes this data using PID algorithm and adjusts motor speed to maintain balance.
If robot tilts forward or backward, motors move accordingly to keep it upright.
STEPS
- Connect MPU6050 and motor driver
- Upload the code
- Power the robot
- Tune PID values
- Test balancing
TIPS
- PID tuning is very important
- Use good battery
- Balance weight properly
CONCLUSION
This self balancing robot is a great advanced robotics project using control systems and sensors.








