How Do I Use External Power Safely?
External power is great when USB is not enough, but it can also destroy boards if wired wrong. These steps keep it safe and stable.
Rule one: share ground
If your external supply powers sensors, motors, or drivers, connect its ground to the Arduino or ESP32 ground. Without a shared ground, signals have no reference and readings go random.
Use a buck converter when needed
- Use a buck converter to step down higher voltages to 5V or 3.3V.
- Set the output voltage before you connect it to your board.
- Pick a converter with enough current headroom.
Quick check
Measure the buck converter output with a multimeter before connecting it to the board.
Protect the input
- Add an inline fuse on the positive lead.
- Use reverse polarity protection if your supply is not keyed.
- Keep wiring short and secure.
Where to connect power
- Arduino Uno: Use the barrel jack or VIN for 7V to 12V. Use 5V pin only if you have a regulated 5V supply.
- ESP32 boards: Use the 5V or VIN pin with a regulated 5V supply.
Noise and motors
Motors create noise. Keep motor power separate, use flyback diodes, and connect grounds together. This prevents resets and random sensor readings.
Use a regulated supply, share grounds, and protect the input. That keeps your board safe and stable.
Related: Can I power a motor or servo from the Arduino 5V pin? · Why does my Arduino reset when the motor turns on? · Why is my sensor giving random readings?