Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: terragady on Apr 23, 2016, 03:18 pm

Title: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on Apr 23, 2016, 03:18 pm
Hi I am planning small lightning project with addressable leds. I have free two DC adaptors, 5V - 3A but very poor quality from china for 2$ and nice HP 12V - 2A. So should I connect 12V to the arduino and then from 5V to leds? Or 5V adapter to LEDs AND Board? I am not sure if I can connect such a adapter to 5V pin on arduino? Is there any risk? Maybe I should use DIODE there or some regulator? Or separate regulator 12V -> 5V and then 12V to the board and 5V to leds? :) Lot of combinations I know ;)
I want to run 1meter of 30LEDS (+/- few)
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 23, 2016, 04:09 pm
The Arduino 5V doesn't really have the juice to run 30X WS2812.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on Apr 23, 2016, 04:20 pm
so it doesn't matter what current is connected to VIN?
Should I just connect 5V adaptor to LEDs and 5V pin? Will it work? "Juice" will be from adaptor right?
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 23, 2016, 04:33 pm
The Arduino 5V has a limit to the current it can provide regardless of the capability of the main supply.
You posted that this 5V adapter of yours is of low quality ("very poor quality from china"), so I question running the Arduino from it.  Aside from that, what you propose is feasible.
(I hate to sign on to a proposal without a sketch/diagram.)
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on Apr 23, 2016, 04:46 pm
I do not want to have 2 adapters for on project, so is there any method I can improve this china thingy by adding something between it and 5V pin? Because the 5V should be nice and regulated already if I want to connect it there? I do not really know how to connect it any other way without buying additional power source or running arduino from battery. I will of course draw a sketch before :)
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 23, 2016, 04:56 pm
Define "very poor quality".  What is it lacking?  In what regard is it unacceptable?
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on Apr 23, 2016, 06:15 pm
well it cost nothing, smells like hell and I am not sure how stable is potential.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 23, 2016, 06:27 pm
Then it's junk.  What next?

I think that you should probably buy what you need: a good 5V supply.  Do what's right, there is no magic bullet.

You could make a 5V supply from that 12V module; a regulator, a couple of capacitors and probably a heat-sink.  Here again - more stuff to buy.
As you're asking these questions, that may be outside your skill set.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: therion23 on Apr 24, 2016, 12:15 pm
Hey folks. If i may chip in, i have a related question.

I am in a bit of the same situation, wanting to control N amounts of WS2832's, which way goes past what an Arduino of any kind can pass on. So, i'm thinking, giving those a separate power supply (5V 3A power supply) and letting the Arduino do the bitbanging to them.

Can this be done?
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 24, 2016, 04:43 pm
Can this be done?
Yes.  Please include a sketch of your proposal to confirm.
[2832's?]

The lengths or the number aren't the design criteria, exactly, but how many are let to be on at any time.
That's the crux of the matter - total current demand.
When specifics aren't discussed then worst case (the capacity for all ON, blazing white from each) has to be anticipated, my way of thinking.

A strip, or any number of strips, could be run from Arduino 5V, so long as the total is not greater than 30 elements, I suppose (but that might be a strain - no guarantees).

Powering the WS2812 strips from a 5V supply all their own takes all that load off the Arduino 5V, eliminating all of the calculations and considerations, the fuss and bother, and leaves you to get on with the fun stuff.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: PaulRB on Apr 24, 2016, 09:37 pm
You could make a 5V supply from that 12V module; a regulator, a couple of capacitors and probably a heat-sink.  Here again - more stuff to buy.
That would be very wasteful of power. A DC-DC convertor would be better.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: runaway_pancake on Apr 24, 2016, 10:42 pm
"Waste"?  Stop already.
You got me, man.  I didn't cover every contingency, every possibility, every conceivable option.
Bad, Bad, Bad.  Bad.
All Replies must be exhaustive - I will keep this in mind.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: PaulRB on Apr 25, 2016, 12:11 am
"Waste"?  Stop already.
You got me, man.  I didn't cover every contingency, every possibility, every conceivable option.
Bad, Bad, Bad.  Bad.
All Replies must be exhaustive - I will keep this in mind.

Don't get all defensive. I have huge respect for you. It's just a suggestion!
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 21, 2016, 08:59 pm
can i use something like this:
http://www.aliexpress.com/item/PWM-DC-6V-12V-24V-28V-3A-Motor-Speed-Control-Switch-Controller/32388647009.html?spm=2114.01010208.3.1.mMDTwd&ws_ab_test=searchweb201556_0,searchweb201602_5_10037_10033_507_10032_10020_10017_10021_10022_10009_10008_10018_101_10019,searchweb201603_9&btsid=4ec6973d-e9ef-4719-81e9-24712c45c00c

to convert 12V to 5V for leds? I tried it, used multimeter to adjust to 5V but the leds only turn on with different colours, few are off and they do not respond to arduino output pin, I can disconnect it and they will still be on
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: larryd on May 21, 2016, 09:17 pm
Show us a diagram of the wiring.
What voltage do you measure when operating the circuit?
Do you have a GND from the Arduino going to the power supply GND?

.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 21, 2016, 09:40 pm
Arduino is power via USB. I connected LED white (GND) to gnd from this PWM controller and red (+5) to + from PWM controller and green one to the arduino pin 8 (tried different ones). I tried to cut one LED from strip and connect from Arduinos +5, GND and digital out but it doesnt work at all :( maybe I fried them using this DC controller? I set there 5V with multimeter.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 21, 2016, 10:57 pm
how to check if I fried them or something else is not working? When they were on they were getting pretty hot so i disconnected them. When I measure strip with multimeter (3 LEDS) powerd from arduino and connected data pin I have +5V(~5.1) between GND and 5V and I have also +4.5V between 5V and data.

When I connect 5V from arduino and data pin I can see very faded green light from the LED, when I touch GND to it from Arduino then it dissapears.

EDIT:

OK i tested them more. When I connect my DC regulator and LED, no data whatsoever, just +5 and GND the LED is lit up with kind of blueish colour. I tried to fry one by putting max =12V and I indeed fried one. But when I connect LED (not this fried one) to the arduino also without data just +5 and GND i get nothing :( with DATA is the same, only sometimes there is this little bit of light, barely visible. I tried 3 different arduinos and its the same. Maybe i damaged LEDs at the beginning using this PWM thingy? I used it before for small 12V pump to control its speed and was working fine.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: larryd on May 22, 2016, 02:08 am
Accurate schematic.

.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 22, 2016, 03:27 am
schematic of what? How to connect 3 wires?
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: larryd on May 22, 2016, 03:37 am
Argumentative.
Well, if you only have 3 wires with no power supply, no controller, no 1000uf capacitor and no series data resistor then you are on your own, good luck.

.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: Paul__B on May 22, 2016, 02:22 pm
Argumentative.
Well, if you only have 3 wires with no power supply, no controller, no 1000uf capacitor and no series data resistor then you are on your own, good luck.
Have to credit that! :smiley-lol:
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 22, 2016, 05:51 pm
OK, here you are. I do not use capacitor, Arduino is connected to USB with computer.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: PaulRB on May 22, 2016, 10:10 pm
(http://forum.arduino.cc/index.php?action=dlattach;topic=395990.0;attach=167901)

Use a capacitor!

How many leds? For more than around 10, you must use an external power supply.
Title: Re: Powering WS2812 LEDs (separate or from board?)
Post by: terragady on May 23, 2016, 12:54 am
yes thats what I was writing before, with Arduino I am using max 3 LEDs. For more at the beginning I was using DC PWM controller from the link above. So I was worried that I burned the LEDs using it because I cannot get them work now at any way.