A two-wheeled self-balancing robot requires accurate tilt-angle estimation and a low-latency real-time control system to maintain balance. However, software-based sensor fusion algorithms generally increase the computational burden of the microcontroller, reducing control responsiveness. This study evaluates the effectiveness of the Digital Motion Processor (DMP) embedded in the MPU6050 sensor combined with a discrete Proportional–Integral–Derivative (PID) controller on an ESP32-based self-balancing robot. The proposed approach was evaluated by comparing three angle estimation methods, namely Raw Data, Complementary Filter, and Hardware DMP, in terms of sampling time, transient response, and balance stability. Experimental results show that the DMP achieved a sampling time of 8 ms, outperforming both the Complementary Filter (11 ms) and Raw Data (21 ms) approaches. The proposed system maintained the robot's upright position with a settling time of 1.5 s and a low steady-state angular deviation. Furthermore, offloading the sensor fusion process to the DMP significantly reduced the computational burden on the ESP32, as inferred from the reduced sampling time of 8 ms, resulting in more responsive and stable control performance. These results demonstrate that integrating the MPU6050 DMP with a discrete PID controller provides an effective solution for improving the responsiveness and stability of embedded two-wheeled self-balancing robots.
Copyrights © 2026