Self Balancing Mobile Robot
Built and tuned a group designed self balancing mobile robot by leading mechanical assembly, calibration, and physical PID tuning. Improved real world stability through iterative testing and troubleshooting, helping the robot achieve one of the longest balancing times in the live class demo while bridging the gap between simulation and physical performance.
Overview
This group project focused on building a two wheeled self balancing robot that could sense its pitch angle and continuously correct itself to stay upright. The project began with system modelling and simulation, then moved into full physical implementation using an Arduino Nano, MPU6050 IMU, motor driver, DC motors, batteries, and a compact two plate frame. My work focused on the mechanical design and assembly of the robot, experimental testing, calibration, and tuning the PID controller on the physical system.
The Challenge
The main challenge was closing the gap between a clean simulated system and real hardware. In simulation, the robot could be controlled under ideal assumptions, but the physical build introduced sensor noise, calibration sensitivity, mass distribution effects, and inconsistent motor behavior. The system needed to react fast enough to stay balanced while remaining stable and repeatable in real testing.
Approach
I contributed on the physical side of the project by helping design and assemble the robot structure, supporting the layout of the mechanical system, and leading much of the hands on testing and tuning. The robot used two stacked baseplates mounted on threaded rods, with the IMU providing pitch measurements and the Arduino executing the PID control logic to command both motors together. During testing, I focused on improving calibration reliability, identifying why the motors would cut out under certain conditions, and tuning the controller response to make the robot smoother and more stable. The final tuning process involved reducing the sample time from an initial 100 ms that was too slow, investigating motor shutoff behavior at lower sample times, and converging on settings that gave the best overall balance performance.
Results
The final robot was able to self stabilize for about 30 seconds on a hard surface and for much longer on carpet under the best calibration conditions. The strongest physical performance was achieved at a 20 ms sample time with gains of Kp 21, Ki 141, and Kd 0.89. Our robot was one of the stronger performers in the live class demonstration, and the project gave me direct experience with mechanical integration, iterative testing, calibration improvement, and troubleshooting the difference between expected control performance and real system behavior.