30% off your first 3 months

Get the deal

How DC motors turn electricity into motion

by DuckyHelperNov 12, 20265 min read
Robotics

TL;DR:

  • A current in a coil inside a magnetic field feels a force, and a motor arranges many coils to turn that force into rotation.

  • Torque is proportional to current, and speed is set by voltage minus the voltage the spinning motor generates itself (back-EMF).

  • Torque falls as speed rises. At stall the motor draws its maximum current and heats up fast.

You connect a small hobby motor to a battery and the shaft spins. Pinch the shaft with your fingers and the motor slows, gets warmer and pulls more current. Everything about a DC motor is in that small experiment: current makes torque, load slows the shaft, and a stuck motor is in trouble.

Magnets and coils

A wire carrying current inside a magnetic field feels a sideways push. The size of the force is F = B × I × L, where B is the magnetic field strength, I the current and L the length of wire inside the field. Wind the wire into a coil and the push becomes a turning effect, a torque.

A simple brushed DC motor has permanent magnets fixed around the outside (the stator) and a coil wound on a rotor in the middle. A commutator, a split ring that touches two carbon or metal brushes, flips the current direction in the coil each half turn, so the push keeps pointing the same way around. Real motors use several coils so that there is always torque.

Two equations that explain almost everything

A motor is also a generator. When the rotor spins, the coils cut through the magnetic field and produce a voltage that opposes the supply. This is the back-EMF, and it grows with speed: V_b = k_e × ω, where ω is the shaft speed in radians per second and k_e is the motor's voltage constant.

The two equations are:

  1. Electrical: V = I × R + k_e × ω, where R is the winding resistance.

  2. Mechanical: τ = k_t × I, where k_t is the torque constant.

In SI units (volts, amps, newton-meters, radians per second), k_t and k_e have the same numerical value for an ideal motor. The first equation says the current is what is left of the supply voltage after the back-EMF is subtracted, divided by the resistance. The second says torque simply follows current.

Torque against speed

Put the two equations together. At zero speed there is no back-EMF, so the current is large: I_stall = V / R. That gives the maximum torque, the stall torque. As the shaft speeds up, back-EMF rises, current falls and so does torque. At the no-load speed, torque and current are nearly zero (only friction remains) and the back-EMF almost equals the supply voltage.

So the torque-speed line is a straight line from stall torque at zero speed to zero torque at no-load speed. Mechanical power is torque times speed, so it is zero at both ends and highest in the middle, at half the no-load speed.

Worked example: speed and torque of a small hobby motor

These numbers are an example, not a real part. A motor on a 6 V supply has a winding resistance measured with a meter of 2.5 Ω and a no-load speed of 6000 rpm.

  1. Stall current. I_stall = V / R = 6 / 2.5 = 2.4 A.

  2. No-load speed in SI units. 6000 rpm × 2π / 60 = 628.3 rad/s.

  3. Motor constant. Near no-load the back-EMF is about the full 6 V, so k_e = 6 / 628.3 = 0.00955 V·s/rad, and k_t has the same value in N·m/A.

  4. Stall torque. τ_stall = k_t × I_stall = 0.00955 × 2.4 = 0.0229 N·m.

Now put a load on it that needs τ = 0.010 N·m.

  1. Current. I = τ / k_t = 0.010 / 0.00955 = 1.05 A.

  2. Back-EMF. V_b = V − I × R = 6 − 1.05 × 2.5 = 3.38 V.

  3. Speed. ω = V_b / k_e = 3.38 / 0.00955 = 354 rad/s, which is 354 × 60 / 2π ≈ 3380 rpm.

Check by going the other way: at 354 rad/s the back-EMF is 0.00955 × 354 = 3.38 V, plus 1.05 × 2.5 = 2.63 V across the resistor, total 6.0 V. It matches the supply.

Where is the maximum power? At half the no-load speed, 314 rad/s, the torque is half the stall torque, 0.0115 N·m, and P = 0.0115 × 314 = 3.6 W. The electrical power in at that point is 6 V × 1.2 A = 7.2 W, so the ideal efficiency there is 3.6 ÷ 7.2 = 0.5. Real motors lose some more to friction and heat.

Where it goes wrong: stall current

Look at step 1 again: a stuck motor draws 2.4 A, more than twice what it drew with a decent load. All of that power becomes heat in a small winding, and nothing is spinning to cool it. A stalled motor can overheat, melt insulation and damage its driver within seconds to minutes.

Other things that go wrong:

  • Battery sag. A big current spike at start-up can drop the supply voltage and reset a microcontroller on the same battery.

  • Electrical noise. The brushes spark, which causes spikes that disturb sensors. A small capacitor across the motor terminals helps, and filtering the readings helps too, as in sensor noise and how to smooth it.

  • Wear. Brushes rub on the commutator and eventually wear out. That is one reason larger and faster robots use brushless motors.

Safety: Never hold a spinning motor shaft with your fingers while it is powered. A motor under stall gets hot enough to burn skin, so touch it only after it has been off for a while. Keep hair, loose sleeves and cables away from rotating parts, and put a fuse or current limit in the battery line so that a stall or short cannot overheat the wiring.

How real robots use DC motors

A DC motor on its own spins fast with little torque, so robots almost always pair it with a gearbox, a driver that can switch the current, and often an encoder that measures the speed. Wheels, fans, pumps and small arms all use this combination. Speed is controlled by switching the supply on and off quickly (PWM) so that the average voltage changes, and the equations above show why that works: lower average voltage means lower no-load speed.

Try it yourself

With adult help and a small battery pack, measure your motor's winding resistance with a multimeter (hold the shaft still), calculate its stall current, and compare with a bench supply's current limit set safely below that. Then run it with and without a gearbox and note how the speed changes when you lightly load it. Your result should follow the straight line from the example: more load, less speed, more current.

Frequently asked questions

Why does a motor draw more current when it is loaded?

A heavier load slows the shaft, so the back-EMF falls. The supply voltage then drives more current through the winding, and torque rises with current until it balances the load.

Is stall current the same as the current rating?

No. Stall current is the maximum, reached when the shaft cannot turn. A motor's continuous rating is lower, because the winding can only shed so much heat.

Get started

DuckyHelper can
do more

It sees your screen and works in any app you use. Try it for 10 minutes, no card.

Get it for Mac, Windows or Linux

Share

Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in early access on Mac. Asking works on Mac, Windows and Linux.