Wiring 25 LEDs with a PWM Dimmer

Thread Starter

Harry_THP

Joined Oct 25, 2022
5
Not usually one for asking questions in forums, as I'm usually able to find solutions with my own research, however, I've been looking at this over a period of days now, and the deeper I dig, the more confused I'm getting.. I'm a Computer Science student, not electronics, so please go easy on me

I need to wire up 25 white LEDs that need to be dimmed. I've opted for a PWM dimmer.
My LEDs didn't come with a datasheet or any information. I can only presume they have a voltage drop of 3 - 3.3V and a forward current of 10 - 20mA, from what I've read online.

I connected one up to a 9V PP3 battery at first, it worked... I thought they must be some sort of high voltage LEDs. I then connected one to a 3.75V Li-ion battery and it blew. I think this is because the PP3 is unable to provide as much current as the Li-ion? Someone also told me that because my PP3 was Zinc-Chloride, it had a higher internal resistance which is why it didn't kill my LED, whereas an alkaline one could potentially fry it.

I've been researching about wiring LEDs and the need for resistors but it's just getting more confusing the more I look into it. Given that my circuit is working as is and it's only for a temporary application, would it be worth it to risk leaving them out? Also the presence of the PWM should be considered. Would this lower the current flowing through the LEDs? Or should I at least use a singular resistor?

Then there's resistor wattages. How do I calculate what wattage resistor I need?

And then my main question: what's the best way to wire them in terms of preserving battery life, but without losing out on any brightness? Given that these LEDs require 3 / 3.3V and my power supply is 9V, I figured I could wire them in parallel with 2 per branch, or maybe wire a series circuit with 13 LEDs on one parallel branch and 12 on another... I came up with some, probably incorrect, diagrams depicting both of these. They're attached
Is there a better way to go about it than what I'm doing? Am I right in saying that either of these methods would get me double the battery life as opposed to just wiring the lot in parallel?

If someone could kindly explain the best way to wire this, I would be most greatful :)Diagrams.PNGSeries w 2 Parallel Branches.jpgParallel w 2 LEDs per Branch.jpg
 

Reloadron

Joined Jan 15, 2015
7,080
I can share this much, a 9.0 volt PP3 battery will be very short lived. If we just assume a 3.0 volt LED which draws let's say 15 mA it works out this way 9.0 volts - 3.0 volts / 0.015 amp = 400 ohms. Now if we do two LED in series it becomes 9 volts - 6 volts / 0.015 amp = 200 Ohms so with 2 three volt LEDs in series you want a 200 ohm series resistor. Since 200 ohms is not a common resistor you would go with a 180 ohm or 220 ohm series resistor. We use Vsupply - Vled / Iled. Again, with 25 LEDs regardless of how you wire them a PP3 battery will be very short lived. You really don't want too many LEDs in series when arranging a series / parallel configuration.

Ron
 

LowQCab

Joined Nov 6, 2012
2,646
Your Battery is woefully inadequate.

There are 2 separate functions that need to be addressed ........

The LEDs should be operated close to or at their rated maximum Current.
This can be achieved with Resistors, ( wasteful ), or a Current-Regulator-Circuit.

Dimming is done via PWM because the LEDs will still be operating at their "sweet-spot" Current-level,
but will be Switched On and Off too fast for the Eye to detect the switching,
only giving the apparency of "Dimming".
They are actually always operating at the Current that has been set,
but only for the percentage of the time that they are actually "On".
PWM does NOT regulate the Current.

Operating an LED at less than it's rated Current tends to have
negative effects on the "Color-Rendering" performance of the LEDs.
.
.
.
 

DickCappels

Joined Aug 21, 2008
9,512
LEDs are often binned by voltage drop for a given current. That allows paralleling of LEDs and driving them with a voltage source.

I would be worried using this setup on a regular basis unless I was sure the LEDs being used were all found to work well with the voltage provided. I guess if one were not making many LED assemblies one could build an assembly and check both the total current and look for LEDs that are significantly brighter than the others.
 

Sensacell

Joined Jun 19, 2012
3,098
Starting with a rough THEORETICAL analysis of the power required...

LED 3.2 V @ 0.015 A = 0.048 Watts per LED... that is 1.2 Watts, assuming a PERFECTLY EFFICIENT drive circuit.
At 9 volts, you will draw (1.2/9 ) or 133 mA, a crappy 9 v battery has MAYBE has 500 mAh capacity.
That gives 3.75 hours.

In the real world, the drive will be far less efficient.

First re-think the battery.

Then the driver- if you want long battery life, some type of boost converter is called for, a bit more complex, but WAY more efficient.

Using resistors:
Assume 13 strings of 2 LED's at 15 mA (12 X 2 plus one string with 1 LED) 1.75 W @ 9 V
This setup would draw 195 mA for a life of 2.6 hours. (not really)

The life is always less- as the current increases, the capacity drops.

See the sad graphs:
https://www.powerstream.com/9V-Alkaline-tests.htm
 

DickCappels

Joined Aug 21, 2008
9,512
Excellent piont! Constant current converters would be ideal for this kind of application.
1666881154343.png

In the circuit below, use a 100 uf capacitor for "Capacitor to be charged" and place the LEDs in parallel with it.
1666882820165.png
 

tonyStewart

Joined May 8, 2012
31
Before you wonder why there are so many strategies to a solution, it is always best to define your expectations and learn how to specify them.

The 5mm whites are typically the easiest solution and very bright rated at 20 mA but will tolerate 30 mA with >70% more temperature rise. I have thousands of these rated at > 16,000 millicandela @ 20 deg. Just one of these at arm's length, if you stare at them you be seeing a spot in your retina to remind you not to do that at close range again for a while.
Why use LEDs rated for less brightness? Keep in mind reducing the lens angle doubles the observed luminous spot intensity and visa versa. (Ask me if you want hundreds or more per bag)

The best solution for simplicity is to match the load voltage range to the battery and watt-hour needs. The simplest solution is the Lithium Ion battery from 3.8 to 2.8V This closely matches the luminous range of the LED from 3.1 to 2.8V from 20 mA to less than 10% of the brightness.

You may use PWM with added complexity or use linear current regulation with less cost. But typical low drop out (LDO) regulators are not that low and lose > 1.5V. FET based LDO's are better. White LEDs have improved so much in the last few decades that any 5mm LED that uses more than 3.2 V @ 20 mA is low quality. My source are all between 3.0 and 3.1V @ 20 mA

Some will recognize the classic NPN feedback current limiter with 600 mV current sense limiting resistor. My design is modified to reduce that to 10% of that lost battery in the current sensor with voltage gain in the same design.

Anyone else seen this before? https://tinyurl.com/2xppph55

I defined 25 LEDs in parallel as matched LEDs to avoid thermal runaway, which my custom LED meet this criteria.
All run in parallel 25 * 20 mA = 500 mA which is designed for 3.6V the mean LiPo or Ion battery voltage.
The secret gain is from the 560R resistor negative feedback to prebias the current sensing of the lower NPN which cuts off the upper emitter-follower NPN and thus offs the current regulator below which is better than just a resistor for current limiting. This can be improved greatly using an Nch FET for the upper transistor , if you have one.

1666899213513.png
 

PaulBPB

Joined Oct 29, 2022
1
I can share this much, a 9.0 volt PP3 battery will be very short lived. If we just assume a 3.0 volt LED which draws let's say 15 mA it works out this way 9.0 volts - 3.0 volts / 0.015 amp = 400 ohms. Now if we do two LED in series it becomes 9 volts - 6 volts / 0.015 amp = 200 Ohms so with 2 three volt LEDs in series you want a 200 ohm series resistor. Since 200 ohms is not a common resistor you would go with a 180 ohm or 220 ohm series resistor. We use Vsupply - Vled / Iled. Again, with 25 LEDs regardless of how you wire them a PP3 battery will be very short lived. You really don't want too many LEDs in series when arranging a series / parallel configuration.

Ron
Led basics
You need to limit the current to the led. This is done by a resistor in series. To calculate the value Resistorvalue = (batt voltage - led's voltage drop)/required led current
If you do not use a resistor the led will in most cases draw more than it's designed maximum current and will die immediately to an early death depending on the supply 's internal resistance.
You are right the battery's internal resistance protected it with the PP3 but a high current capable battery will blow the led quickly.
I suggest and basic electronics course for everyone. You will be surprised how often you need na easy electronic solution in your life.
In fact I think in school science they must spend less time teaching chemistry and add a larg portion of electronics. Everyone needs electronic solutions regularly in their lives.
Enjoy your experimenting and playing around with Electronics.
 

Thread Starter

Harry_THP

Joined Oct 25, 2022
5
I suggest and basic electronics course for everyone. You will be surprised how often you need na easy electronic solution in your life.
In fact I think in school science they must spend less time teaching chemistry and add a larg portion of electronics. Everyone needs electronic solutions regularly in their lives.
Enjoy your experimenting and playing around with Electronics.
I only scraped a pass in my Physics GCSE- The electronics modules were horrifically taught, and concepts weren't really taught in amazing detail. Kicking myself of course now, as I've begun doing more electronics projects over the last year...


Again, with 25 LEDs regardless of how you wire them a PP3 battery will be very short lived. You really don't want too many LEDs in series when arranging a series / parallel configuration.
Been doing some thinking.. An AA battery has what? 2000 - 3000 mAh capacity? Am I wrong in thinking two of them would have a 4000 - 6000 mAh capacity? Considering my 25 LEDs have a current measured at around 130mA when I checked, that gives me a run time of anywhere between 30 - 46 hours. Much better. 2 AA's would provide 3V too, which is around what my white LEDs are rated at.
It seems too good to be true, or am I completely barking up the wrong tree?

Thanks everyone for all the advice

^H
 

Reloadron

Joined Jan 15, 2015
7,080
So with that in mind two AA in series will give you 3 volts. Adding two more in series parallel to the first two will double the current. A series / parallel wiring.

Ron
 

Thread Starter

Harry_THP

Joined Oct 25, 2022
5
2AAs in parallel will increase the mAh but not the voltage. 2AAs in series will increase the voltage to 3V but not the current.
So with that in mind two AA in series will give you 3 volts.
Okay yeah, so wiring them in series gives me 3V- That's still a capacity of 2000 - 3000 mAh
2000mAh / 130mA = 15 hours
3000mAh / 130mA = 23 hours

Plenty of runtime for what I need it for- No wasted current either, so no resistors needed?
 

djsfantasi

Joined Apr 11, 2010
8,672
Okay yeah, so wiring them in series gives me 3V- That's still a capacity of 2000 - 3000 mAh
2000mAh / 130mA = 15 hours
3000mAh / 130mA = 23 hours

Plenty of runtime for what I need it for- No wasted current either, so no resistors needed?
You’ll need a resistor. Actually, 25 resistors.

Since one LED requires 3V-3.3V, you’ll have to wire all 25 in parallel. Without resistors it might work if the AA batteries have sufficient resistance to limit the current below the maximum current of the 25 LEDs. That is 1/4A or more (25x0,01). If one LED has a higher forward voltage, it will draw more current and will burn out. Then, the remaining LEDs will draw more current. And one will blow until there is so much current, they all fail. That’s why you need a resistor per LED.

Unfortunately, to use a resistor per LED, the supply voltage needs to be higher so there’s headroom for the resistor to do it’s job. So 3 AA batteries

A series-parallel arrangement will use less current at the expense of requiring a higher voltage. I’ll use 24 LEDs as an example because the arrangement for a series-parallel is easier with that number. 4 LEDs in series results is 6 strings of LEDs in parallel. 4 LEDs require 12+V to operate. Plus 3V overhead. Each string will draw 0.01A and 6 will draw 0.06A - much less than 0.25A. But you’d need 10 AA batteries.

Your 130mA results because of the internal resistance of the 9V battery. AAs will have a different internal resistance. So your figure is incorrect. At 10mA like I said, you’ll need 250mA. On the low end, an AA battery rated at 2000 mAh will give you 8 hours. At 20mA, you’ll get 4 hours. Much less than your calculations.
 

Danko

Joined Nov 22, 2017
1,492
@Harry_THP:
Use driver CAT4238 for up to 10 LEDs.
It will fully take capacitance of battery 3x1.5V or 3.75V Li-ion battery with good efficiency.
You can set desirable current of LEDs by resistor R1 (it may be variable for brightness control).
And more - LEDs will not dim up to full discharge of battery.

1664632793464.png
 

Attachments

Last edited:

Thread Starter

Harry_THP

Joined Oct 25, 2022
5
Unfortunately, to use a resistor per LED, the supply voltage needs to be higher so there’s headroom for the resistor to do it’s job. So 3 AA batteries
Ahhhh you actually just answered something I was thinking about earlier, which was why battery strip LEDs have 3 AA batteries!


A series-parallel arrangement will use less current at the expense of requiring a higher voltage ... But you’d need 10 AA batteries.
Something I was considering initially when I was opting for a PP3, if you see my original schematics, but this is actually for a light up reindeer nose for a theatre production, I'm not sure the actor would be best pleased if I present them with a 10× AA battery case to carry around inside their costume:p

Your 130mA results because of the internal resistance of the 9V battery. AAs will have a different internal resistance. So your figure is incorrect. At 10mA like I said, you’ll need 250mA. On the low end, an AA battery rated at 2000 mAh will give you 8 hours. At 20mA, you’ll get 4 hours. Much less than your calculations.
Ah yes, something I seem to have overlooked. I believe my LEDs are 20mA in which case:

Total Current:
0.02A * 25 LEDs = 0.5A

Battery Runtime:
2000mAh / 500mA = 4 hours
3000mAh / 500mA = 6 hours


You’ll need a resistor. Actually, 25 resistors.

Since one LED requires 3V-3.3V, you’ll have to wire all 25 in parallel. Without resistors it might work if the AA batteries have sufficient resistance to limit the current below the maximum current of the 25 LEDs.
Okay, so, to what should be my final query, these are my resistor calculations:

Resistor Voltage Drop:
4.5V - 3V = 1.5V

Resistor Value:
1.5V / 0.02A = 75Ω

Resistor Power:
0.02 ^ 2 * 75Ω = 0.03W

I've seen some 1/16W (0.0625W) resistors online, but these are far too small for me to solder to anything with my current iron.
So I'd probably opt for 1/8W (0.125W) resistors. Seems silly to even ask, but I'm double checking anyway- It's fine to use a resistor rated for a higher power consumption, right? It's only when you use one with too low of a rating that things catch on fire..

I could buy 75Ω ones or 82Ω ones. In terms of my calculations, would it be sensible to use a resistor with that exact resistance, or should I go for the next one up, that being the 82Ω one?

So in short, would a 75Ω 0.125W resistor be suitable per LED when my calculations come out at 75Ω 0.03W?

Thanks for the insightful replies :)
 

djsfantasi

Joined Apr 11, 2010
8,672
It's fine to use a resistor rated for a higher power consumption, right?
Yes, it’s fine. In fact it’s recommended to use a higher rated resistor

or should I go for the next one up, that being the 82Ω one?
Go for the next higher resistor; the 82Ω one. Recalculate the current and power using an 82Ω resistor. Remember, an LED current rating is the maximum current the LED can take. Lower current results in slightly dimmer LEDs but increases the LED lifetime. Modern LEDs can often be run with a much lower current, even just 2-5mA.
 

Thread Starter

Harry_THP

Joined Oct 25, 2022
5
Yes, it’s fine. In fact it’s recommended to use a higher rated resistor
Nice, thanks, I thought as much!

Go for the next higher resistor; the 82Ω one. Recalculate the current and power using an 82Ω resistor. Remember, an LED current rating is the maximum current the LED can take. Lower current results in slightly dimmer LEDs but increases the LED lifetime. Modern LEDs can often be run with a much lower current, even just 2-5mA.
Okay great, so if I rearrange the equation we get:
Resistor Voltage Drop:
0.02mA * 82Ω = 1.64V

Voltage Provided to each LED:
4.5V - 1.64V = 2.86V

Not really much of a decrease at all really!
Thanks, now to order resistors and build the circuit!
 
Top