A self-balancing robot using Arduino typically works on the principle of an inverted pendulum. It uses sensors like an MPU6050 (gyro + accelerometer) to detect the angle of tilt and adjusts motors to balance itself.
Components:
-
Arduino Uno/Nano
-
MPU6050 (Gyro + Accelerometer)
-
2 DC Motors with Encoders (or without, but better with)
-
Motor Driver (L298N or L9110S)
-
Wheels + Chassis
-
Battery Pack (Li-ion or LiPo)
-
Optional: Bluetooth module (HC-05) for control
Wiring
-
MPU6050
-
VCC → 5V
-
GND → GND
-
SDA → A4 (on Uno)
-
SCL → A5
-
-
Motor Driver
-
IN1, IN2 → Arduino digital pins (e.g., D8, D9)
-
IN3, IN4 → Arduino digital pins (e.g., D10, D11)
-
ENA/ENB (speed control) → PWM pins (e.g., D5, D6)
-
Motor outputs → DC motors
-
VCC → Motor power (e.g., 7.4V LiPo)
-
GND → Common ground
-
Arduino Code
0 Comments