A Project-Based Design of a Two-Wheeled Self-Balancing Robot Using PID Controller

Authors

Amat Amir Basari

Faculty of Electronics and Computer Technology and Engineering, Universiti Teknikal Malaysia Melaka (UTeM), 76100 Durian Tunggal, Melaka, Malaysia (Malaysia)

Azuha Syuhada Norman Zairi

Faculty of Electronics and Computer Technology and Engineering, Universiti Teknikal Malaysia Melaka (UTeM), 76100 Durian Tunggal, Melaka, Malaysia (Malaysia)

Article Information

DOI: 10.47772/IJRISS.2026.100500314

Subject Category: Science Education

Volume/Issue: 10/5 | Page No: 4617-4623

Publication Timeline

Submitted: 2026-05-07

Accepted: 2026-05-12

Published: 2026-05-30

Abstract

This project focuses on the design and development of a two-wheel self-balancing robot prototype controlled by a PID algorithm. The hardware setup includes an ESP32 microcontroller that processes orientation data from an MPU6050 sensor to manage the movement of NEMA17 stepper motors. A key feature of this system is its connectivity; sensor data is sent to the Blynk IoT platform, which allows for remote PID tuning and system adjustments without needing to modify the code manually. At the same time, the data is exported to MATLAB for a more technical and detailed analysis of the control response. By using a closed-loop control system, the robot can maintain its balance and follow a specific trajectory more effectively, even when faced with external disturbances or changes in the PID parameters. After testing the robot's performance under various settings, the results show a successful implementation of stable control. For future development, adding a camera system could expand the robot's capabilities to include surveillance and monitoring tasks.

Keywords

PID Controller, Self-Balancing Robot, ESP32, MPU6050 Sensor, IoT Monitoring

Downloads

References

1. Baltes, J., Christmann, G., & Saeedvand, S. (2023). A deep reinforcement learning algorithm to control a two-wheeled scooter with a humanoid robot. Engineering Applications of Artificial Intelligence, 126(4), 106941. https://doi.org/10.1016/j.engappai.2023.106941 [Google Scholar] [Crossref]

2. Darko, H., Tone, L., Mitja, T., & Oto, T. (2023). Design and Implementation of ESP32-Based IoT Devices. Sensors 2023, 23(15), 6739. https://doi.org/10.3390/s23156739 [Google Scholar] [Crossref]

3. Emrah, A., Kazim, Y., & Eyup, E. (2021). Use of PID control during education in reinforcement learning on Two Wheel balance robot. Journal of Science PART C: DESIGN AND TECHNOLOGY, 9(4), 597-607. https://doi.org/10.29109/gujsc.955562 [Google Scholar] [Crossref]

4. Hao, L., & Sitjongsataporn, S. (2026). Design and implement of smart voice controlled two-wheeled self-balancer for following and avoidance. International Electrical Engineering Transactions, 11(2). https://ph04.tci-thaijo.org/index.php/IEET/article/view/11634 [Google Scholar] [Crossref]

5. John, A.M. (2023). Modeling and control strategies for a two-wheel balancing mobile robot. Master Thesis, University of Arkansas. https://scholarworks.uark.edu/cgi/viewcontent.cgi?article=6514&context=etd [Google Scholar] [Crossref]

7. Kishore, R., & Rohit, L. (2025). Two wheeled path following self balancing robot. Indian Institute of Technology Delhi. [Google Scholar] [Crossref]

8. https://web.iitd.ac.in/~subashish/ELP7100/Biwheeled_Robot_Rohit_Kishore_Report.pdf [Google Scholar] [Crossref]

9. Maciej, S., & Izabela, K. (2025). Influence of control system architecture on mobile robot stability and performance. Sensors 2025, 25, 7353. https://doi.org/10.3390/s25237353 [Google Scholar] [Crossref]

10. Maheshbhai, V.A., Kumar, D., & Sinha, R. (2020). Development of Two Wheeled Robot (TWR) by Single Stepper Driver using PID controller. Research Square, 1-33. https://doi.org/10.21203/rs.3.rs-56271/v1 [Google Scholar] [Crossref]

11. Nikita, T., & Prajwal, K.T. (2021). PID Controller Based Two Wheeled Self Balancing Robot. 2021 5th International Conference on Trends in Electronics and Informatics. https://doi.org/10.1109/ICOEI51242.2021.9453091 [Google Scholar] [Crossref]

12. Sandeep, G., Kanad R., & Shamim, K. (2025). Self-balancing mobile robot with Bluetooth control: Design, implementation, and performance analysis. Automation, 6(3), 42. https://doi.org/10.3390/automation6030042 [Google Scholar] [Crossref]

13. Tun, H.M., Nwe, M.S., Naing, Z.M., Latt, M.M., Pradhan, D., & Sahu, P.K. (2022). Research on Self-balancing Two Wheels Mobile Robot Control System Analysis. Electrical Science & Engineering, 4(1), 1-7. https://doi.org/10.30564/ese.v4i1.4398 [Google Scholar] [Crossref]

14. Zhang, H., & Nor, N. M. (2025). Control strategies for two-wheeled self-balancing robotic systems: A comprehensive review. Robotics, 14(8), 101. https://doi.org/10.3390/robotics14080101 [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles