Go Down

Topic: Powering 29 LEDs (Read 2827 times) previous topic - next topic

Navin2012

Hey, i'm trying to power 29 leds in my project. I have 13x2 leds(connected in series) and 1x3 leds(also connected in series). each led takes up 20ma and i'm trying to make it portable. Any suggestions on power supplies? batteries? Arduino UNO's power?

Simpson_Jr

13 leds in serie will at least need ~24 volt should you use Red ones (1.8-2.2 Volts).
Green, blue and white will ask about 3-3.5 volts per led, resulting in 40v+.

That doesn't have to be a problem, directly powering them from the arduino board will unfortunately not be possible since it gives 5 volt max.

By using a transistor/mosfet + separate supply you could work with such voltages.

You may... want to lower the voltage though to keep it portable. You could connect 3-4 leds serial, each string with its own resistor, and connect those strings parallel.
That will discharge the batteries faster though.

You'll still need a transistor/mosfet to switch the Leds. Even when you should drive all leds parallel, the microcontroller pins can handle 40 mA max, 2 parallel leds on 1 pin could already be dangerous for the micro controller chip.


MarkT

The original question said 2 or 3 LEDs in series, not all of them!  Say blue/green/white then 3.5 to 4V each would imply 12V for 3 in series, 8--9V for 2 in series.  These might just be drivable directly from Arduino pins, assuming the leakage currents through the LEDs aren't enough to damage the protection diodes on the Arduino.

With red LEDs and 1.9V or so then the 2-in-series chains will be fine at 5V, but 6V is probably needed for the 3-in-series chain.

In the red case I think 6V battery pack could be sufficient - it will mean the Arduino will run a bit under-voltage (apply 6V power to the Vin pin rather than the barrel socket to avoid the reverse-protection diode voltage drop-out).  If using 14 pins at 20mA thats 280mA total - more than the 150mA limit for ground/power pins on the ATmega chip.  If not all LEDs are on simultaneously that could be fine.  If they are all going to be on simultaneously either reduce to 10mA per chain or have half the chains connected to ground and half to Vin (the latter needing an output LOW to turn on).  Note that the 3-in-series chain will need to be connected to +6V anyway.  To get right values for series resistors you will need to measure the forward voltage at the desired current.

And finally you do realise that the analog pins can be used as digital output pins too?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Simpson_Jr

Quote
The original question said 2 or 3 LEDs in series, not all of them!  Say blue/green/white then 3.5 to 4V each would imply 12V for 3 in series, 8--9V for 2 in series.  These might just be drivable directly from Arduino pins, assuming the leakage currents through the LEDs aren't enough to damage the protection diodes on the Arduino.


Perhaps I may have read it wrong, 13x2 could IMO also mean 2 strings of 13 Leds.

I'd very much like to see someone getting much light out of 2 blue leds in serie driven by just 5 volt.

Yep, you could... drive 20 mA Leds with 10mA, but I guess that would also mean loss of light.
The 150 mA mentioned is 200 mA by the way, check the data sheet.

If you'd really need them Mark, you could also ditch the Crystal and Reset-pin freeing 3 more IO-pins.


MarkT

Quote
The 150 mA mentioned is 200 mA by the way, check the data sheet.
probably misremembered that - perhaps I remembered 150mA as a 'safe' value as 200mA is the absolute max, to quote datasheet:

Quote
Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Artomoz

to be honest I managed to hook up 32 RGB flashing LEDs to one 9v battery using no resistors and a on/off button. It actually worked very well, my LED lights flash brightly and none have burn out. The only down side is the power consumption a 9v battery will last you most 4-6 hours. Which was great for what I used them for.

Grumpy_Mike

Quote
my LED lights flash brightly and none have burn out.

That is probably because the 9V battery is so rubbish at supplying current (it has a high output impedance) so that is probably saving your LEDs.
Remember only an idiot connects up an LED without some form of current limiting device.

Artomoz


Quote
my LED lights flash brightly and none have burn out.

That is probably because the 9V battery is so rubbish at supplying current (it has a high output impedance) so that is probably saving your LEDs.
Remember only an idiot connects up an LED without some form of current limiting device.



I tried adding resistors but it seemed to cause my lights to flicker for some odd reason attaching them with out any ohm resistors did the trick and well, decided to stick with it.

Grumpy_Mike

Quote
I tried adding resistors but it seemed to cause my lights to flicker

Ah so you are doing electronics by the trial and error method. Just try things and see what works and hang any theory.

Well there is no substitute for knowing what you are doing. There is no way the addition of a resistor could, by itself, cause an LED to flicker. So you either had something else wrong that you didn't notice and it got corrected in the rewire. Or the flickering is still there but because it is so bright you now no longer notice it. Either way what you should be doing is investigating why you saw the phenomenon and not spreading rubbish round the internet for some newbie to fall into the trap of being miss-informed by you.

Too many people think that if they throw something together that they don't understand and it appears to works then the design is good and it will work for others. A case in point is the shift register tutorial on this site that advises you put a capacitor on a clock line to stop flickering. This is not only totally wrong but can end up damaging your arduino.

tomm


A case in point is the shift register tutorial on this site that advises you put a capacitor on a clock line to stop flickering. This is not only totally wrong but can end up damaging your arduino.


I remember going thro that tutorial and seeing that capacitor and wondering why it was there. Fortunately I just ignored it as I figured it should work without the capacitor, and it did.

With my limited electronics experience, if there's something I'm not sure about I always attempt to do some research/learning first to get a better understanding, or at least find ways to test things before plugging them into the arduino. I'm way too paranoid about blowing stuff up. Generally trial and error is not something people want to be doing with electronics.

Artomoz


Quote


Well there is no substitute for knowing what you are doing. There is no way the addition of a resistor could, by itself, cause an LED to flicker. So you either had something else wrong that you didn't notice and it got corrected in the rewire. Or the flickering is still there but because it is so bright you now no longer notice it. Either way what you should be doing is investigating why you saw the phenomenon and not spreading rubbish round the internet for some newbie to fall into the trap of being miss-informed by you.

Too many people think that if they throw something together that they don't understand and it appears to works then the design is good and it will work for others. A case in point is the shift register tutorial on this site that advises you put a capacitor on a clock line to stop flickering. This is not only totally wrong but can end up damaging your arduino.


To be honest at that time I didn't even know this site existed, nor was I using an arduino chip.

I did try to find an answer to why my led lights flickered as I was trying to build my project the "proper" way but unfortunately the answers I obtained did not solve the issue and like stated above "didn't even know this site existed".

It worked for me but I am going to try and do my new project the right way, that's why I'm on these forums. I have to admit that wasn't the best option to have taken but like stated before, it solved the issue so I decided to stay with it for that project.

I have to disagree to a certain extent, with out trial and error we would never learn from our mistakes. With out trial and error we wouldn't have the knowledge we have today.

Never the less, I do agree with having some sort of knowledge and not just doing things blindly as there's always a hazard with electronics.

I have to ask you this question: Did you begin doing electronics as professional or did you also have to start from the basics and doing the trial and error method?


Go Up