Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: tanved96 on January 26, 2013, 05:50:13 PM

Title: Effect of PWM on Motor Torque
Post by: tanved96 on January 26, 2013, 05:50:13 PM
I was just reading this page http://www.societyofrobots.com/schematics_h-bridgedes.shtml (http://www.societyofrobots.com/schematics_h-bridgedes.shtml). Here, talking about PWM it's written "that motor torque, under PWM, remains the same whether fully on or only a percentage on. However, varying voltage for speed control reduces torque. So with PWM you have maximum torque yet slower speeds!".

Here's what I don't understand - the torque the DC motor is able to deliver is because of the current passing through it's coils (assume the load to be constant). And in PWM, the effective voltage actually producing the current is lower than that at full duty. So the motor is getting a lower, constant(?) current, due to induction, because of which we get a lower rpm. SO why doesn't it lower the torque generated??
Title: Re: Effect of PWM on Motor Torque
Post by: newInRobotics on January 26, 2013, 10:43:00 PM
With PWM the effective voltage and current are constant no matter duty cycle, because motor is fully OFF, or fully ON. Torque depends on available current only, where RPM depends on available current or amount of time it is ON. What happens is that when motor is ON it resists load (accelerates) and when it's OFF it does not resist load (gets slowed by load/decelerates), hence RPM can be controlled by amount of time motor is ON, while torque stays at max due to max current at ON period.
Title: Re: Effect of PWM on Motor Torque
Post by: tanved96 on January 27, 2013, 05:53:28 AM
Thanks a lot! It's clear now  :)
Title: Re: Effect of PWM on Motor Torque
Post by: Billy on January 29, 2013, 07:17:45 PM
Here's what I don't understand -

No, you understand it just fine.  PWM (on/off ratio) absolutely affects the current (torque), just as you think it does. I don't know where the source material comes from but it re-enforces "just because it was on the web, it isn't necessarily true."
Title: Re: Effect of PWM on Motor Torque
Post by: oscyes on February 25, 2013, 08:52:43 AM
i have been working on my project and i have a problem with my dc motor control , it happens that when i use an h bridge with pwm control for varying my motor speed it loses torque
 
i mean with high pulse width my motor has full torque and speed but when i reduce the pulse width the speed gets slower but also does the torque so i think you were right with yout doubt

how did i know that my motor lost torque?

well i used the motor for raising my robot's arm and when i put low pulse width it cant raise it as it does with fully pulse width and i need to raise my robot's arm at a very slow speed but i cant still do it
Title: Re: Effect of PWM on Motor Torque
Post by: Billy on February 25, 2013, 02:02:00 PM
well i used the motor for raising my robot's arm and when i put low pulse width it cant raise it as it does with fully pulse width and i need to raise my robot's arm at a very slow speed but i cant still do it

To control the speed of the arm using a non-stepper motor, you need to implement a servo loop using a motor sensor and PID (or PI or P) loop in a controller.
The sensor can be an encoder, a tachometer, a resolver, etc. Something that gives indication of motor speed.
The PID in the controller can then modify the PWM signal to keep the arm moving, but keep it from moving too fast.

Do you have a sensor on the motor? 
Title: Re: Effect of PWM on Motor Torque
Post by: oscyes on February 25, 2013, 02:52:35 PM
Hi billy, thanks for your reply
The real question is How can I obtain the max motor torque at low speeds using PWM for controling this speed through an h-bridge like in this tutorial:

http://www.instructables.com/pdf/Control-your-motors-with-L293D-and-Arduino/Control-your-motors-with-L293D-and-Arduino.pdf (http://www.instructables.com/pdf/Control-your-motors-with-L293D-and-Arduino/Control-your-motors-with-L293D-and-Arduino.pdf)

I have tried this but changing each digital input A of L293 by PWM pulses, but when I send max pulse width for moving at high speed the robot arm can raise itself but when I send the pulse width for moving at low speed it can't. I hope you understand me.

Pdta. I haven't put the capacitors in my circuit I dont know what does it do.
Title: Re: Effect of PWM on Motor Torque
Post by: jwatte on February 25, 2013, 03:22:33 PM
You need to add an encoder, so that you know how fast the motor is moving. Once you have an encoder, you can drive the motor using PWM at a high voltage, and modulate the duty cycle so that the motor doesn't move faster than you need it to. As long as the load is within motor limits, the actual current flowing will not be too much, and the motor won't burn out.

In addition to an encoder (so you know how fast the motor is moving) you also need a H-bridge/motor controller that can run at PWM frequencies, and a microcontroller to read the encoder and figure out what PWM duty cycle to use. You are basically building your own servo at this point.
Title: Re: Effect of PWM on Motor Torque
Post by: oscyes on February 25, 2013, 04:11:20 PM
yes you are right is like a servo but im not sure if the servo can have slow speed with high torque

i mean  i need to lift a charge with the same motor (wich have some geared transmision) at different speeds, i am using pwm for varying the speed but when i try to move the motor at a very slow speed it has not enogh torque for lifting the charge

the deal is i need to decrease the speed of my motor without losing the torque so the charge can be lifted

thank you so much for your help =)
Title: Re: Effect of PWM on Motor Torque
Post by: waltr on February 25, 2013, 07:08:52 PM
Do you ever get to run the motor at its fastest speed? If not then you need a greater gear reduction to increase torque while running the motor at a higher speed.
If the motor does run at its fastest speed then you may need a larger motor.

Also, the greatest torque output from a motor is when it is staled and the maximum current is applied.
Study these tutorials to understand motor and motor selection.
http://www.micromo.com/dc-motor-tutorials.aspx (http://www.micromo.com/dc-motor-tutorials.aspx)
Title: Re: Effect of PWM on Motor Torque
Post by: jwatte on February 25, 2013, 09:16:10 PM
 If pwm is tuned right, the motor will be at equilibrium and thus hold the load exactly. A small increase in pwm duty cycle from there will result in a slow acceleration of the motor. If your two options are 'can't hold the load' and 'moves too fast' then you don't have enough resolution in your pwm.
Because the load will be varying, the only way to make this happen is to use an encoder and read the speed and tune a control loop based on this.
Finally, you say 'the servo' - are you thinking of a particular servo? There are many servos available with various speed, control, and power options, typically in the industrial automation and motion control industries.
Title: Re: Effect of PWM on Motor Torque
Post by: oscyes on February 26, 2013, 09:43:15 AM
Thanks for your replies, Now I understand a lot and this url helped me a lot too:

http://arduino.cc/forum/index.php?topic=87473.0 (http://arduino.cc/forum/index.php?topic=87473.0)

The conclusion I have done is:
When you vary pwm duty cycle is going to behave similar to vary the source voltage, when u reduce ur duty cycle then the average voltage in the motor decreases as well, and decreasing too the current passing trought it and afecting the torque the motor can raise.

I have decided to control my pwm duty cycle as much as the motor speed decreases with load for maintain velocity trough a pid control as jwatte  and Billy says.