Robot Leg Torque Tutorial

Thanks once again Mr Benson for your prompt response. Just came across your forum whilst surfing the web for a better formula.
Indeed, I built a 1.8 kg homemade hexapod a couple months back using 18 dirt cheap TowerPro MG996R servos.
At that time I did a pretty straight forward diagonal torque calculation based on the MG996R which is specced circa 10kg/cm stall torque at 4.8V
My link (L2) from Coxa joint to kneel is 12 cm and the link (L1) kneel joint to foot tip is also 12 cm. The squareroot of L1+L2 is also 12 cm.
Thus, 10kg/cm specced torque of the servo * 3 legs on the ground / 12 cm gives me 2.5 kg/cm torque.
Theorically it should support a 1.8 kg robot me think. The bot could lift, walk, dance without problem, but unfortunately I have to replace a coxa servo (W2) every few days. The servo’s internal electronic circuit fried. I was wondering whether my calculation was wrong or the TowerPro is worthless. I tried to shorten the diagonal length by positioning the legs nearer to the chassis to diminish the stress of the coxa servos (W2), it seemed a little better but not the result expected.
Yep, quality has a price. The TowerPro needs a lot of soft tuning to compensate its lack of angular positioning precision. Dirt cheap but a hassle tho. I won’t go for it again if I were to build another bot. Mr Benson, do you have any recommendation for me ? Thanks in advance.

@Samsara As you’re aware, you’d need more powerful servos, which almost always require more current, thus a more powerful battery. The hexapods produced by Lynxmotion weigh around 750g to 1Kg and the leg and body dimensions are kept minimal, but not to the point where they impact the aesthetics. When in doubt, reduce the lengths and weight and beef up the servos. The battery capacity affects weight and if you can get away with using something lighter (but which can still provide the necessary current), all the better.

Merci pour le tuyau. My 1.8 kg does not include battery. The bot was plugged via a switch which has 3 5VDC output terminals at max 40amp each, and each terminal fed 6 servos. So my servos burnt-out could not be resulted from a voltage drop me think.
I haven’t yet have the time to consider bout the battery due to the relentless burnt out issue. I was so discouraged that the bot was actually chucked in a corner of my garage. Let say that I have to install a Lipo 7.4v 25C 3200Mah battery + some stepdown regulators, the bot would sum up circa 2 kg.
Firstly when mood returns I would follow your advice to reduce the lengths and weight to see how the thingy behaves. I still have 1/2 a dozen MG996R to burn. lol…
(I’m currently living in SEA, chinese stuff can be paid with a slice of bread). When I have depleted my servos I would deffo come back to you again. I would like to rebuild a better bot this time. I am interested in yr HITEC 645MG, RB-LYN-309 chassis, C brackets, LYN-314 legs and the SSC-32 controller (currently the bot has an Arduino Mega2560). Thks again and have a great day Mr Benson.
Ciao a bientot.

Hi Mr Benson, I have shorten considerably the limbs and reduced weight. Now the bot weight circa 1.5 kg (if my wife’s weight watcher scale can be trusted).
Test run for a week (half an hour or more non stop gait per day), the bot seems holding, no burnout so far. Servos are no even warm when touched. Cross the fingers! I think it’s time for me to give him a battery. I searched for lipo battery on your website, and various power are proposed. I am not sure which one is suitable
for my application. I was thinking bout a 3600Mah (25C) 7.4 or 11.1v but I also need a voltage regulating device to stepdown to 6V for the servos. Please help. Thks in advance.

I think I should not post in this column. It’s about Torque tutorial, not other issues. I am so sorry.
Could admin please move my posts to appropriated column ? Thks

@Samsara Don’t try to power an RC servo using a LiPo - it’s most likely out of the servo’s operating voltage range and will cause damage. Stepping down to 6V is an option, but the advantages of the LiPo (high discharge current) are significantly reduced.

@Samsara Since your question relates to a walking robot, we can keep it here.

Hi Mr Benson, Just returned home from a break. Thks for accepting my posts in this column.
TBO, I am lost! This is my 1st bot, I just don’t know how to power the thingy.
MG996R looks like an ogre in terms of power consumption:
Operating voltage: 4.8 V - 7.2 V / Running Current 500 mA – 900 mA (6V) / Stall Current 2.5 A (6V)
If I average out an optimized 750 mA at normal running condition I would need 13 amps for the 18 servos (Extrapolation: assume that all the servos are energized at a given moment). I saw 2 conventional 6V Nimh packages in robotshop.com; The RB-STA-11 (10000mAH/2C) might be powerful enough but a heavy weight 830-ish grams. This will crush my bot to the ground, hahah… Another one the RB-STA-08 (2800mAH/2C) < 300 grams, but unfortunately, “if my calculation is correct”, will not
be able to handle the load. 2800mAH/13amp=12.9 mins to drain out entirely the battery pack. Moreover 2C max discharge rate can only provide 5.6 amps for a very short period, thus far from the 13 amp I have needed. How do other robot enthusiasts power their hexapod ? Any hints for me ? Thanks in advance.
Have a great day.

@Samsara As a first robot, a legged robot is quite complex. If you need higher current, you need to go for LiPo, but that would also mean using a higher voltage servo. The other way would be to use two smaller capacity NiMh batteries (one for the left side, the other for the right side).

I notice you assume the linkages to be weightless - this would surely make your calculations a little undervalued?
Also have you any good approaches to calculating the additional torque when moving?

@Dillon Correct, though ideally the linkages are only a small fraction of the weight of the actuators themselves. Terrain adaptation is not easy, so unfortunately we do not yet have any suggested equations. If you assume a flat surface, T3 and T4 should remain roughly constant, so it’s a question of the three legs pushing the body forward (T5 and T6) and up an incline.

So, I am using an aluminium frame for my hexapod, and MG996R servos for the actuators (which are, quite frankly, a bit rubbish) - I ended up including the mass of the leg linkages in my calculations to work out the Torques also - and worked out the COM on the tibia linkage as it is asymmetrical

The bot I’ve now built weighs around 2.4kg. when I work out the torques around the leg joints using your equations, with the additional linkage forces included, I get results that seem a little on the small side - for the knee joint I’m getting around 0.146 N.m and for the hip joint I’m getting around 0.007N.m
I’ve been over your method and it seem right to me - and it does look as if the torques cancel each-other out more with the hip joint, with it being more central, but my intuition and observations lead me to think the servos are working harder than this result would indicate. - the sevos claim a stall torque of 12kg.cm or 1.18N.m

I also built a FBD in Autodesks online ForceEffect and output a report - the normal reactions at the feet matched the results I got numerically, but the torques at the joints were quite different - though I’m not sure what algorithm they are using to get those results!

Incidentally I’m using an 11.1V LiPo battery, but stepping it down with a couple of 15A (switch mode) buck converters to 6V

Hello again. I’ve also calculated the torque on the hip when the leg is in swing mode, setting the two angles at 45 - when in stance I get 0.007 N.m but I get 0.056 N.m in swing - could that be right? What is confusing me is that I would expect that the servo is doing more work when supporting the body

update: well, I worked out where I have gone wrong - rather than balancing the torques across the the whole system - to get the load torque at the left hip for example, you analyse it from it’s fixed point on the body, looking left, balancing the moment ar the left tarsus or foot

So consider for this example that the fixed point is to the body, and the normal reaction at the foot is the load on the joint

So - the load torque at the left hip is ((L1 cos(theta1))+(L2 cos(theta2))) * N1 - Correct?- (meaning also that my servos are hoplessly underpowered!)

@Dillon MacEwan Each servo weighs 55g, so 18 would be 1Kg. It sounds like your mechanical frame is greatly overweight. Using an 11.1V and stepping down to 6V seems rather inefficient as well. Regarding the files, please note that unfortunately it is beyond the scope of this article to offer individual / personalized support / consultation.

@Dillon You would need to explain the calculations / equations you used. Feel free to create a new topic on the RobotShop Forum.

@Dillon For a 2.4Kg robot, the servos you are using do seem quite under-powered.

Using a switching (buck) power converter claims >90% efficiency for power conversion

The frame is lazercut aluminium and comes to around 900g

The battery is 200g, and the rest is just the controllers, cables fixings and sensors

I think it would help in the tutorial if you showed that the torque on the hip was just the N1 normal force times the horizontal distance of the foot from the hip
((L1 cos(theta1))+(L2 cos(theta2))) * N1
Likewise for the knee:
L1 cos(theta1) * N1

This greatly simplifies the calculations for working out the servos needed for a particular configuration

Sir, could you please upload a video explaining all these things, so that we can understand better ?
Please include the explanation for derivation of the equations.
How do we take the angles Theta 1,2,3 ??

@Goutam Unfortunately a video in the near future will not be possible. We do hope to work on the automatic tool this coming year. We have tried to include the basics of the equations, so if you need additional insight, we suggest learning about the concept of torque. The angles are dynamically calculated based on your walking gait and inverse kinematics (not covered in this article).