Powering UNO and LEDs (WS2812) from one source

Hello,

I have googled this for a while now, and I find different answers on how to do this (or not to).

What is the best way to power the Uno and WS2812 from one source? (The LED strip is 5V.)

I want to use a standard (but quality) power supply, and I assume these are not regulated. Which seems to eliminate the possibility of using 5V on the board as input? But, I have seen several guides that tells me to connect my 5VDC directly to this pin. Other say it's not recommended. What is correct?

Next is Vin. I tried connecting my 5VDC to Vin and everything worked. Is it OK to power the board through the Vin? I thought the minimum V for Vin was 7V, why did it work with 5V?

Does the Arduino expect regulated 5V input from the USB port? Can I connect a USB plug to the 5V supply used for the LED, and into the USB port?

Or, should I get a 12v supply and reduce the V for the LEDs?

Check the specifications for the WS2812, what voltage they need and how much current it needs.
If it uses 5 volt, use a 5 volt source. If the need is 12 volt, use such a source and a step down converter making 5 volt for the Uno.

Should probably have mentioned that the LED strips are 5V....

Good. Then You need a 5 volt supply that can deliver the current needed by the LEDs and the Uno.

Yes, and I will connect that supply to the Vin port on the board, right?
I get confused reading stuff like this:
“The power source you connect to the Vin pin has to be 7 to 12 volts for the regulator to work reliably.”

I use USB powerbanks to supply my Unos. The Vin input if often called "the barrel jack". Mostly that is a poor solution.
Use the USB connector to bring USB power to the controller.

Yepp, I know. But for a nice and proper "finished" product, I prefer one power source.

Of cource. Get Yourself a 5 volt powersupply strong enough for the LED strip. Check the data sheets for the maximum current used by the LEDs and add some 50% to 100%. Then You have margins and the little UNO will get the needed current as well.

kamikaze911:
Yes, and I will connect that supply to the Vin port on the board, right?

No. If at all humanely possible do not ever use "Vin" or the "barrel jack". Supply 5 V, reasonably regulated, and supply it to the "5V" pin. That is what the microcontroller requires.

kamikaze911:
I get confused reading stuff like this:
"The power source you connect to the Vin pin has to be 7 to 12 volts for the regulator to work reliably."

And that is sad. No wonder you get confused. :roll_eyes:

A very real danger is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator allow a usable source of 5 V power. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

If you are asking this question, it is highly likely that you will wish to connect something else. In which case, the answer is regulated 5 V.

This is because the on-board regulator is essentially capable of powering only the microcontroller itself and no more than a couple of indicator LEDs. The on-board regulator might be able to power a few other things if it had a heatsink, but on the (older) Arduinos, it does not.

Powering via the "barrel jack" or "Vin" connections is asking for trouble. The "5V" pin is not by any means an output pin, if anything a "reference" pin but most certainly the preferred pin to which to supply a regulated 5 V.

Thank you, finally! The best answer, by far, on this topic. Many answer are just too short, with no explanation. Very easy to get confused, for sure.

What are others doing, if they need regulated 5V or 12V? (Without having a piece of lab equipment in their living room).

If I get this: 5V 10A switching power supply : ID 658 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits and use it to power the UNO through 5V. What will happen? Will the board just die after a while?

Just to be clear: I am powering the LED strps directly from the power supply.

I understand why many just power it with USB from a 5V USB wall plug (It seems these are regulated for some reason?), it's easy, and probably what I will do too. But, since I'm learning, I also want answers to see the possibilities :slight_smile:

Thank you!

kamikaze911:
What are others doing, if they need regulated 5V or 12V? (Without having a piece of lab equipment in their living room).

I use a small converter to convert 5V (from a PSU) to 9V and feed that into my Mega on Vin. I just don’t trust feeding with 5V on the 5V pin and next connecting the USB (to control the application).

That is a regulated 5V power supply. It can safely power both the LEDs (if there aren't too many of them) and the Arduino. Connect it to the 5V pin on the Arduino. That's how most of my projects are powered and nothing has died yet.

Steve

kamikaze911:
What are others doing, if they need regulated 5V or 12V? (Without having a piece of lab equipment in their living room).

I'm using USB phone chargers for 5V. Similar switching adapters with barrel plugs for 12V (but I'm using those for other than Arduino). For another project that needs more current, I use a PC power supply.

sterretje:
I just don't trust feeding with 5V on the 5V pin and next connecting the USB (to control the application).

And by the same token, you never use powered USB hubs either. :cold_sweat:

Fair point. To my defense, I've never looked inside on of those. Will give it a try one day :wink:

slipstick:
That is a regulated 5V power supply. It can safely power both the LEDs (if there aren't too many of them) and the Arduino. Connect it to the 5V pin on the Arduino. That's how most of my projects are powered and nothing has died yet.

Steve

Alright, I'll grab one of them. Sounds like information I would like to give my customer if I were making PSUs...