motors & drivers
a motor turns electrical power into motion. most need more current than MCU pins can supply → use a transistor or motor driver.
types
- DC motor: speed with PWM; direction with H-bridge.
- servo: controls angle via signal; has its own driver inside.
- stepper: moves in steps; needs a stepper driver.
bigger loads → MOSFET or dedicated driver; add a fuse for safety.
caution
choose a driver rated above stall current; add bulk caps close to the driver and protect with flybacks where needed. servo & stepper quickies
- servo: 5 V power + control pulse every ~20 ms (use a servo library).
- stepper: needs a stepper driver (A4988, TMC) and distinct supply current.