Introduction: Balancing Robot

Picture of Balancing Robot
This is a very simple robot that uses a simple switch as a sensor and stands on only two wheels with inverted pendulum mechanism.
When the robot is going to fall the motor starts and moves the robot to the direction it is going to fall, so the motor torque about the center of gravity that is higher than the motor makes the robot balanced.

Step 1: Things You Need

Picture of Things You Need

To make this robot you need following parts and tools:
small electric motor
some gears
(or a motor with gearbox)
a shaft
two wheels
some sheets of plastic to make bearings and the robot neck
two battery holders
4 AA batteries
one button cell
one SPDT (single pole double throw) switch with a metal lever
one toggle switch for the on/off switchs
one nail
some wire
soldering iron
some glue

Step 2: Motor, Grears, Shaft, and Wheels

Picture of Motor, Grears, Shaft, and Wheels

In this step you must make a system to moves the robot you can make it easily by adding some gears to a simple small motor, then connect it to a shaft and assemble it two wheels.
You can also use a motor and gearbox.
It does not matter how you make it.

Step 3: Attach Robot Neck and Head

Picture of Attach Robot Neck and Head

Use glue to attach a sheet of plastic to the motor.
Then put some glue on one side of battery holders and attach them to the top of the plastic sheet.

Step 4: Making the Sensor

Picture of Making the Sensor

Solder a button cell to the SPDT switch lever.
Make the nail head hot on a flame and put it on the plastic sheet on the motor in a position that when the robot stands vertically the button cell touches the ground.
Then attach the switch to the robot with glue.

Step 5: Connecting the Switch

Picture of Connecting the Switch

Solder a wire form positive pole of one of battery holders to the negative pole of the other battery holder and attach the toggle switch to it.
Then attach the other side of the switch to the motor.

Step 6: Wiring

Picture of Wiring

Now it is time to solder the robot wires.
Note that you must solder the wires in a way that robot moves to the direction that is going to fall.

Step 7: Testing

Picture of Testing
The robot is now completed and it is time to test it.
Put 4 batteries into the battery holders and turn on the switch.
Try to change the position of the sensor to make the robot works better.
If the robot works inverted swap the red and blue wires on the sensor or on the battery holders.


tcheupluk (author)2017-11-23

waw with a nothing you amaze us.

tcheupluk (author)2017-11-23

waw avec un rien vous nous épatez.

aazzaki (author)2015-12-21

Assalamu alaikum, I decided to ask you about the wire connection, would you like to giving a picture of it ?

vahidyou (author)aazzaki2015-12-22

Look at step 6.

crafty squid (author)2015-11-28



jpedroc (author)2015-10-21

This is VERY VERY WITTY. Very simple way to create a self balancing robot.

I saw... I could say, the opposite robot, a very stable two wheels robot here (it is open source): This robot uses stepper motors instead.

bolanka (author)2015-07-20

Thanks.. I made it.

Arthak (author)2015-01-26

how can I make that switch

vahidyou (author)Arthak2015-01-27

You can buy a switch with lever or find some without lever in a dead computer mouse and attach it a lever.

Arthak (author)2015-01-26

best use of brain

maker_studio (author)2014-11-01

The easiest Arduino UNO based self-balancing robot, controllable by Smart Phone, RC and more!

ERockDesigns (author)2009-10-27

The problem isn't the center of gravity, it's stability. The switch will work as a measurement device so long as the robot is VERY close to vertical. If you get much past that narrow threshold, the robot doesn't add more torque to the motor to compensate. If you want it to be more stable, you'll have to use some analog device to measure the tilt-angle and another circuit to control motor torque through input voltage. A simple sensor would be a multi-turn potentiometer.

dratman (author)ERockDesigns2014-01-05

Another possibility for variable torque control, more in the spirit of the author's design, would be to add two additional switches (one for each possible direction of fall), arranged to turn on only when the robot gets closer to the horizontal on that side. Each of these switches would add an additional battery into the circuit in series. Then the robot would be carrying six or even eight batteries. As a bonus, the additional weight of the batteries might actually help it work more smoothly.

vahidyou (author)ERockDesigns2009-10-28

You're right.

High CG object has high moment of inertia, so it needs more moment to move and has more stabillity. Because of these you must choose the longest robot and consider your motor power.

The more complex controlling system, the more stabillity. but the most important feature of this robot is that it is simple (according to the the others comments)

dratman (author)2014-01-05

This is a wonderful, excellent project. The approach is exactly what one wants from a first build of any new device: the simplest possible implementation, with the loosest possible tolerances and the most room for experimentation to make the device work, and then to improve it.

jestela (author)2013-09-13

good day buddy! can I use this experiment for our science investigatory project? please, I'll give a credit in return. Please :/

vahidyou (author)jestela2013-09-14

Yes, of course you can.

wcallag (author)2013-05-23

I've been trying to find those gears!!! Where did you get them??

vahidyou (author)wcallag2013-05-24


nmvb (author)2012-11-19

why is the switch in between the battery packs instead of after?

vahidyou (author)nmvb2012-11-21

Because it must control the current to flow to the motor, so it must be before motor.

nmvb (author)2012-07-29

what is a roller on the SPDT switch? does it matter if this has one?

vahidyou (author)nmvb2012-07-31

roller causes the switch move on the ground perfectly, I recommend to attach a simple roller to your switch or use a switch with roller.

David97 (author)2011-07-22

I built one of these and my one doesn't tip over. It is about 11 cm in height. Also mounting the switch out further from the axel helps it is 1.5 cm from axel from the cloest edge on switch. Hope this helps to get your one working well.
Aso it is a good idea to have the hight of switch adjustable. As I spent 2 hours adjusting the hight.

vahidyou (author)David972011-07-23

Good idea, by an adjustable switch you can make robot standing on a steep too.
Could you upload a video of your robot, it would be very helpful for ones who want to make one.

AlKaswa (author)2009-12-22

where would i find a single pole double throw switch

vahidyou (author)AlKaswa2009-12-25

Electronic devices shop

milsorgen (author)vahidyou2010-01-06

 aka radioshack

ive also pulled one out of a computer, and several other interesting looking switches. mostly out of the optical drives, front panels and a somewhat of floppy drives, but if you keep your eyes open...

ben_xman (author)milsorgen2011-07-21

I've also noticed that radioshack has accelerometers. I wonder if you could use those too? Might be more arduino based than BEAM though....

Chowmix12 (author)milsorgen2010-05-07

try the buttons from mouses. they are conveniently SPDT, (not needed) but they have no lever, i've been able to fashion ones from paperclips and other simple materials.

TigrisLi (author)2011-06-01

Where did you get the wheel with the shaft??

vahidyou (author)TigrisLi2011-06-02

A toy!

TigrisLi (author)vahidyou2011-06-04

ok, thanks!

ladieslilman98 (author)2010-12-28

Add a second sensor, the motor wont work as hard, and it will stay balanced longer.

tobyscool (author)2010-11-25

i made the hugest mistake i shorted the batteries EPIC FAIL so my battery bursted

Exocetid (author)2010-08-22

This robot is great and I really like how you did the position sensor, extremely clever and what "Instructables" is all about. That said, you might want to change the switch on your sensor, which basically just gives you "Bang-Bang" control and hence the instability, to a potentiometer or variable resistor. That may involve putting an amplifier in there, but we EE's have been allowing ME's to use electronics for quite some time now ;-) (mechatronics)

vahidyou (author)Exocetid2010-08-24

Good idea. I like mechatronics a lot.

ForgetMyProfile (author)2010-02-04

It seems to me that the center of gravity is high which causes the robot to have to react faster than it is capable of due to the circuitry delays, inefficiency of the wheels to move as quickly as needed.

I have two Segways (a blast, by the way) and they stand up on their own. It's fun to watch them "dance"..

I literally had to go to the factory in NH to take a class on how to ride these models. Yes, long time ago.

What they suggested this: to stabilize my units when first riding it, add some weights to the saddle bags on either side. It not only helped me when learning, it helped the Segway stay upright without excess movement

So what I'll seggest (lol) to you is this: get the center of gravity lower by moving the batteries down or adding weight to the bottom of the plastic. That should allow the bot to stay upright without falling over.


Grand Rapids, MI

 Thats really cool and a good idea, and i have an alarm clock like that, it has a very dense material on the bottom with a rounded edge, so to turn it off u just push it back, then it pops back up.

but why do u have 2 segways, its pretty cool, i just dont understand y u have them.

Originally, I bought the two Segways for advertising purposes.

My intention was to hire good looking college gals to ride them around with our company logo on the side of the saddle bags, answering questions about our business and handing out literature.

Great marketing idea, but have not had enough time to devote to the project.

Robot Lover (author)2010-01-07

  I like this. Reminds me of my youth, building a line following robot with a car battery and two window regulator motors from an old Lincoln.
  It would be interesting to try it with tilt switchs (**MERCURY is BAD kids**) and perhaps make two stages of power, voltage divider between cells for those times when it tilts beyond a certain range the additional voltage is switched on.
  Also would be neat to try a magnetic pendulem with reed switchs.

Good Job.

Chowmix12 (author)Robot Lover2010-05-07

but you would need a spdt tilt switch... i think this switch is better because of its immediate response and its adjustable. You can't adjust the force of gravity on the tilt sensor...

stephenniall (author)Robot Lover2010-02-13

Mercury is Cool !

l33tm4s73r (author)stephenniall2010-03-15


Robot Lover (author)stephenniall2010-02-13

it's true.

ratgod (author)2010-04-29

Thats pretty good considering their is no microcontroller doing the balancing, its a neat simplistic design.

excellent instructable.

lothartje (author)2010-04-02

nice music :)

godscountry (author)2010-03-12

this is interesting,another way to balance on one or two wheels without the high cost,if perfected,it might make for some fun toys.

cupnoodles2 (author)2010-02-22

its pretty nice i made one myself but its not working that great lol
i think its because i only used two gears one on the motor and another one on the driver shaft so there's no mechanical income but im not sure if its that or it is just that the batterries are not fresh enought :O

thanks for the instructable and i apologize for my bad english

cupnoodles2 (author)cupnoodles22010-02-22

honestly i know that there's not enought torq lol since i didnt used a third gear well im remaking it xD

About This Instructable



Bio: I'm a mechanical engineer, and I like computer programming, mechanics, electronics and specially the robotics.
More by vahidyou:Serial Port Over WiFiCheap Logic AnalyzerCheap STK500 AVR programmer for Atmel Studio
Add instructable to: