Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: Canabots on May 23, 2009, 09:35:19 PM

Title: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 23, 2009, 09:35:19 PM
How would I determine the torque necessary for a quadruped robot I'm building? I have seen this post: http://www.societyofrobots.com/robotforum/index.php?topic=693.0 (http://www.societyofrobots.com/robotforum/index.php?topic=693.0) but the joint system on my robot legs are different (2DOF instead of 3) like the image below:

(http://canabots.webs.com/Quad_angle_colour.PNG)

Also, the expected weight of the robot will likely be around 1/2 to 1 pound. Most likely closer to half a pound.

I was thinking of using HXT900 micro servos from Hobby City, or something with similar stats. It's torque is 1.6kg*cm, though lately, I'm not sure if that'll be enough...

EDIT: I should also mention that this robot is going to be built to be as fast as possible, just as a heads up.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 24, 2009, 07:28:31 AM
I did some calculations for the vertical hip joint(similar to those in that other thread I referenced to) and I did the RMF calculator thing and it appears that the HXTs should be enough if my robot is about 1 pound. Let me know if anyone has objections or if anyone knows how to properly calculate the required torque.

(Here are my Calculations:)

distance from servo output to foot (radius) = 5.7cm
Servo Torque= 1.6kg*cm

weight= torque/radius
weight= 1.6/5.7
weight= .29kg = .62lbs

And that's only for one leg, and I'll have atleast 2/4 on the ground at a time.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 28, 2009, 02:37:55 PM
You are on the right track.

The weight supported is the total vehicle weight divided by the minimum number of legs that will touch the ground at any particular time.

If your robot is running, you also need to account for dynamic affects -> force = mass * acceleration. For example, if your robot was to jump, acceleration must be greater than gravity. So you'd add static + dynamic force calculations together.

Your moment arm length is from the servo horn to the 90 degree angle bend, not to the foot. This is because force is applied perpendicularly in your design.

Use this:
http://www.societyofrobots.com/mechanics_statics.shtml (http://www.societyofrobots.com/mechanics_statics.shtml)

And never ever ever do a calculation without a force body diagram!
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 28, 2009, 03:55:28 PM
If your robot is running, you also need to account for dynamic affects -> force = mass * acceleration. For example, if your robot was to jump, acceleration must be greater than gravity. So you'd add static + dynamic force calculations together.

Use this:
http://www.societyofrobots.com/mechanics_statics.shtml (http://www.societyofrobots.com/mechanics_statics.shtml)

And never ever ever do a calculation without a force body diagram!

So for my robot when it's running, it is still static+dynamics?
Also, is acceleration the speed that the whole mass is moving (not just one leg)? or how fast the servos are moving?

And the sum of static+dynamic is equivalent to the amount of weight my robot's servos must be able to bear...right?

So that means that if my planned weight is 500g (just over one pound)...:

weight=torque/radius
torque=radius*weight
torque=3.8*.5kg
torque=1.9kg*cm

But that's the whole body, so 1.9kg*cm/2(since there's atleast 2 legs on the ground at a time)=.95kg*cm which means that standing still, my robot should be able to easily support the weight.

So static=1.9 (I think), then now I need to figure out dynamic...but that's where I get confused with the acceleration...


And as for the force body diagram, I don't exactly know how to make one...so for now, I'm going to have to keep to these calculations :-[
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 29, 2009, 06:41:45 AM
This is similar to the FBD you'd need to draw, its just missing robot weight and ground contact:

(http://www.societyofrobots.com/images/mechanics_staticsmomentarm.gif)

Quote
So for my robot when it's running, it is still static+dynamics?
Yes, but it also depends on how your robot runs. It's also possible that if static force >> dynamic force, you could ignore the dynamics. But really, depends on what running involves.

Quote
Also, is acceleration the speed that the whole mass is moving (not just one leg)? or how fast the servos are moving?
No, acceleration is not the same as speed. ;D

Quote
And the sum of static+dynamic is equivalent to the amount of weight my robot's servos must be able to bear...right?
ya

Quote
then now I need to figure out dynamic...but that's where I get confused with the acceleration...
Just remember that force = mass * acceleration, and that acceleration must be greater than gravity for *all* legs to leave the table surface. If anything, you know your static force calculations are bare minimum.

of potential use:
http://www.google.com/search?q=dymanic+force+calculations+of+a+hexapod (http://www.google.com/search?q=dymanic+force+calculations+of+a+hexapod)
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 29, 2009, 09:38:47 AM
Quote
Quote
Also, is acceleration the speed that the whole mass is moving (not just one leg)? or how fast the servos are moving?

No, acceleration is not the same as speed.

Oops, that's right, acceleration is speed/time^2...I think :D

so depending how fast I want my robot to accelerate, my motors may require more torque...

so if I want my robot to move at around 20cm(8in)/s and get it there in around 5 seconds soooo...

force= mass * acceleration
force= .5kg * 4/s^2
force= .5kg * 16
force= 8kg

then:

torque= static + dynamic
torque= 1.9 + 8
torque= 9.9kg*cm

then:

torque= 9.9/2
torque=4.95kg*cm

which would meant that at those speeds, the servos wouldn't be enough...I think...since I don't know if my calculations are right... ;D
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 29, 2009, 10:31:01 AM
You got your units all wrong . . . for example:

Quote
force= mass * acceleration
force= .5kg * 4/s^2
acceleration is m/s^2

and
Quote
force= 8kg
but kg is a measurement of weight, not force

 :P

I think what is confusing you is that pounds is a measurement of force, but grams is a measurement of weight. What you want is newtons. ;D
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 29, 2009, 02:17:25 PM
Ahhhh...ok

so that means

force=mass * acceleration
force= .5kg * .04m/s^2
force= .5kg * .0016
force= .0008 newtons

Does this seem right?

And to change that into torque:

torque= radius * force
torque= .038m * .0008N
torque= .00304

Would this torque unit be measured in Newton-Meters?

If so, then I'd just have to convert that into Kilogram-centimeters, then I could add it to my results for my static calculations..

I sure hope I'm on the right track! :D
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 29, 2009, 02:20:54 PM
Quote
force= .5kg * .04m/s^2
force= .5kg * .0016
uhhhh what just happened?

Quote
Would this torque unit be measured in Newton-Meters?
yeap

Quote
If so, then I'd just have to convert that into Kilogram-centimeters, then I could add it to my results for my static calculations..
uhhhh both dynamic and static force is measured in newtons ;D

but multiplying the sum of those two forces by the moment arm length, you'll get torque
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 29, 2009, 03:20:18 PM
Quote
force= .5kg * .04m/s^2
force= .5kg * .0016
uhhhh what just happened?
I  *think* I divided .04m by 1 and then squared it... is that how you get a value for acceleration to multiply by mass?

Also, if the value for static must also be in newtons, how would I do those calcuulations?  Just the same as before?
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 29, 2009, 03:31:53 PM
Quote
force= .5kg * .04m/s^2
force=.5*.04 kg*m/s^2

where kg*m/s^2 = newtons

(hope that makes sense!)
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 29, 2009, 09:44:12 PM
Alright! After a good conversation with Admin, I have finally determined that HXT900s are indeed strong enough for my robot :D

To determine how much force I would require for my robot to support itself, I needed to divide the weight of the robot (300g) by the minimum number of legs that would be touching the ground times the length of the leg.

So here are the Static calculations:

300g/2*3.8cm
=300g/7.6
=39.5 Newtons

Convert that to kilogram-force (kgf):
39.5/9.80665
=~4kgf

1 kgf =9.80665 N

To get a torque out of that:

Torque = radius * force
torque = 3.8cm * 4kgf
torque = 15.2N-cm (newton-centimeters) = ~1.55kgf-cm

As I just learned from Admin, kg-cm is an improper unit of torque as kg is a unit of mass, which is why I'm using kgf, a unit of force so kg-cm is really kgf-cm :P

So this shows that the HXT900s are adequate for supporting power, now for the other shoulder servos:

Force = mass * acceleration   |
Force = .3kg * .15m/s^2        } Dynamic Force Calculation
Force = .045N                       |

Torque = radius * force
torque  = 3.8cm * .045N
torque = .171 N-cm = ~.0174kgf-cm

These show that once again the HXT900s are adequate for the robot.

This is only for a normal *walking only* robot, as all the servos in the first set of calculations do is support the robot's weight, and are not trying to make it jump off the ground nor do those servos help propulse the robot in any way. If they were to do that, then I'd have to do another dynamic force calculation for those servos.  ;D


Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 29, 2009, 10:17:01 PM
Quote
300g/2*3.8cm
=300g/7.6
=39.5 Newtons

Convert that to kilogram-force (kgf):
39.5/9.80665
=~4kgf
still not right :P
(you got order of operations mixed up)

I got 0.0057 kg*m, or 0.056 kgf*meters.

0.3/2 kg * .038 m * 9.81 m/s^2
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 05:27:45 AM
Quote
0.3/2 kg * .038 m * 9.81 m/s^2

Why would I need to multiply by 9.81m/s^2? Unless that's because of gravity.

Also, isn't that calculation just for force? Would I have to redo the torque calculation? :P

Now I'm definitely confused, since last night I did these same claculations and you said they were right... :D

Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: SmAsH on May 30, 2009, 06:12:16 AM
yes, you do have to factor in gravity, that's where the 9.81m/s^2 comes in
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 06:55:24 AM
Quote
Why would I need to multiply by 9.81m/s^2? Unless that's because of gravity.
The conversion from kg to kgf is simply multiplying by gravity. In your above calculation you used the more exact value of 9.80665. I'm just too lazy to memorize that value.

Now, your choice of calculations were correct, you just made dumb mistakes like getting the units wrong and mixing order of operations up. Those mistakes followed you from the start :P

for example this:
Quote
300g/2*3.8cm
=300g/7.6
You did 300g/(2*3.8cm) when you should have done (300g/2)*3.8cm

Also, as a general practice for metric, just immediately convert everything to kg and meters so you know if fits to newtons without a problem.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 08:00:17 AM
Ahh...ok then, I get it!

So it is .056kgf, or is it .056kgf-m?
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 08:25:20 AM
Ahh...ok then, I get it!

So it is .056kgf, or is it .056kgf-m?
Well, you multiplied by meters, so you need to have meters in the final solution. Silly :P

Always pass down the units with each calculation, don't try to guess the units after you do all the calculations. Another advantage of keeping track of units is that it acts as a 'dumb mistake' checker. If the units don't match what you expected to have, you messed up. Units also help let you know if you have a solution yet or not.

For example, torque requires lb-in, but if you just have lbs, then you did something wrong.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 09:20:57 AM
Ahh...ok then, I get it!

So it is .056kgf, or is it .056kgf-m?
Well, you multiplied by meters, so you need to have meters in the final solution. Silly :P

Always pass down the units with each calculation, don't try to guess the units after you do all the calculations. Another advantage of keeping track of units is that it acts as a 'dumb mistake' checker. If the units don't match what you expected to have, you messed up. Units also help let you know if you have a solution yet or not.

For example, torque requires lb-in, but if you just have lbs, then you did something wrong.

Ok I understand.

I got 0.0057 kg*m, or 0.056 kgf*meters.

0.3/2 kg * .038 m * 9.81 m/s^2

Does this mean then that the torque on the specs of the motor need to be changed to kgf-cm, rather than being kg-cm?
http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=662&Product_Name=HXT900_9g_/_1.6kg_/_.12sec_Micro_Servo (http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=662&Product_Name=HXT900_9g_/_1.6kg_/_.12sec_Micro_Servo)

I'd multyply 1.6kg-cm by 9.81 to get kgf-cm, right? Or does it just have the wrong unit? I just need to know this so I can compare the torque :P :)
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 09:26:08 AM
The servo specs are probably already kgf, but they just didn't write f there.

The reason I say this is because
Quote
Torque : 1.6 kg-cm
doesn't make sense. Mass multiplied by distance isn't torque . . .

You could email them, but doubt they'll know :P
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 09:30:26 AM
The reason I say this is because
Quote
Torque : 1.6 kg-cm
doesn't make sense. Mass multiplied by distance isn't torque . . .

You could email them, but doubt they'll know :P

Probalby not...

SO I guess that means that those servos won't cut it then...oh well :P :(
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 09:50:06 AM
Look on the bright side, you could have spent the money and built the robot, then found out the hard way it won't work :P

But now that you know the numbers, you can easily find which servos will work. Or perhaps change your design a bit to reduce weight, or maybe add 2 more legs for more lifting force. Etc.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 09:56:23 AM
 ;D Very true, especially with shipping costs and such

Perhaps I could take out that lower platform and instead use velcro for the battery...and maybe start with IR sensors instead of Sonar... :D

Thanks Admin!

And on that note, does anyone know where to buy micro-servos with atleast 5kgf-cm of torque for a very low price? I'm looking more at Hobby City, nut I don't know if I'll find anything :P
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 10:18:10 AM
Quote
does anyone know where to buy micro-servos with atleast 5kgf-cm of torque for a very low price?
You won't find any micro servos at that torque. 76.57 oz/in goes into standard size servos. Also, standard servos cost as much as a micro, just bigger and more torque. Smaller isn't cheaper.

This might help you:
http://www.futaba-rc.com/servos/servos.html (http://www.futaba-rc.com/servos/servos.html)
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 12:07:17 PM
Haha! I maybe have found my solution for affordable price, yet strong torque!

http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=3743&Product_Name=HXT_6.9kg_/_39.2g_/_.16sec_Twin_bearing_servo (http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=3743&Product_Name=HXT_6.9kg_/_39.2g_/_.16sec_Twin_bearing_servo)
substitute these in for the other ones and instead of 2 legs on the ground make it 3:

.515/3kg * .038m * 9.81
=6.4kgf-cm

But I may have an idea to make the robot lighter...but I want an opinion first:
If I only substituted out the servos that support the body, do you think that the robot would be a little awkward

As in the pivoting shoulder remains as an HXT900, since it can easily move the robot, but the other servos are replaced with the ones on the link...this would reduce the robot's weight by about 120g which could allow the robot to carry a small load.

.420/3kg * .038m * 9.81
=5.2kgf-cm (if only the supporting servos were substituted out)
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Razor Concepts on May 30, 2009, 12:11:01 PM
Watch out, those servos draw a lot of amps... you will need to run a 5v-6v battery with good capacity.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 30, 2009, 12:30:42 PM
Quote
If I only substituted out the servos that support the body, do you think that the robot would be a little awkward
If the calculations say it's ok, and it fits the way you like in CAD, then it'll be fine.

The only advantage to using the same servos for everything is potential bulk purchase discounts.
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on May 30, 2009, 11:00:17 PM
There's actually one thing that confuses me (not really, but I find it interesting) is that my earliest static calculations showed the torque would be fine, but these ones contradict those calculations.

weight = torque/radius
weight = 1.6kgf-cm/3.8cm
weight = .42kg*2 (2 being the minimum number of legs on the ground)
weight = .84kg

It's just wierd, but i think my calculations were wrong then, since I made so many mistakes in other calculations, I must have made one there :D
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on May 31, 2009, 07:57:25 AM
Quote
weight = .42kg*2 (2 being the minimum number of legs on the ground)
weight = .84kg
This doesn't make sense.

You want to take the total weight, and DIVIDE by the minimum number of legs on the ground. ;D

And wasn't it 0.3kg before?
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Admin on July 08, 2009, 02:14:01 PM
Just curious - how's the project going?
Title: Re: Calculating Servo Torque-> Quadruped Robot
Post by: Canabots on July 08, 2009, 03:48:53 PM
Well...it is currently dormant.

Because I now know what I need to do and what I should be looking for in terms of servos, I could theoretically build it whenever...

But I haven't done anything much more so far since the servos will cost more than I originally hoped, so I want to save up a bit more until then.

I'll likely resume the project soon, since it's summer  ;)