I am using MDS40A motor driver(http://www.cytron.com.my/viewProduct.php?pcode=MDS40A&name=SmartDrive40) to drive a power window motor (12V, brushed motor) similar to the one at (http://www.cytron.com.my/viewProduct.php?pcode=MO-PW-R&name=Power%20Window%20Motor%20%28Wira%29%20-%20Right). I am using PWM generated by Arduino to control the speed of the motor. As I use lower value of PWM to get slower speed (the current gets reduced as well), the torque of the motor is drastically reduced. I am using Arduino Uno.

What I have understood is that with PWM, the voltage and current are not affected by the duty cycle. Torque depends on available current, while RPM depends on available current or amount of time it is ON. When the 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.

I want to decrease the motor speed without losing the maximum torque. Can anyone help me on this? Can it be done with code?

  • \$\begingroup\$ In addition to that, I used a 12V Lead Acid battery. The output current is only about 0.6A at max. I think this could be a problem as well. Should I replace the battery with another type? I have read that Lithium Polymer (LiPo) battery has a higher output current. Can someone advise me on this? I have made my hardware prototype. To add a gearbox would complicate the design. Is there any coding/programming method that I could give a try? \$\endgroup\$
    – Robert
    Jun 20, 2013 at 16:47
  • \$\begingroup\$ The cytron motor you linked has got a gearbox - it also has a full load current of 7A and a stall current of 20A - now what does that tell you about the battery you are using! As far as I know the only way to keep the torque high when loads try to reduce the speed is using ampere feedback using a series resistor to "up" the drive volts accordingly. \$\endgroup\$
    – Andy aka
    Jun 20, 2013 at 18:06
  • \$\begingroup\$ What are you trying to do? If you're trying to maintain a set speed (regardless of the load) you could use feedback. \$\endgroup\$
    – Skaevola
    Jun 20, 2013 at 20:05
  • \$\begingroup\$ Dear Skaevola, I have built a lower limb exoskeleton and I am using IMU as my sensor of choice. I am placing the sensors on my right 'good' limb to get the data. With the data (angle), I am moving my left 'bad' leg. I am also placing the IMU sensors on my left 'bad' leg to get feedback. Lets say my right 'good' leg moves forward, the data is captured and the motor rotates my limb according to the data captured. To achieve this, I need to lower the speed without losing the torque. \$\endgroup\$
    – Robert
    Jun 21, 2013 at 3:17
  • \$\begingroup\$ If you think the battery is part of the problem, add a link to it. Lead acid batteries in general can supply high currents; however those tend to be heavy. Look at "flight packs" - batteries for electric (RC) model aircraft - they tend to use (or abuse) smallish NiCd batteries at very high currents - sometimes 30 Amps or more. \$\endgroup\$
    – user16324
    Jun 21, 2013 at 7:40

4 Answers 4


You seem to be confused about what you want. If you want to decrease the motor speed, but you still want maximum torque, then you must apply full rated electrical power to the motor, and put a mechanical brake on the motor until it slows to the speed you desire. Or, you must somehow make your motor less efficient. I don't think that's what you want.

Think of it this way: electrical power is the product of current \$I\$ and voltage \$E\$:

$$ P = I E $$

Mechanical power is the product of torque (\$\tau\$, in newton-meters) in and angular velocity (\$\omega\$, in radians per second):

$$ P = \tau \omega $$

A motor is an electrical to mechanical power converter. The mechanical power always equals the electrical power after losses.

Furthermore, current is proportional to torque, because the more current you apply, the stronger the magnetic field inside the motor, and the attraction between the motor's poles becomes greater.

If the mechanical and electrical powers are correlated, as are the current and torque, then voltage and speed must be, also. And they are, because the faster the rotor spins through the stator field, the greater back-emf it will generate. This is Faraday's law of induction.

So, if you want to decrease speed, decrease voltage. If you want to decrease torque, decrease current. If you increase torque (say by putting a brake on the motor), you are increasing motor torque. But if you don't change the supply of electrical power, then the mechanical power also won't change. If torque increased, the only way to keep mechanical power constant is to decrease speed, so the motor slows down.

There is one kink here: as torque goes up, current goes up. The resistive losses in the motor also go up, because the windings have some resistance, and those resistive losses are proportional to the square of the current:

$$ P = R I^2 $$

So, as current goes up, the resistive losses increase, making the motor a less efficient converter of electrical energy to mechanical energy, because some of that electrical energy is now creating heat. If you stall the motor, then the motor reaches 0% efficiency: speed is zero, so mechanical power must be zero, but the motor is drawing a ton of current, and there is a voltage drop over the winding resistance, so electrical power is very high.

Interesting fact: if you can make a motor with no winding resistance (or other losses), and you connect it to a perfect voltage source, then the speed regulation (how much speed changes with torque) is perfect. That is, the motor won't slow down if you try to stop it: it will just draw exactly enough more current from your battery to keep spinning at the same speed, no matter what.

PWM is all irrelevant to this. PWM motor control is just a way to efficiently apply less than the full battery voltage to the motor. It works because a PWM driven motor is equivalent to a buck converter. Changing your PWM duty cycle is equivalent to changing your supply voltage:


The maximum torque you could have (which you will get when the motor is stalled) is limited by the current your power supply can supply and the losses in the motor, just as it is without PWM. Your PWM driver might add a bit of resistance to the circuit, reducing the current and torque a bit, but usually this isn't significant compared to the resistance of the motor windings.

  • \$\begingroup\$ Dear Mr Phil Frost, I used a 12V Lead Acid battery. Should I consider a LiPo battery? As far as I concern it can supply a bigger output current. Can you advice me on this? \$\endgroup\$
    – Robert
    Jun 25, 2013 at 8:10
  • \$\begingroup\$ @Robert that sounds like a new question. \$\endgroup\$
    – Phil Frost
    Jun 25, 2013 at 11:41

Motors want to work where they want to work. The best way to decrease speed while maintaining (in fact, increasing) torque is by gearing it down. This means building or buying a transmission. Try searching for "gearbox" or "hobby gearbox".

  • \$\begingroup\$ Dear Mr. Seidman, the hobby gearbox is a little too small for my motor head. Furthermore, it might complicate my prototype. Is there any other way other than a mechanical modification? For example, coding method? \$\endgroup\$
    – Robert
    Jun 20, 2013 at 16:44
  • 1
    \$\begingroup\$ @Robert -- Electrical or electro-mechanical modification. Otherwise, no. This is one area where "software eats world" does not apply. \$\endgroup\$ Jun 20, 2013 at 17:43
  • \$\begingroup\$ Using a different motor rated for more torque would be the other obvious way \$\endgroup\$ Jun 20, 2013 at 21:19
  • \$\begingroup\$ Dear DrFriedParts, electrical modification interests me. Can you give me some advise on that? \$\endgroup\$
    – Robert
    Jun 21, 2013 at 3:20

It sounds like you want to reduce the speed at which the motor will operate in the absence of applied torque, without reducing the amount of torque that can be applied without stalling the motor. This can be quite effectively if you can vary your PWM cycle in response to changes in the motor's actual speed. That in turn may be accomplished either by measuring the time-average current and time-average voltage through the motor (making certain the averages properly include times when current and/or voltage are negative!) and estimating the speed as being proportional to the voltage minus some multiple of the current. As torque increases, the average voltage and thus PWM ratio will have to be increased to compensate.

This approach to driving a motor is called "IR compensation", since you're adjusting the motor drive to compensate for voltage loss due to motor's resistance (the amount of loss being proportional to the product of current "I" and resistance "R"). When applied correctly, it can work very well. The one thing to watch out for is that the performance of an IR-compensated control system improves as the compensation factor approaches the "ideal" value, but the control system will will often become dangerously unstable if the compensation factor exceeds that value even by a little bit.


Ideally, motor speed should be proportional to voltage, so it should remain constant regardless of torque. In reality however, increasing torque increases the current, which in turn results in more resistive losses in the motor. As a result, less voltage remains available to counter back-EMF, and the motor speed drops.

Maintaining constant speed can be done in software with a PID controller. In the simplest case, you feed a PI controller with the error between actual and desired speeds. In a more complex case, you derive motor acceleration from speed, and feed it to a PID controller in addition to the speed error.

If you don't have a speed sensor, you can estimate the speed from motor voltage and current: speed is proportional to motor voltage minus resistive losses, which in turn are proportional to current: \$\phi'=K_1V-K_2I\$. \$K_1\$ can be found by running the motor without load, and \$K_2\$ can be found by measuring voltage and current at stall.


Not the answer you're looking for? Browse other questions tagged or ask your own question.