Simple DC Motor Speed Controller with Transistor + Diode — Widescreen project video
Built a basic PWM-driven motor speed controller using an NPN transistor switch with a flyback diode across the motor terminals, controlled from an Arduino PWM pin. First attempt without the diode caused the Arduino to reset randomly whenever the motor spun down, which turned out to be back-EMF feeding into the board through a shared ground path. Adding the 1N4001 flyback diode fixed the resets completely.
