Short answer: your motor is “kicking” your Arduino’s power and signal lines hard enough to make it reboot.
Longer answer (what’s actually going on):
1) Voltage drop (most common)
When the motor starts, it draws a big inrush current (often 5–10× its normal running current).
If your Arduino and motor share the same supply:
- The voltage briefly drops
- Arduino sees < ~4.5V (for a 5V board)
- → brownout reset
2) Electrical noise (brush motors are nasty)
Motors—especially brushed DC motors—generate spikes and noise:
- Back-EMF when switching
- Arcing at brushes
- Fast voltage spikes on wires
These can:
- Glitch the reset pin
- Corrupt the supply line
- Crash the microcontroller
3) Back-EMF (if no diode)
If you’re switching the motor with a transistor or relay and no flyback diode, the motor can generate a high-voltage spike when turned off.
That spike can:
- Reset the Arduino
- Damage components
How to fix it (practical checklist)
Must-do:
-
✔ Add a flyback diode across the motor
(stripe toward + supply) -
✔ Use a transistor or MOSFET to drive the motor
(don’t power it directly from Arduino pin)
Strongly recommended:
- ✔ Separate power supplies (or at least separate rails)
- ✔ Add a large capacitor (e.g. 100–470 µF) near Arduino Vcc
- ✔ Add a 0.1 µF ceramic capacitor across motor terminals
- ✔ Keep motor wires physically away from Arduino wires
If still unstable:
- ✔ Add a bulk capacitor on motor supply (e.g. 470–1000 µF)
- ✔ Use a logic-level MOSFET + proper grounding (star ground)

Comments
Post a Comment