Go Down

Topic: Powering LED Strip Question (Read 535 times) previous topic - next topic

fergusyarrow

Hello,

It's been 20 years since I studied electronics, and in that time I've managed to forget most of what I was taught in uni. I am starting to dabble again, and have picked up an Arduino Uno and a length of WS2812 LEDs. I also have two 4AA battery holders and one 9v battery holder. I am working on a wearable project for the kids, and would like to incorporate just 16 of the LEDs from the stip (which I will cut off of and the main strip). I plan to use the FastLED library with the brightness set to a value of 128, so at max brightness, I am assuming a draw of 30mA per LED for a grand total of 480mA.

Now here is where I am a little unsure as how to proceed; as it is a wearable project, I need to supply power to both the Arduino and the LED strip. What I would very much appreciate is your guidance on is how best to achieve this, using the items I have to hand, and how to wire them up. I was thinking of using the 9v battery to power the Uno only, and for the LED strip, I was thinking of using 4AA NiMH to power all 16, or perhaps splitting that and using 2 x 4AA NiMH battery packs to drive 8 LEDs each. As I said, I am slowly finding my way back into this whole realm of electronics, so please bear with me.

Cheers,

Fergus

PaulRB

Connect the two 4xAA in parallel and from there take separate cables to power the strip and to power the Arduino through its 5V pin.

Paul__B

Certainly use Ni-MH batteries in the holder to provide 4.8 V, not 6 V or more.

Powering the UNO (wrong device for a wearable - use a Nano.  In fact, use a Nano in preference to UNO for everything for which you do not have a specialised UNO shield) from a 9 V battery is total nonsense.  It runs on 5 V - 4.8 will do just fine - and the on-board regulator is pretty useless.

Connect your battery pack via the switch to the terminals of the WS2812 strip using twin cable ("figure 8").  Now connect all three connections from there back to the Arduino 5 V terminal with a 3 wire ribbon.  This fulfils the requirement that power wires run together as a pair and signal/ control wires run together.

For 16 LEDs there should be no problem but for long strips (what is long?  Well, 50 or more I suppose) you must connect power to both ends (equally/ in parallel).  It is recommended to have a 470 Ohm resistor in series with the data line at the input of the LED strip, more important if there is a long separation.  (What is long?  Maybe a foot.  This probably is less important given that you do keep all the wires properly paired.)


fergusyarrow

Powering the UNO (wrong device for a wearable - use a Nano.  In fact, use a Nano in preference to UNO for everything for which you do not have a specialised UNO shield) from a 9 V battery is total nonsense.  It runs on 5 V - 4.8 will do just fine - and the on-board regulator is pretty useless.

Connect your battery pack via the switch to the terminals of the WS2812 strip using twin cable ("figure 8").  Now connect all three connections from there back to the Arduino 5 V terminal with a 3 wire ribbon.  This fulfils the requirement that power wires run together as a pair and signal/ control wires run together.


Thanks for the feedback to you both. For the above, I hadn't considered the Nano, but that is mostly because I only have the Uno to hand currently. The project itself is a robot costume, and considering it is mostly carboard box based, I figured the Uno would be sufficient as I can hide it somewhere on the costume. I should have provided info on the LED strip as well, so here it is: https://goo.gl/qEwdoz

If I understand what you have described correctly, you are saying to take the + & - from the battery pack, via a switch, to the + & - terminals at the start of the LED strip. The 3 wires going from the LED strip going back to the Arduino are the +, - and data I am assuming. Can I take from this that you are suggesting just one 4xAA battery pack (using NiMH batteries) to power the Uno and 16 LEDs?

Cheers

Paul__B

Well, considering current draw, the UNO itself is the least of your worries, so it makes sense to run it from the same battery.

PaulRB

#5
Oct 22, 2018, 11:45 pm Last Edit: Oct 22, 2018, 11:48 pm by PaulRB
If you use just one 4xAA pack, you will only get half the battery life. Maybe that's enough. If not, connect the two 4xAA in parallel.

The Uno's power requirement is equivalent to one extra led. Maybe less.

fergusyarrow

Thank you both. And if memory serves me correctly, connecting one power supply at the start of the led string and one at the end would satisfy the parallel requirement?

Cheers

PaulRB

Yes it would, the 5V and ground tracks on the strip are continuous along the length of the strip.

Paul__B

Now while I was showering, I was cogitating on some further observations.  :smiley-eek:

It is generally considered undesirable to put two battery packs in parallel as they may not be at the same state of charge and you might get some form of "cross-charging".  Particularly for a long strip, connecting one at each end would tend to minimise this as the resistance of the strip itself balances them out.

It is probably not a good idea to break the power rail along the strip (obviously you cannot break the ground rail) to segregate it for power supplies as you get a "phantom powering" concern where the data line bridges.  Mind you I have done this often enough with no drastic result.

If you are not discharging the battery pack ridiculously quickly - clearly you will just have to try it out - the best approach may be simply to provide switching on both battery packs and swap from one to the other when necessary.

fergusyarrow

Thanks for the additional cogitation  :) If I understsnd correctly, what you are suggesting is what I have thrown together in Fritzing; power the system using one pack and leave the other powered off. If/when the need arises, switch to the other power pack.

If my calculations are correct, and I use half-power for the LEDs  (30mA each * 16 = 480mA) and allow 25mA for the Uno (based on using one PWM out), I am looking at 500mAh. I don't think that would run down the pack too fast, and even then, this calculation assumes those 16 LEDs are on constantly at half-brightness, which they will not be, as it will just be a repeating sequence of colours.

Cheers,

Fergus

Paul__B



That covers it, but you want to keep all the wiring tight together - not just to avoid snagging - with the parallel wires behind the LED strip.

PaulRB

It's also best practice to put a resistor between the Arduino pin (220R~470R) and the strip, and a large cap (100uF~470uF) across the power lines, close to the strip.

Go Up