The Two-Wheeled Self-Balancing Bot is an innovative robotic system that maintains its balance without external support, inspired by the principles of inverted pendulum control. Similar to how humans balance themselves while walking, the bot actively adjusts its wheels in response to tilting, making it a practical demonstration of control theory, signal processing, and robotics.
Self-balancing robots have numerous real-world applications, including personal transporters like Segways, robotic mobility aids, and autonomous robotic systems for exploration and industrial automation. The project explores both hardware and software solutions to achieve a fully functional self-balancing bot.
The bot continuously monitors its tilt angle using an MPU6050 sensor, which integrates an accelerometer and gyroscope. These sensors provide raw data, which is then filtered using a complementary filter to reduce noise and enhance accuracy.
Whenever the bot detects a tilt, it calculates the required wheel movements and adjusts the motor speed accordingly. The bot always moves in the direction of the tilt to bring itself back to an upright position. This active control mechanism ensures that it remains balanced even when subjected to external disturbances.
The self-balancing bot is built using off-the-shelf electronic components and a custom chassis, including:
Microcontroller:
Arduino Mega 2560 – The brain of the bot, responsible for processing sensor data and controlling motors.
Sensors:
MPU6050 (6-axis IMU Sensor) – Measures the tilt angle using an accelerometer and gyroscope.
Quadrature Encoders – Tracks motor rotations for precise movement control.
Motors & Motor Driver:
300 RPM DC Gear Motors with Encoders – Provides the necessary torque to balance the bot.
L298N Dual H-Bridge Motor Controller – Controls motor speed and direction.
Power Supply:
3-cell Li-Po Battery (11.1V, 2200mAh) – Provides power to the motors and control system.
Wireless Communication:
XBee Module – Used for remote debugging and tuning of control parameters.
To improve the accuracy of tilt measurements, the bot implements advanced signal processing techniques:
Low-Pass Filter – Reduces noise in accelerometer readings.
High-Pass Filter – Removes drift in gyroscope readings.
Complementary Filter – Combines accelerometer and gyroscope data to provide a reliable tilt angle measurement.
The complementary filter was chosen over the Kalman filter due to its simplicity and efficiency in real-time applications.
The stackable chassis design significantly improved the bot’s stability.
The battery placement in the lowest tier increased the maximum recoverable tilt angle.
The LQR controller did not perform well due to insufficient motor torque, leading to instability.
The cascaded PD controller successfully stabilized the tilt angle, though position control was not fully achieved.
Wireless tuning using XBee made controller optimization easier and more efficient.
The final implementation allowed the bot to balance effectively on two wheels, showcasing real-world applications of control systems, robotics, and embedded systems.
Cascaded Proportional-Derivative (PD) Controller
A cascaded PD control approach was implemented, where:
The inner PD loop controls the tilt angle.
The outer PD loop controls the bot’s position.
This method allowed the bot to maintain tilt angle stability, though full position control was not achieved.
Tuning of PD gains was performed using an XBee module, enabling real-time wireless adjustments to achieve better stability.
Two different chassis designs were considered for the bot:
Vertical Design – Components are stacked vertically, requiring precise weight distribution.
Stackable Design – Components are placed in multiple tiers, allowing better stability and modularity.
Final choice: Stackable Design
Provides better stability due to improved weight distribution.
Allows easy customization by adding or removing tiers.
Battery placement at the lowest tier improves response time and recoverability from tilts.
To further improve the bot’s performance, the following upgrades can be considered:
Higher Torque Motors – The current motors are a limiting factor in implementing better control techniques like LQR.
3D-Printed Lightweight Components – Reducing weight will enhance response time and efficiency.
Advanced Position Control – Implementing additional PID tuning or machine learning algorithms to enable movement while balancing.
The Two-Wheeled Self-Balancing Bot is a successful implementation of inverted pendulum control using embedded systems and robotics. It demonstrates real-world applications in autonomous mobility, personal transportation, and industrial automation. While challenges like motor torque limitations and position control remain, the project showcases a functional, self-balancing robotic platform that can be further enhanced with better hardware and control algorithms.