Arduino nano power external and programing

I have an simple project who need many rgb led ws2812b

I must power external my arduino nano but I want to program in the same time

My question is using external power supply to 5v pin while usb is connected for programing do not damage my usb port ? and how to do safe this setup ?

You posted in the classic Nano category. Is that really your board? a genuine one?


to your question, Yes, you if you have a genuine classic Arduino Nano, you can power through the VIN pin, and simultaneously connect it to a computer via USB. The Nano has an onboard voltage regulator that prevents back-feeding from USB to the external power. When both sources are connected, the Nano will draw power from the source with the higher voltage, usually the external supply if it’s above 5V, while the USB can still be used for programming and serial communication.

Make sure the external voltage is within the safe range (we often see 9 V for VIN) and make sure you don't power the rgb led ws2812b through the Arduino. The power must go directly from then power source (may be with a 5V adapter) to the LEDs (see The Magic of NeoPixels | Adafruit NeoPixel Überguide | Adafruit Learning System)

thank you for response

no I have an clone buy it from amazone with usb-c connector

in my setup the led’s are 5v, so power supply is also 5v.

from documentation VIN is 7 to 12 V.

How Is safe to connect power to arduino for programing in the same time to 5v or to VIN ?

5V on Vin will not work.

You must find the schematic of your clone to check if it's safe. For an official Arduino Nano it is safe to connect 5V and USB at the same time; see this part of the schematic

Why do you need to have both USB and external at the same time?

If you must, then use Vin

my setup is 180 led ws2812b which need around 3 to 4 amps and must power the led’s, the arduino and to upload the new sketch in the same time. One solution I found is to cutoff 5v from usb cable . but maibe is not necessary to hack the cable

Would it not be easier to disconnect the 5V from the Arduino?

the ideea is to program the arduino and to test it in the same time , after I am happy with result to left it working without damage the usb port

Well that can be done without an external 5V connected.
When you have it working the way you like, then disconnect the USB and connect the 5V

thank you , great ideea, I complicate myself to much :slight_smile:

Hi, @sz3bbylA
Construct yourself an isolation box.
Take a USB extension cable, cut it in half, then in the box connect the wires back together, EXCEPT, the 5V wires.
Bring the ends of the 5V wires out to terminals so if you need to feed 5V from your PC to the Nano, all you need to do is connect the terminals.
This is my cable, used many times on independently powered Arduino controllers.


That way you do not need to rely on any dodgy clones that do not have an isolation diode.
Tom.... :smiley: :+1: :coffee: :australia:

1 Like