TL;DR : Can I control a servo's torque by PWM'ing a PWM ?

I'm thinking about buying a dynamixel AX18 and I would like to be control it's output torque.

If I modulate the input command, I expect the torque to be linear to the duty cycle. But I don't know if this would work on a servo, as the gears and it's internal controller might get in the way.

I would like to make a closed loop with a force sensor, in order to control the torque. I would have to identify the parameters of the servo to get the Kt gain.

Is this solution plausible or am I missing something?

  • \$\begingroup\$ I can't see how you could do it without a torque sensor of some kind, unless you butcher the servo and monitor the currents and voltages through the motor. \$\endgroup\$ – CL22 May 13 '15 at 9:20
  • \$\begingroup\$ If I put a force sensor at the end effector, I should be able to measure the torque (knowing the distance). \$\endgroup\$ – nairyo May 13 '15 at 9:25
  • \$\begingroup\$ By Kt gain, do you mean motor constant? \$\endgroup\$ – Adeel May 13 '15 at 9:43
  • \$\begingroup\$ Well not the Kt as in Torque = I * Kt , but a motor constant that'll link duty cycle to Torque like : Torque = Kt * duty_cycle \$\endgroup\$ – nairyo May 13 '15 at 9:46

Easiest way to measure torque is to measure the motor current.

Since you can't do this without disassembling the servo, recognise that the servo electronics will be relatively efficient, so measure the overall current taken by the servo : when active, 90% or more of that will be motor current. (You can subtract the current taken at idle, to improve accuracy if you want).

It would be a good idea to add decoupling across the servo, to ensure that you are measuring the average current rather than the short term high current pulses generated by the PWM controller.

Now, instead of setting the servo value directly to the desired position, you can control the slew rate and thus the torque by gradually increasing (or decreasing) the servo position in small steps until it reaches the desired position, monitoring servo current as you do so.

  • \$\begingroup\$ Unfortunately the internal controller will be using PWM to drive the motor, so the terminal current will not be the same as the actual rotor current. You could work it out if you knew the motor speed, but not very accurately. \$\endgroup\$ – Jon May 13 '15 at 10:44
  • \$\begingroup\$ I'm assuming there is decoupling in the servo, so the mean motor and servo currents are the same. Good point, I'll edit. \$\endgroup\$ – Brian Drummond May 13 '15 at 10:46
  • \$\begingroup\$ So what you're suggesting is to bypass the internal controller ? Because in that case there's no point for me to get a Dynamixel. A regular servo will do it. BTW I thought that the measured current wouldn't be precise enough as there is a 250:1 reduction ratio... That's why I was looking for a force sensor on the end effector \$\endgroup\$ – nairyo May 13 '15 at 11:46
  • \$\begingroup\$ No, I wasn't suggesting bypassing the controller, but the question doesn't make it clear that this servo doesn't follow the normal protocol. This servo appears to have torque control and "load" i.e. curent monitoring built in. Won't that do what you need? You haven't specified what "precise enough" is. \$\endgroup\$ – Brian Drummond May 13 '15 at 12:18
  • \$\begingroup\$ The torque feature is only for higher end servo's, not for the AX18, and it's not that good apparently. a 10mNm is what I'm aiming for. I was trying to get this with BLDCs and FOC but am looking for a easier way to do it. \$\endgroup\$ – nairyo May 13 '15 at 12:48

Unfortunately the internal controller will get in the way. This sets the motor torque to whatever is required to move the output position to the position you instruct it to go to using the duty cycle input (the input is simply a command to move to a certain position).

The simplest way to measure the torque is to measure the motor current, as this is directly related to torque output. Note, however, that this is unlikely to be equal to the actual torque going into the load, as the motor must generate extra torque to overcome the gearbox (and its own) inertia and friction, which can be substantial. If you need something more accurate than the only practical way is to use an external torque sensor.

One way to do this would be to mount the servo in a gimbal and then use a load cell to measure the reaction torque.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.