Publication:
Controlling a two wheels self-balancing Robot with microcontroller

Loading...
Thumbnail Image
Date
2024-07-05
Authors
Lim, Jun
Journal Title
Journal ISSN
Volume Title
Publisher
Research Projects
Organizational Units
Journal Issue
Abstract
This project explores the design and control of a two-wheeled self-balancing (TWSB) robot, leveraging the inverted pendulum principle fundamental to robotics and control theory. This project also underscores the relevance of self-balancing robots in advanced AI systems and applications, such as security patrolling and assistive devices for the disabled, while acknowledging limitations imposed by the equipment used. The stability is achieved through real-time data from gyroscopes and accelerometers, processed by a microcontroller to adjust the motors. The primary objective is to implement a PID control algorithm to maintain the robot's upright position, move it forward, and navigate inclined surfaces while staying balanced. The methodology involved selecting and using components like the MPU6050 sensor and an Arduino microcontroller. Control algorithms were developed using MATLAB Simulink and Simscape, with PID controller parameters tuned both manually and automatically. Iterative testing and calibration of the MPU6050 sensor were crucial, along with developing a mobile graphical interface via the RemoteXY platform. Results from simulations and experimental tests showed that manually tuned PID controllers performed better. Simulation results in Simscape indicated that PID gains of kp=30, ki=110, and kd=1.25 were effective for balancing the robot. In experiments, the TWSB robot balanced well without remote control but struggled with remote control. To reduce noise from the MPU6050 sensor, a Kalman filter was implemented in the Arduino code. The tuned PID gains are kp=30, ki=120, and kd=1.7, and the robot successfully balanced itself, moved forward, and navigated ramps when manually guided.
Description
Keywords
Citation