Skip to content

Self-Balancing Robot

Two-wheeled ESP32 robot that keeps itself upright with an IMU and PID control

A two-wheeled robot that stays upright on its own, like an inverted pendulum. An ESP32 reads acceleration and angular velocity from an MPU-9250 IMU, filters them into a tilt angle, and a PID loop drives two 12V gear motors through BTS7960 (IBT-2) drivers to keep it balanced. I designed the 3D-printed chassis in CAD, wired the power system (three 18650 cells and a 12V to 5V buck converter) and wrote the firmware. The build taught me how much the physical structure and the control code affect each other. Hardware: ESP32 DOIT DevKit V1, MPU-9250, 2x BTS7960 motor drivers, 2x 12V DC gear motors, custom 3D-printed chassis.

Category
Hardware
Built with
ESP32, C++, MPU-9250, PID control, 3D printing

Loading showcase…