Followers

Recent Posts

Tuesday, February 9, 2010

Build your own humanoid - Part 2

Last time, I started going over a basic outline of how you might go about designing your own humanoid robot.

After I finished writing part 1, I realized that there is a lot more to cover on each topic than I am able to explain in a single post. All I am covering here is a design methodology - one of many possible procedures. This means that if I skim over a topic or don't go into sufficient detail, you will need to do a bit of research on your own to fill in the blanks.

After deciding upon the number of degrees of articulation you intend to build into your robot, I suggested that the next step should be to draft up some approximate measurements for the arms, legs and body.

Some people find this difficult. Coming up with a number for a length or a weight almost without any input information seems pointless and arbitrary, since there are so many variables which affect and are affected by your decision. This is why I emphasize the inexact nature of these dimensions at this stage. We will come back and refine them once we have more details.

If you have the time, the tools and the expertise required to draw up an exact model of all the designable variables and how they correlate to each other, then this is a perfectly acceptable method. I personally find the iterative method is easier and less prone to mistakes.

At this stage, you would do well to open up a spreadsheet and enter all the values you have chosen so far. You can quickly sum up all the masses and lengths (warning: trigonometry), and it will help you quickly calculate your servo requirements.

Servos

Servos are not the only type of actuators you can use, but they are certainly the most commonly used. I'm going to assume most people will choose to use servo or stepper motors, but don't feel limited by this. You might want to use a combination.

There are two main alternatives to electric motors. The first is pneumatic actuators, like the ones used here:



The other option is shape-memory alloy, known as muscle-wire or nitinol:



Both of these have niche uses, but you will find that servo motors are more general purpose.

Unlike normal DC motors, servos are motors which can be commanded to move to a specific rotational angle. To achieve this, they contain a feedback loop which will keep turning the motor in the right direction until it reaches it's destination.

I could go on for pages about the specific inner workings of a servo (and I probably will someday), but right now we need to concentrate on three technical specifications:


Torque. When searching for servos, they should all report a stall torque in kilogram-centimeters or ounce-inches. These numbers represent how much weight they will be able to lift (on planet earth) at a distance of one centimeter or one inch away from the axis of rotation. More is generally better, but will come at a higher price.

How much do you need? This is why it is so important to have a rough idea of the proportions of your robot. I forgot to mention it before, but now would be a good time to also estimate the weight of your batteries and other heavy components.

Lets assume you want to choose an appropriate servo for your knee. The knee servo will be required to lift the entire weight of the robot from a crouched position to standing.


To calculate the torque, you multiply the weight by the horizontal distance between the axis and the center of mass.

 T = Fxd

In the above example, the robot's body weight is centered over it's hips, which is 5cm from the knee. His upper body is about 750g, so 0.75kg*5.0cm = 3.75kgcm is required to get the robot stand up.

He also has two knees which can work together, so really each servo only needs to have 1.9kgcm to stand up. However, when he walks we can assume each leg will need to work independently, so we should stick with the original value.

So use your estimated lengths and masses to come up with some numbers for the torque on each joint. You will have to imagine the most difficult movement your robot will be required to perform in order to find the necessary values.

  • If you aren't sure how much your robot will weigh, remember that we are trying to build an under 1kg robot. If you know it can move 1kg, it will be enough.
  • Similarly, the time your robot will be required to deliver the most torque is when it has fallen over. If you are unsure, use half of the robot's height as the distance, since this is representative of the single servo being used to stand up.
There are much more complex methods of calculating the required torque, but there isn't much point in going to the trouble since you mostly just estimated values anyway. If you're having trouble, here is everything you ever needed to know about everything.

Now you should have an estimate for the value of each joint. This is the minimum torque you will need to move the joint. Since your estimates were pretty sketchy to begin with, you should add a factor of safety to ensure you've got enough. I would suggest increasing all your estimates by 50%, or even more if you don't feel confident about your calculations.

Mass. Servos which deliver more torque are generally larger due to the fact that they contain more gears and heavy duty parts to withstand the extra forces.

Heavier servos will increase your requirements for torque. Sometimes, this will be unavoidable, but it's effects can be alleviated by making your robot shorter.

You can also reposition heavier parts so that they are closer to the axis you are rotating around. This will reduce the power of the servos you need and make your robot lighter overall.

Speed. The price of a servo is usually determined by it's torque and it's speed. Fast, strong servos will be particularly expensive, so it's important to only get what you need.

Rotational speeds are measured in seconds per 60 degrees. This is the time it takes to complete one sixth of a full revolution - lower means faster.

Not all of your servos will need to be lightning fast - only walking and balancing will require a lot of agility. The proportions of your robot will multiply how fast the limb will move. If you've designed longer legs, you won't need such speedy servos to walk at a reasonable pace.

In particular, the ankle joints usually only need to move through about 10 degrees in a step, which means they can be much slower than the rest of the servos in the legs without impacting the performance.

Now that you know what properties each servo needs, you will have to search around to find one which matches.

It's pretty unlikely you will find exactly what you are looking for, but thats fine. Near enough is good enough - up until now everything has been pretty approximate, so no reason to stop here. Remember that the point of this exercise is not optimization - just getting a robot with two legs on the ground is all we want for now. Here are a few more things to consider when choosing servos:

  • Metal gears will save you a lot of trouble.
  • A lot of robots simply get one type of servo for every joint. The advantage of this is that it's easier to repair and easier to build since you only use one set of parts. However, your robot will be heavier and more expensive than it needs to be.
  • There is more than one way to control a servo. Digital and analog servos require 50Hz PWM control, but some robotics servos use RS232 or RS485 protocols. Right now it doesn't matter which you choose, but make sure all of them use the same method.
  • Many servos offer extra features like adjustable PID parameters, overload protection and position feedback. These are valuable additions, and you would be wise to take advantage of them.
  • Most servos have a limited range of rotation. Often, this is around 270 degrees, but can be as little as 90. For most joints, 270 will give you a sufficient amount of freedom, but check you have enough.
Here comes the important bit. Having chosen a servo for every joint on your robot, go back and do the torque calculations again. This shouldn't be hard if you've put everything in a spreadsheet - just use the new torque and mass of every servo you've chosen, and make sure that your requirements are still met.

Chances are, you will find that most of your initial estimates were reasonable. If you find that one servo doesn't have enough power to move the robot anymore, you will either have to upgrade that one, downgrade one of your heavier ones, or adjust the dimensions of your robot. This may cause a cascade of other things to change, but that's just the catch 22 of design. Keep adjusting and recalculating until everything fits.

Wasn't that fun? No, it wasn't really. But at least now you know that the money you are spending on parts won't be wasted.

    2 comments:

    1. hi my biped calculation came torque of 65kgcm can i use the servo of 32kgcm

      ReplyDelete
    2. hey do you know or have anything that might help me get started on my own robo one robot type? like useful sites just like your own? thanks hope u managed to do your own bot

      ReplyDelete