DC Motor
Spins continuously — drive it through a transistor or H-bridge, never straight from a pin.
How it works
A brushed DC motor spins when you apply voltage and reverses when you flip the polarity. It draws far more current than an Arduino pin can supply and kicks back voltage spikes when it stops, so never wire one directly to a pin.
For one-direction on/off or speed control, switch it with a transistor and add a flyback diode. To drive it both directions, use an H-bridge (like the L298N). Power the motor from a separate supply and share ground.
Pins
- Terminal 1
- To the driver output (swap the two to reverse).
- Terminal 2
- To the driver output / supply.
Ratings
- Drive
- Transistor (1 way) or H-bridge (2 ways)
- Power
- External supply + flyback diode
Tips
- Never connect a motor straight to an Arduino pin.
- Always add a flyback diode across the motor terminals.