DC Motor torque control

Hi,
I'm new in this forum. I'm a mechanical engineering and I've to control the torque of a DC motor with arduino. The project I have to do is to impose (as input) the rotation of the rotor by an external force (such as firstly an hand), than read by an encoder the position and calculate (with my algorithm) a reference torque, than apply this torque to the motor.
What I though to do is to apply a calculate (reading the current) potential difference with the PWM.
Is that correct?
Thanks

When the user is turning the motor you would have to have to measure the RPM of the motor. The H bridge driving the motor would be set in "brake" mode as this is occurring. The RPM would then be proportional to the torque. You would then have to calculate, based on that RPM and previous calibration, how much current should be supplied to the motor to create an equal torque.

Correct me if my physics are wrong here.

I'd avoid using your hand for testing. A simple, reliable method would be to put a spool on the motor shaft with a string wrapped on it and a heavy object on the end of the string. The falling object would provide a consistent torque as it unwound the spool / spun the motor. And of course you can calculate the real torque by measuring the radius of the spool and knowing the weight of the falling object. You can also verify your torque calculation is correct if you can raise that weight at the same speed.

well if you calculate the torque X when the object is falling, you would need 2X the other way to raise it at the same speed,
because you would be having to overcome gravity as well.

ingNik:
Hi,
I'm new in this forum. I'm a mechanical engineering and I've to control the torque of a DC motor with arduino. The project I have to do is to impose (as input) the rotation of the rotor by an external force (such as firstly an hand), than read by an encoder the position and calculate (with my algorithm) a reference torque, than apply this torque to the motor.
What I though to do is to apply a calculate (reading the current) potential difference with the PWM.
Is that correct?
Thanks

well, electric motors usually develop maximum torque at 0 rpm. You could attach a torque arm with a measured weight (including the shaft weight) on the end to the motor shaft. Start PWM to the motor and measure the displacement of the shaft weight to the side. This would result in a torque value such as inch ounces (also add the torque value of the shaft). Measure the developed torque at incresing PWM values. If this has to be done at various RPM, then the motor housing would need to be put in bearings and the torque arm attached to the motor housing instead of the shaft.

If you have a means of measuring the motor current then you can directly monitor (theoretical) torque since this
is proportional to current (ignoring friction, magnetic saturation etc). Thus by monitoring current and adjusting
drive PWM you can set a given torque.

Note that you have to measure average current if using PWM since the current will oscillate about an average.

Thanks you all. Well, if I will use the arduino motor shield r3, I will be able to measur the current directly and than controll the torque by the PMW. Right?

good info,well if you calculate the torque X when the object is falling, you would need 2X the other way to raise it at the same speed,

A method of "braking" a motor is to attach a DC motor (to act as a generator) to the shaft. Then you can electrically load the generator to produce whatever braking force you require. It's simple and it works !

MarkT:
If you have a means of measuring the motor current then you can directly monitor (theoretical) torque since this
is proportional to current (ignoring friction, magnetic saturation etc). Thus by monitoring current and adjusting
drive PWM you can set a given torque.

Note that you have to measure average current if using PWM since the current will oscillate about an average.

How do you adjust the drive PWM depending on the measured current?