Let's Make Robots!

Low Cost DIY Bipedal

DIY bipedal robot, walking, upstairs, one leg balance, with remote control
Cost to build: 
$150
Time to build: 
200 hours

This is my second robot.

This bipedal is made with 12 low cost servos (MG995), 4 atmega168, aluminium material for window frames, and with small hand drills, hand saws and files. 

It is still in progress. I would like to remote control it first, and later to have it self-navigate in the house. Will post to show how to make it. But you can check out also in my blog :

 

Servo

In the planning stage, I actually possessed very limited knowledge in controlling servos. I knew that I need powerful servos. Thus I got some TowerPro MG995 to play around. I started by writing a simple servo controller, which supports group movement. I mean that a group of servos to move together to various positions within a fix period.

After that I realized MG995 is too shaky for bipedal robot. I go immediately to try out openservo software. This fix the problem and bring me quite a number of skills, like TWI communication, TWI bootloader, etc.

Servo Mount

It is a big question mark to me on how to mount a servo. I don't want to drill holes on the servo and have no budget to buy the nice looking mounts on the net. Finally I figure out the way to make the mounts and the cross joint from aluminium window frame material. It is low cost, easily crafted, strong enough for robotic usage:

Sample 1

Sample 2

Servo mount and arm example

Some more samples

 

Simulator

It would be nice to have autocad or similar tools to simulate the design before actual development. Of course, I don't have the money and I don't want to use illegal software, usually. Python is my primary development tools on PC side robotic development. Thus I try the vPython 3D package and it is surprisingly easy to use. However, vPython is just a simple 3D presentation tool. I added the pyODE (a physical engine) so that I can model a robot in a physical world:

simulator 1

simulator 2

Later, I found out that it is just a nice-to-have tool in robot development. I will tell you later why. But the simulator does help me to visualize the robot before I build it. Also, it helps me to develop the first version of the sequencer, which is very important in later development. More info

 

How to walk

The first step to walk is to shift the CG (center of gravity) to one leg, and lift the other leg up. This is very simple task to human being but a bit tricky to a robot. It is because of the control logic on your servo can deal with itself only. Usually a servo uses control logic like PID You specific a position, the servo will move to the position precisely at the maximum speed but not overshoot. When a bipedal robot is built, the overall weight will be a big burden to your servos. Thus the servo is always at certain offset from the target position that you specified. The situation is more serious when the robot is standing on one leg, when walk upstairs and etc. 

This is why I said a simulator is not very useful at this stage. It is because it is hard to simulate this situation for a real robot that may have different minor defects in physical structure and servos performance. It is also why you would like to use powerful servos instead of the small one.

On top, you will need to control your servos to move at a predefined speed/timeslot and synchronized them. It will rely on your servo controllers (or openservo already support it). I also recommend to have curve motion function if you want a more natural and fast motion. Curve motion means your servo can move non-linearly. e.g. move more initially and gradually move to the target slowly. Openservo supports beizer curve motion, which I think a bit complicated to use.  I've made a semi-circle-like curve motion (check the blog for more information if you want to).

To walk naturally, here is a good reference link.  I would say minimize the shifting of the CG (center of gravity) of your robot will be a key. It also minimizes the energy lost when the robot walks if the CG is kept at constant level.

 

How to work fast

From the first walking sequence @ 6 second per step, to the latest working sequence at 0.55 second per step. The improvement is not only from the optimizing each movement of the servo, but also overcome the bottlenecks between the communication paths to the servo. 

On average it takes 4 sets of 12 servo movement to complete one walking step. If you are using a 9600 bps link, and a send and acknowledge protocol, the max data rate is no more than 600 bytes per second. Thus your servo controller must support a batch mode in specifying servo movement (allow setting of 12 servo together in one command.).

If one servo command is 3 byte, here is a simple comparison of 4 set of 12 servo commands to send:

Your controller support batch commands: 4 x 12 x 3 / 600 = 0.24 seconds

Your controller does not support batch commands, so each commands has to be acknowledged: 0.24 x 12 = 2.88 seconds

On the other hand, if your controller supports a one way protocol (no acknowledgement required), the situation will be much better. It takes 0.12 seconds to complete in both case.

Still, if your controller does not support batch mode, the different between first servo command and the final servo command may be more than 0.06 second. This is significant to demage the walking sequence. A high speed link is recommended in this case.

Thus pay attention to the controller design and speed of communication. High speed, batch commands, curve motion, linear motion, and high speed servos are the keys to archieve fast walking.

 

Robot Simulator Source Code

I have packed the source code for your download at http://code.google.com/p/clrobotsim/

To be continued....

 

Comment viewing options

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

hey, regarding digital servos,

i found cheap ones

http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=2

do you think this will work

Thomas Countz's picture
Awesome!

I'm coming a bit late on this project.

I have the OpenSevo Control board matched with the MG995 Servo.

The problem you are having with the reseting problem was exactly the same thing I was having.

Increasing the cap made no difference, but installing a 5-10 ohm resistor in series with the motor stopped the resets.

Keep up the interesting work.

 

 

 

BTW, if a 5-10 ohm resistor is in series with the motor, the voltage drop on the resistor may be too high when the servo is heavily loaded. It may affect some movements like walk upstairs.

I've never tried this. Thank you for your suggestions.
OddBot's picture
I just watched that last video with it bending over backwards, are you using a sensor for balance or is a mathematical/trial-error aproach

It is a trial-error approach.

From my limited knowledge, it is impossible to make a low cost bipedal to do real-time balance with sensors. Mathematical approach is not possible either, because it is difficult to model the servo behaviour and the measure the actual density of the whole robot precisely.

 

OddBot's picture
if you had pressure sensors on the feet then your processor could tweak the trial/error values to spread the weight evenly over each foot.  This would be particularly useful if you give it the ability to pick things up where you need to compensate for an unknow load.

I am less optimistic on using pressure sensors.

First of all, I can't find any cheap pressue sensors. They are at least > $12 for one. I will need several of them on each foot.

Even I have these sensors, it is very complicated to develop a self-balancing algorithm with 12 DOF on two legs. I need a powerful 16-32 bit CPU to do it. Then I need a more powerful servos because all these thing add up to a very heavy machine. 

Even I have all the above, I still have a big problem to develop the self-balancing control system. I will need a more powerful machine to run a simulator in software and lots of R&D. I need a super-PC. Probably I can teach a class in University after that, if ever it succeeds.

This is also why normal DIY bipedals are not very intelligent. The self-balancing act can't easily play well on small scale, may be on one or two wheels.

 

mintvelt's picture
I like the way it moves so smoothly! I also like the servo mounts. You made them from aluminium window frames? well done!