Basic understanding of the motors torque and programming with Arduino.

Hi guys

I hope you have time to take a look at my calculation and tell me if this is possible to achieve.
I have to make a project, where I have to rotate an object which will resist more and more to the rotation. The protocol is:
Rotate the object with a torque of 5 Nm until the resistance becomes too large and the rotation will stop – now take a picture of the objects position.
Do the same thing with torques of 10, 15, 20, 25 Nm.
Since we have to do this approximately 1000 times, I would like it to be as automatized as possible.

I´m thinking it should not be a problem to program the motor through an Arduino Uno, but I’m not quite sure how I program the motor to stop at a specific torque.
I´m thinking to get 5 Nm of torque:
I found these two formulas:

1. Power (kw) = Torque (Nm) x Speed (RPM) / 9.5488
2. I (A) = Power(kw) x 1000 / (n x U) = , where n is the motors efficiency
I have not used motors before, but I believe you can adjust the speed (RPM) and the current applied to the motor through Arduino? Will the voltage be steady throughout the process, if I i.e. get at 12 V motor – or will it change? (Then my calculation won’t work)

So if I want a torque of 5 Nm and I set the speed of 20 RPM can I then do this:

1. Power (kw) = 5 Nm x 20 RPM / 9.5488 = 0.01 kw.
2. I (A) = 0.01 kw x 1000 / (0.9 x 12 V) = 0.93 A
So, I´m thinking I can just program the motor to run at 20 RPM and gradually increase the current from 0 to 0.93 A, and when reaching 0.93 A the motor will stop for 5 seconds (to take the picture) and then rewind back to the starting position before starting over?

I guess there is a problem with the motors efficiency (n) and friction and perhaps other variables, but it is not the most important that the motor exactly performs 5 Nm or 4.8 Nm for that matter – the important thing is that is gives the same torque each time.

I hope you can clarify if I can do this, and your welcome to comment on obvious error or problems I can run into.

Kind regards
Kasper

Basically you are right and our formulas are correct but using formulas as a shortcut to understanding is a dangerous path because often reality is more complicated than a formula will have you to believe.
The problem here is efficiency. Think of these two cases:

• A motor is stalled. It has a large torque but no speed. Hence its mechanical output is zero and its efficiency is zero
• A motor is free running without delivering torque to a load. The speed is high but the torque is zero, hence the mechanical output and efficiency is zero.

This is true for all electrical motors no matter of type. And this leads to the conclusion that all motors have an efficiency maximum somewhere between stall and free running. Or expressed otherwise, a motors efficiency is a nonlinear function of speed or torque. It is here that different types of motors differ from each other. A brushed DC motor (which i believe you are reffering to) has its maximum efficiency at about 70%-80% of its free running rpm.
On the good side is that its torque is pretty much a linear (but not proportional) function of motor current.
I do not understand what you mean by this:

So, I´m thinking I can just program the motor to run at 20 RPM and gradually increase the current from 0 to 0.93 A, and when reaching 0.93 A the motor will stop for 5 seconds (to take the picture) and then rewind back to the starting position before starting over?

Torque, speed and power are interrelated. A load demands a certain torque in order to spin at a certain speed. If the motor has enough power to deliver the product of speed and torque it will reach that speed, otherwise not.
What you have to do in order to achieve what you are describing is the following:

• Have a motor with a programmable controller that can keep a constant rpm or a variable voltage source and some means to measure the rpm and adjust the voltage source manually in order to keep the speed constant
• Have a a variable load such as a mechanical or eddy current brake. There are brakes that have torque measurement but these are quite expensive.
• If you want to measure torque trough the motor parameters the best thing is to measure current. If you have a graphic over the motors performance parameters it helps.

I had much the same concerns, but perhaps from a less educated point of view as @nilton61.

I can’t imagine any method to reliably know what torque is being provided just by measuring the input to the motor. And to make things more complex the motor will probably be controlled with a PWM power supply so that measuring the input would be a challenge in itself.

I think if you want to test something with a specific torque you will need to make a mechanical device that presents the appropriate torque and drive it with a large motor that can easily supply the maximum torque required. Think, for example, how a torque-wrench works.

Or maybe you could put a flexible coupling between the motor and the load with a strain-gauge on the coupling which could be read by the Arduino? (a more sophisticated version of the torque wrench).

Or (maybe simpler) perhaps you could mount the test piece in a cradle that can rotate against a spring balance or a load cell. That is often how dynamometers are constructed. It has the advantage that the measuring instrument does not have to rotate.

…R

Hi Nilton

Thank you for your quick reply, this helped me to understand it a bit more!
I will try to explain what I need a bit better.

Yes, I am thinking of a DC-motor: DC Gearmotors | DC Gearmotors | Electric Motors | www.surpluscenter.com

I do not understand what you mean by this:
Quote
So, I´m thinking I can just program the motor to run at 20 RPM and gradually increase the current from 0 to 0.93 A, and when reaching 0.93 A the motor will stop for 5 seconds (to take the picture) and then rewind back to the starting position before starting over?

The object I´m affecting by the motor is getting more and more tight the more I´m rotating it. Therefore I would like to take pictures of the positions of the objects at different torque levels, to see how much it moves in relation to the torque.

It´s probably because I don´t completely understand which parameters you can adjust on the motor.
The above mentioned motor has much more torque than needed for this setup. What I´m not sure about is; From my calculation I assume that if I program the motor to run at 20 RPM, but only feed it lets say 0.001 A, I believe it would develop almost zero torque ?
If its possible I would then just slowly increase the amount of amps to 0.83 A, since this should be equal to a torque of 5 Nm, and since the motor is so powerful, I guess it could easily maintain the same speed of 20 RPM? Can I through programming increase the amps gradually from 0 too 0.83 A - and will the voltage change at any point or be steady at 12 V.
At the point, when the motor is feeded with 0.83 amps, it should automatically turn off, so we can take a picture of the setups position. After the picture is taken the motor should run backwards to the starting position and thereby loosen the object.

I guess I could test the system by adding a torque wrench adapter, which could display if the measurements were close to what I expected.

Kind regards
Kasper

Robin2:
I had much the same concerns, but perhaps from a less educated point of view as @nilton61.

I can't imagine any method to reliably know what torque is being provided just by measuring the input to the motor. And to make things more complex the motor will probably be controlled with a PWM power supply so that measuring the input would be a challenge in itself.

I think if you want to test something with a specific torque you will need to make a mechanical device that presents the appropriate torque and drive it with a large motor that can easily supply the maximum torque required. Think, for example, how a torque-wrench works.

Or maybe you could put a flexible coupling between the motor and the load with a strain-gauge on the coupling which could be read by the Arduino? (a more sophisticated version of the torque wrench).

Or (maybe simpler) perhaps you could mount the test piece in a cradle that can rotate against a spring balance or a load cell. That is often how dynamometers are constructed. It has the advantage that the measuring instrument does not have to rotate.

...R

It sounds like its almost impossible to do as I thought was possible
I have also been thinking of using as you said a torque adapter like this: USAG 814 A - Torque-angle digital adapter - YouTube
Then I would mount the motor I talked about to the adapter and read the torque, and stop the motor when reaching 5 Nm.
If I slowed the motor down to running very slow, I believe I could hit i.e. 5 Nm pretty precise.
What are your thought on this method?

Do you guys think, that it is possible to get the feedback from the adapter to your computer? In this way perhaps you could couple the adapter to the motor through Arduino to stop the motor at the exact time the adapter reaches 5 Nm.

Kind regards
Kasper

Forget about power and speed, its very simple, a DC motor's torque is directly
controlled by the current (basic physics, F = BIl) - output torque is proportional
to the current (less a little for friction).

You thus need to be able to control current, for which there are several approaches:

1. Programmable constant current circuit - analog approach is conceptually simple but
very power inefficient - no good except for very small motors - 5Nm suggests quite
a big motor (well, depends on the gearing of course).

2. Measure current and control the motor PWM using a PID loop sensing the current.
Efficient, needs a little care in practice (a low-noise current sensor will perform best,
ie not hall-effect)

Confounding issues are mainly friction - especially if using gear-train, since there
is mechanical hysteresis and non-linearity to worry about. Calibration of your motor
(+ gears?) is needed to find its motor-constant (Nm per amp)

MarkT:
Forget about power and speed, its very simple, a DC motor's torque is directly
controlled by the current (basic physics, F = BIl) - output torque is proportional
to the current (less a little for friction).

You thus need to be able to control current, for which there are several approaches:

1. Programmable constant current circuit - analog approach is conceptually simple but
very power inefficient - no good except for very small motors - 5Nm suggests quite
a big motor (well, depends on the gearing of course).

2. Measure current and control the motor PWM using a PID loop sensing the current.
Efficient, needs a little care in practice (a low-noise current sensor will perform best,
ie not hall-effect)

Confounding issues are mainly friction - especially if using gear-train, since there
is mechanical hysteresis and non-linearity to worry about. Calibration of your motor
(+ gears?) is needed to find its motor-constant (Nm per amp)

Hej Mark

That sounds good. I dont understand if the power efficiency is an issue or not? The motor I have found can output about 90Nm as torque, so I guess its not a small motor.

Am I understanding this correctly:
I use i.e. a torque adapter to measure how much current the motor needs to make a torque of i.e. 5 Nm, lets say 1 amp. Then later I can just power the motor with 1 amp, and the torque should be 5 Nm.
Is it pretty straight forward in Arduino to change the supply of amps from i.e. 1-2-3-4 amp, when I want the motor to perform different torques?

Thank you so far for all the replies guys.

Kind regards
Kasper

Kapper86:
I use i.e. a torque adapter to measure how much current the motor needs to make a torque of i.e. 5 Nm, lets say 1 amp. Then later I can just power the motor with 1 amp, and the torque should be 5 Nm.

I would be very doubtful about the repeatability of that method. I think you would need to do a lot of carefully monitored testing to prove it.

Using an external measure of torque seems far more straightforward to me. But I am not an expert.

...R