How to Build a Self Balancing Robot?

Published on . Written by

Self Balancing Robot
Self-balancing robot is a two-wheeled robot which balances itself so that it prevents itself from falling. This concept is somewhat similar to the operation of a unicycle, the rider of the unicycle balances by moving himself in the same direction of the inclination so that he stays vertical, similarly the self-balancing robot balances by moving in the same direction of the inclination.

Read more..
You will be needing Arduino Uno board, GY-521 module with MPU-6050 which has MEMS Accelerometer, MEMS Gyro and a Magnetometer in a single chip, you will also be needing a motor driver to run the motors.


Skyfi Labs Projects
The GY-521 module help in stabilizing the robot, the inclination of the robot is calculated and the inclination data is sent to the Arduino, depending on this inclination data the robot has to be programmed. The robot should maintain a 90 degree inclination that is the robot should always be vertical in order to balance itself, so if the inclination is above 90 degrees then the robot should move in forwarding direction to balance itself similarly if the inclination is below 90 degrees the robot should move in reverse direction to balance itself.

Using the above logic you can program your robot to balance itself, the robot balances even though you disturb it by pushing, you can also build a strong robot such that it can carry some weight on it and also make the robot balance some objects kept on it.

Project Description:

  1. Arduino Uno: You can use this Microcontroller for interfacing GY-521 module and program the robot such that it actuates itself to stay balanced, for sensing and actuating you can use the GPIO pins. The board accepts both analog and digital signals as inputs.
  2. GY-521 module: This module has an MPU-6050 sensor which has MEMS accelerometer and MEMS gyro in a single chip, this gives the data of all the three dimensions and the tilt angle of the robot. The module also consists of a magnetometer(compass).
  3. DC Motor: You can use the DC motors to actuate the robot, that is to balance itself the robot has to move in forward and reverse direction, the DC motors can rotate in clockwise and anti-clockwise by reversing the polarity of the power source.
  4. L293D Motor driver: You will need a motor driver to run the motors, L293D is a typical motor driver IC which allows the motor to run in both the directions, you can control two motors with one IC.
  5. Robot chassis: You have to build a strong two-wheeled chassis for the robot with ample space for the electronics.

Project Implementation:

  1. Build a two-wheeled strong chassis for the robot, place the wheels at the middle of the chassis in order to maintain the center of balance, and also make sure that there is enough space for the electronics.
  2. Arduino and the GY-521 module should be placed exactly at the center of the chassis, you can also make a two storey chassis to fit all the required electronics, make sure that all the components are placed at the center.
  3. Program the robot such that the wheels move towards the angle of inclination, by this, the robot stabilizes
Project Brief: The Robot when switched on and placed vertically on the floor, the GY-521 module checks for the inclination of the robot and depending on this data the motors are actuated and the robot stabilizes itself b moving in the same direction of the inclination. The robot can stabilize even from the external disturbance that is from any push or pull, you can also place an object on the robot and balance it.

Software requirements:

  1. Arduino IDE Version 1.8.5 : You will be needing Arduino IDE software for writing and uploading the program into the Arduino Uno board.
Programming language: Arduino programming (C++)

Kit required to develop How to Build a Self Balancing Robot?:
Technologies you will learn by working on How to Build a Self Balancing Robot?:


Any Questions?


Subscribe for more project ideas