# Powering and dimming multiple (30 - 36) LEDs on batteries

#### beginnersluke

Joined Aug 26, 2015
35
Hi everyone,

I am trying to think through a project/design that involves a couple of different aspects. I've been trying to think through it for several days and have read multiple forums, but I keep running into problems, so I just thought asking for advice might be good.

What I'm trying to accomplish:

I'd like to power 2 sets of LEDs from batteries (the project needs to be portable and work anywhere).
• 1 set would need to appear to be on all the time, and it would be nice if it was dimmable. This would be 14-20 LEDs.
• 1 set would be "light chasing", so the LEDs would turn on, one after the other in a circle. (This would be 2 subsets of 8 LEDs, 16 total.) This would need to be dimmable.
I'd like to use some warm white LEDs and what I've found at Mouser seems to have a typical forward current of 20mA, and a typical forward voltage of 3.2.

My ideas/solutions:

I'm thinking of using 6 volts via 4 AA batteries. (This should be enough V, and last longer than a 9V. It would also allow me to use rechargeable batteries.)

For the first set (14-20 LEDs): I was thinking of controlling them with a 4017 chip running on a 555 signal (say 200Hz). This is to both "dim" the LEDs (though I do worry it will dim them too much, but it should be okay), but mostly so that the battery is powering 2 LEDs at once, not 14-20.

Is there any reason this is a bad idea? Is there a much better solution for what I'm trying to accomplish?

(Looking at the datasheet for the 4017, it seems I should use a transistor to actually drive the 2 LEDs assigned to each 4017 output. The chip cannot put out the 40mA at 6V that I would need, right?)

For the second set (2 sets of 8 light chasing LEDs): I can set up the light chasing with a 555 (with a pot to control the speed) and a 4017. The big issue I have here is the dimming, which I really need on this section. One idea was to setup a PWM with a 555, and then use 2 transistors to make an AND gate (1 input would be from the 4017, the other from my PWM). This really doesn't seem that elegant though (32 transistors).

Another idea was to use a SN74HCT244N with the PWN on the Output enable pin, and using the 4017 to drive the inputs/outputs. This seems much better, but is there any reason this wouldn't work well?

A third idea is to simply use a potentiometer? I may give this a try just to see (if it gives enough dimming range, but it seems easiest by far). The grounds of the LEDs could all be tied together and go through the pot. Is there a reason to avoid this solution (burning of battery power as heat, for example). Or is this the way to go, instead of trying to power a bunch of ICs from my already taxed batteries?

The big picture:

In case this is helpful, here's the larger scope of what I'm trying to do: I am making a portable sign for a friend. I am carving out wooden letters and then want to light them from above and below the letters (this is the first set of LEDs). The sign will have 2 Os, and I will install LEDs into those letters and want to do the whole light chasing thing. I'm just saying this in case there's like a way better way to approach the whole thing that I've missed here. (The sign will mostly be used in dark(ish) places, where the LEDs don't need to be that bright -- and too bright would be bad.)

PS:

What I originally wanted to was put LEDs into each letter, but this would have been like 70 LEDs total and I decided that was just too much to try to power with batteries (even with switching action and whatnot). However, maybe someone does have advice on how to do this. If so, I'd love to hear it.

(Could I maybe setup a 4017 for each of the 7 letters. 5 of them to just cycle through LEDs at ~200Hz, and 2 to cycle slowly? This would still leave the batteries powering 7 or so LEDs at a time as well as two 555 and like nine 4017s (a couple of letters would be more than 10 LEDs. I am trying to learn, but at this point, I have no idea if that's a reasonable thing to try, or totally bonkers.)

Thanks so much! Sorry for the long post; I wanted to give all the information that might be relevant. Thanks again!

#### Bernard

Joined Aug 7, 2008
5,788
Just a side comment. I have a 3AA battery box with a switch & 10 hour timer with 30 SMT parallel connected white LEDs. Total drain is 50 mA
with reasonable brightness. It might have come from Wall Mart or the net.
So maybe 70 LEDs is not unreasonable for the letters. Maybe pulse the letters at a 25% duty cycle if using 5 mA / LED ?
4017 should be able to drive 2 LEDs at 5 mA.. LEDs should have current limiting resistors unless you have several hundred LED to choose from. 4 Ni-MH batteries @ 2000 mA hr. should be good for 20 hrs.

#### Dodgydave

Joined Jun 22, 2012
10,086
For chasing and dimming, i would use a 555 variable clock and a 4017 to chase, with Npn Emitter followers for driving the leds, for the dimming use a 555 pwm with a mosfet output and feed your led Cathodes to the Mosfet Drain,.only one current limit resistor is needed per chip.

To cascade the 4017 chips, pin 12 is the Carry out clk to feed the second chip.

Edit,, this chip will output 30mA per channel, so Npn followers can be omitted.!!

Last edited:

#### beginnersluke

Joined Aug 26, 2015
35
Thanks Bernard, I really want to use white LEDs and could not find any lower current White LEDs.

Dodgydave, that looks like a good design and solution for the light chasing letters. Thank you.

#### Bernard

Joined Aug 7, 2008
5,788
If you can, vary the current in a white LED & see what current gives a suitable brightness. It might be around 3 to 5 mA?
How large are the letters?
I miss spoke on 4017 directly driving 2 LEDs, ok @ 12V but not @ 5V.

#### Audioguru

Joined Dec 20, 2007
11,249
I designed some LED chasers 14 years ago. They use four AA alkaline battery cells that last for 3 months with the LEDs at max brightness all day and all night. I got red, blue, yellow and green ones. I didn't bother using an AC adapter or a solar panel charging a battery.
I use a high output current 74HC4017 Cmos counter and blink each LED for only 30ms so it looks bright but uses a low average battery current.
I use an ordinary Cmos MM74C14 Schmitt trigger inverter for the clock oscillator, 30ms monostable and PWM dimmer.

#### Attachments

• 91.6 KB Views: 8

#### beginnersluke

Joined Aug 26, 2015
35
The letters are pretty big, about 4" tall.

As far as limiting current, this is where my understanding of things is limited.

I can figure out the resistor I'd need to achieve say 5mA with Ohm's law (or just one of the many LED resistor calculators).

However, in the real world I'm a little unsure about how much power/current the resistor is just turning into heat.

I mean, if I can just put a 360ohm resistor (to achieve 5mA @ 5 V with a forward voltage of 3.2 on the LED) and wire set 1 (the non-chasing LEDs) in parallel each with that resistor that would be much easier and draw a pretty reasonable 270mA for the LEDs only. I'm just not sure how much of a load the resistors in that configuration are consuming.

This would also allow me to use the same resistor configuration on the chasing LEDs, and maybe I could forgo the dimming circuit all together. (I was just concerned about those LEDs being too bright, since they could be looked at pretty directly in a dark place.)

So, let me ask a new question:

If I just wired 54 LEDs with a resistor to limit current to 4-5mA, and the remaining 16 running the same current, but cycling which one is on, does that sound like it could work?

#### djsfantasi

Joined Apr 11, 2010
7,913
You’re going to need a resistor with each LED when running at 5-6V anyway.

The load the resistors take is irrelevant in that case. It’s 5mA per LED & resistor regardless. And you're correct. You can choose the current through the resistor and forget about dimming.

Since you have calculated the resistor for a 5mA current, then your total load for the letters is n * 5mA.

The chasing LEDs depends on how you want the chase to appear. Common chase circuits are three LEDs in length, with one LED off. Thus, wire four circuits of LEDs (with one LED and resistor in parallel with the others in each circuit). The current draw of each sub-LED circuit is m * 5mA, where m is the number of LEDs in the sub-circuit. Hence, your chase circuit will require 3 * m * 5mA.

#### Audioguru

Joined Dec 20, 2007
11,249
Each LED has a different forward voltage even if they were made in the same batch. If connected in parallel then the one with the lowest voltage would light very brightly and quickly burn out, followed by the next LED with the lowest voltage etc. When the forward voltages vary then each LED needs to have its own resistor.

If you have a factory in China then you could buy thousands of LEDs and hire somebody to test them all and sort them into piles that all have the same forward voltage so they can be connected in parallel. I have a cheap Chinese flashlight with 24 white LEDs in parallel. The person who tested and sorted the LED forward voltages did a good job.

#### beginnersluke

Joined Aug 26, 2015
35
If each LED has a resistor limiting the current to 5mA (or so), then none should burn out, but I guess having wildly differing brightnesses would be an issue. (I mean, the resistors will vary a bit too, I suppose.)

The good news is, I can sort them based on brightness too (like the person who did a good job with your flashlight!) and just keep the brightest and dullest from being next to each other.

#### Bernard

Joined Aug 7, 2008
5,788
I just tried 2 different white LEDs & I agree with my self that 2 mA looks good, 2.7 V ea. 4.7k with 12 V supply.
I liked a low profile, frosted, 120deg VA, 5mm LED. 50 for US \$ 4.00 from The Electronic Goldmine. A sample is available
from me if in US.
With 4 Ni-MH batteries, average V =1.1 ea. R=820 ohms, 1/8 W @ 2 mA.

Last edited:

#### Audioguru

Joined Dec 20, 2007
11,249
If each LED has its own resistor with the same value as the others then the LED brightnesses will all look the same. But LEDs in parallel have a drastic brightness difference if their forward voltage is even only a little different because they are diodes, not resistors.

#### djsfantasi

Joined Apr 11, 2010
7,913
If each LED has its own resistor with the same value as the others then the LED brightnesses will all look the same. But LEDs in parallel have a drastic brightness difference if their forward voltage is even only a little different because they are diodes, not resistors.
Yes that’s definitely true. One has two choices
1. Accept the varying brightness
2. Test each LED separately and compare its brightness. If there’s an unacceptable difference then.,,
1. Pick a standard resistor that better matches the brightness
2. Try or calculate resistors in serial/ parallel combinations to match brightness.