Let's Make Robots!

YASBR – Yet Another Self-Balancing Robot

Self-balancing robot

The self-balancing robot building is today an activity that every robot builder can perform with Arduino. Searching in Google for self-balancing robot you can find tons of realizations, with tons of different sensors and control systems. So to build a self balancing robot is a standard task for the robot builder, like a simple home rover.

Trying to be at least original, I though to build a self balancing robot with these goals:

  • low-low-cost
  • simple in the hardware
  • simple in the software 

So I tried to build a self-balancing robot using only one sensor: a Sharp IR distance sensor e nothing else. No gyro, no accelerometer, no other sensors. All is self-built, in the DIY pure spirit.

These are the components used:

  • Plexiglass chassis
  • Wheels for servo (Boe-Bot wheels). At first time I tryied to use two trolley wheels, but without success
  • Servos modified
  • Sharp IR sensor 10-80 cm
  • Arduino 2009
  • 2 batteries pack 4x1,2V 
  • some screws, jumpers etc.

 We are under 100 euros, a good results concerning the cost.

Some details here: http://robottini.altervista.org/yasbr-yet-another-self-balancing-robot/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It measures the distance from the floor then it tries to maintain a constant distance reading using a PI algorithm.

To operate it, you first balance the robot and then the algorithm tries to maintain the reading from the sensor, thus keeping a constant angle between the robot body and the floor. Since you started the robot when it was balanced it will keep itself balanced. I guess this only works on flat surfaces because a change in the distance between the sensor and the floor would tilt the robot. It could probably stay on an inclined surface if recalibrated for that angle. If you start the robot out off balance it will probably move forward continuosly. I probably drifts too. I wonder if changes in floor color would throw it off balance.

You are right. The sensor measures the distance from the floor and it tries to mantain a constant distance using the PI algorithm. The surface has to be flat, otherwise the distance measured has no sense, so the robot tilt. This is the main difference with gyro and accelerometer sensor. The gyro and the accelerometer work always. The IR sensor works only in a flat surface.

Another possibility is to use 2 IR sensors, that is better for precision of balancing. But also with 2 sensors you can use only in a flat surface.