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

by Amat Amir Basari, Azuha Syuhada Norman Zairi

Published: May 30, 2026 • DOI: 10.47772/IJRISS.2026.100500314

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.