Switches & motion

DC motor

Turns current into rotation. Current through coils on the rotor makes it a magnet that is pushed round by fixed magnets; a switching contact (the commutator) flips the current every half turn to keep it spinning. Speed follows voltage; torque follows current.

Pins

Two terminals
: Swap them and it spins the other way.

Small brushed DC motors are metal cans with two solder tabs. Gear motors add a gearbox for more torque and less speed.

What to look for inside

  • The voltage on the motor slowly rises and falls, and the speed follows it.
  • Current in the rotor coils turns the rotor into an electromagnet, attracted and repelled by the fixed N and S magnets.
  • Just as it lines up, the commutator reverses the coil current, so it is pushed onward instead of stopping.

The numbers that matter

SpecTypical
Rated voltage
Speed is roughly proportional to voltage.
3 V · 6 V · 12 V
No-load / stall current
At start-up or when blocked it draws the stall current. Size the driver and supply for that.
0.1 A / 1 to 3 A (small)
Speed (no load)
Usually geared down for real use.
3000 to 15000 rpm

Where you’ll use it

  • Fans, pumps, toys and robots.
  • Speed control with PWM through a MOSFET or an H-bridge (for both directions).

Common mistakes

  • Driving a motor straight from a GPIO pin.
  • No flyback diode. A motor is an inductor and kicks back when switched off.
  • Forgetting the stall current. The supply droops and the microcontroller resets.

Lessons that use it

Lesson 3.2 shows the MOSFET that switches a motor; lesson 2.4 has a motor preset and shows the flyback spike.

Go deeper

U=I R+ke ωU = I\,R + k_e\,\omega

The spinning motor makes its own back-voltage (k_e ω), which is why the current drops once it is up to speed.

τ=kt I\tau = k_t\,I

Torque is proportional to current.

All components · All lessons · Glossary