Different Ways of Calculating Instantaneous Torque From a Servo

J

Thread Starter

John Alperto

Hi everyone,

First, I apologize if this (long!) question is a bit ignorant/dumb.

I am working on a project that is using a servo to move a mounted rod back and forth (I'm currently moving it from 0 to 90 degrees-but the angle will change every time). What I am interested in is finding a way to calculate the instantaneous torque of the rod (or servo, I guess). While the rod is moving, there are times at which a force acting against the motion of the rod is applied, which is why the torque won't remain the same between each experiment (its actually going to be a person pushing against it-each time with differing levels of force). I am using a powerful, 200 oz.in servo with a 3:1 gear ratio, which means that the servo should push through most forces acting against it while moving at the same speed. I currently have 2 ideas to calculate the torque:

1) I expect that when a greater torque is necessary, the servo should draw more current. I know that power (P)=torque (t) *angular velocity (v). If I keep the voltage and velocity (relatively) constant, then the torque should be mostly proportional to current, right? The problem is that I'm using a current sensor, and the current is being output in the form of a square wave. I'm not sure how to quantify this at all.

2) I can use accelerometers or some type of other sensor. I also know that torque=I (moment of inertia)*angular acceleration (a). However, I have no idea on how I would practically implement such a sensor or if it would even work. While doing research it seems that these sensors are only capable of measuring linear acceleration, but the rod is actually rotating.

I tried doing a ton of research online but surprisingly couldn't find anything. Some have said to use something called a "torque constant", but I am using a hobby servo and this information isn't provided. Does anyone have any ideas here, or am I completely misunderstanding something? Which idea is better, or easier to implement?
 
W

William Sturm

With a typical industrial servo drive, there is usually an analog output available proportional to motor torque. With a hobby servo, this data may not be available. You could either select an industrial style DC servo drive and motor or add some type of external torque sensor, as you have indicated. A current sensor with an analog output signal could work, but you will need to calibrate it and I don't know if it will attain the required accuracy. The most direct solution might be some type of rotary force or torque sensor. It could be as simple as a load cell on a pivot arm or as sophisticated as a inline rotary torque transducer.
 
J

John Alperto

Unfortunately I'm on a budget, and can't afford a rotary torque transducer (everything I've seen is over $1000). How would a load cell work? I'm not familiar with them. Are they decently accurate/inexpensive? Also, do you think the idea of using an accelerometer/gyroscope and measuring the acceleration somehow isn't valid?
 
One way to calibrate the current against the torque is to mount the servo on a horizontal axle so that the servo body is free to rotate in a vertical plane in response to the reaction. Fix the body to a known mass on a radius arm and use an accelerometer to measure the angle of the radius arm to the vertical. The body and radius arm will rotate until the arm is at an angle where the torque on the mass and arm matches the reaction torque - the accelerometer will allow you to find the angle (or you could use a visual system with a protractor). Torque = m x g x r x sin(phi), where phi is the angle from the vertical of the arm.

I've done this with a larger system to find the torque developed by a washing-machine motor. It may also allow you to get dynamic readings on the go.
 
W

William Sturm

I guess if you know the motor torque and the mass of the arm, then F=MA + Torque. Or just F=MA with motor torque simulating mass. I think you still need to add in the motor torque. Measuring force with a load cell or possibly even a weigh scale with analog or serial outputs is more direct and catches all terms in one device. It seems to me that acceleration alone will not be very direct, but maybe it could work.
 
Hi Bruce,

Honestly, what you're suggesting may be a great idea, but I'm having a hard time visualizing and understanding it. Firstly, after mounting the servo to an axle (where would I find such an axle? Or are you saying to basically mount the servo to a vertical wall?), what type of "reaction" am I supposed to apply? In my system, the force that opposes the motion of the servo isn't always the same in magnitude (I think I'm misunderstanding what you mean by "reaction" and "reaction torque"). Also, does the length and mass of the radius arm factor in? And for the known mass, should I have it attached to the arm, or hanging from it? I'm also confused about your suggestion to use an accelerometer because I thought they measure acceleration, not angle (I'm guessing you want me to place it on the radius arm).

I guess I'm mostly confused about what we're really trying to achieve here. How is current "calibrated"? I also fail to see how this technique can be used in systems where a servo is simply moving back and forth in a horizontal plane while accommodating dynamic torques (my system). Sorry if the questions I'm asking are dumb, I'm really new to this stuff.
 
Well I'm not sure if even I know the motor torque? As for using a load cell, I think I'll do some research into it tonight and let you know what I think. I'm not sure how something like that can be implemented in my system though. Are you saying to have a load cell to measure the applied force acting against the servo?

I should note that I'm using a hobby servo and the data sheet does not provide a lot of information.
 
If a motor is driving a load and developing torque on a shaft, the same torque (but in the opposite direction) is exerted on the motor mountings. (To every action there is an equal and opposite reaction.) Put a small motor on a desktop without holding it down, and both rotor and stator will spin in opposite directions.

If the motor is mounted on springs which compress under load, you will see the springs on one side compress more than those on the other as the motor is loaded. The difference in the compressions is exerting a restraining torque on the stator. You could use this differential compression to estimate torque. However, if the stator torque acts to rotate a lever arm, the rotation depends directly on the torque and can be measured easily and cheaply using a simple accelerometer chip.

In my system, the motor assembly is supported by a bearing on the output shaft, mounted horizontally. Instead of bolting the stator to a fixed surface such as a wall, it is fastened to a plate carrying the level arm and mass. The torque needed to restrain the stator comes from the effect of gravity acting on the lever arm. Since for the system to be in equilibrium, the stator restraint torque must equal the airgap torque which must equal the load torque, the restraint torque will match the mechanical torque applied to the output shaft. If the rotor is accelerating or decelerating, there will be a mismatch between the two - the significance of this will depend on the acceleration and the moment of inertia of the various parts.

I hope that helps - if not, let me know an email address and I'll send you a sketch or some photos.

Cheers,
Bruce.
 
Bruce,

I've tried studying your post extensively, but yes, unfortunately I'm still having trouble understanding and visualizing what you're saying. Are you proposing I abandon the idea of using current at all? I also don't understand all these different types of torques you're referring to, and couldn't find anything online to help.

Using spring compression is an interesting idea, although again I can't visualize how to implement this or translate "measurements" to numerical values. I also question its accuracy, but don't know much to be honest.

My system is simply moving a rod back and forth, ~90 degrees each time. It is a simple rotation, as I think you're implying. I'm definitely hoping an accelerometer might work, but would be very interested in measuring torque in more than one way to validate what I'm reading.

My email is [email protected]. I could send you pictures of my own system so you get a better idea too (although my feeling is you understand me completely). Lastly, let me say how it awesome it is you're willing to go so far to help a stranger. You're awesome :)
 
Remember that "every action has an equal and opposite reaction". In this case, the action is a torque rather than a linear force.
If a load requires a torque to drive it against some sort of resistance, the motor drive shaft will provide this. The torque the motor is developing comes from the interaction between the magnetic field and the motor windings in the airgap. If the magnetic field is constant, the airgap torque is proportional to the current.

But the reaction to the airgap torque on the rotating parts also acts (in the reverse direction) on the stator. You can see this by taking a free-standing motor and applying power to it - the motor body will rotate in the opposite direction to the shaft. (This is quite safe with a small toy-type model - don't try it with anything large!) It is also the reason why helicopters have a tail rotor - if the drive to this fails, the main fuselage will start to rotate in the direction opposite to the main rotors.

In turn, the stator will exert a torque on its mountings. This torque must be the same as that applied to the load, provided the shaft is rotating at a steady speed. So by measuring the various forces applied to the motor mounting, the torque developed by the shaft can be calculated.

In a dynamic situation, when things are changing, the steady-state balance must be amended to consider the acceleration torque - this is:

T = I dw/dt (where I is the moment of inertia, and w is the rotating speed).

My suggestion is for you to set up some sort of rig to measure the torque on a testbed by measuring the reaction torque on the motor mountings in some way, at the same time measuring the current drawn. You can then prepare a calibration curve or equation relating the developed torque to the current drawn. When carrying out your tests, you can measure the current and use these values to infer the torque applied to the load.

All this applies to a freely-rotating motor, but something similar will apply to a servo. In this case, the torque will be needed to maintain the motor position against the applied load torque. By setting up a system where you can apply a known torque to the servo output, and again measuring the current drawn by the servo, you should be able to relate the developed torque to the current.

Note that for a standard RC-hobby type servo, you need to measure the current in the main power lead rather than the control line -the control signal will be a square wave at about 50 Hz with a pulse varying between 1 and 2 ms usually.

I've made up a couple of rigs showing what I meas and will send you some photos.
 
Reply:

1. Your approach of measuring torque through current is correct. You want to measure the current which is square wave. That means you are having pwm drive.

2. Let us say the pwm frequency is around 1-KHz (for example). The mechanical system frequency will be of the order of 10-Hz (normally). So you need to introduce a low pass filter of 10-Hz. If you use a simple R-C filter, of 10-Hz bandwidth, at pwm frequency it will have attenuation of 1/100. That may be good enough for you to estimate the torque.

3. Hobby motors may not give torque constant. It can be measured by simple experiment. So after getting current you have to convert it to torque.

With best wishes
Nandakumar
 
> 2) I can use accelerometers or some type of other sensor. I also know that torque=I (moment of inertia)*angular
> acceleration (a). However, I have no idea on how I would practically implement such a sensor or if it would even
> work. While doing research it seems that these sensors are only capable of measuring linear acceleration, but the rod
> is actually rotating.

"...but the rod is actually rotating." You said that. If it is rotating, its rev/sec must be proportional to their current consumption, hence - by reading their difference Delta (before and after I increment) - you will have a sense of its angular velocity acceleration. My understanding. Hope it helps (not for nothing, all these years as a plumber!).
 
Top