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?
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.