Page 1 of 4

### 1,000 LED Sequencer

Posted: Wed Dec 10, 2008 4:20 pm
Ok, I'm not going to build the thing, but twice I've pulled out a 10 year old piece of paper that I've scribbled a quick schematic of a 100 LED sequencer. I seem to remember someone asking for it and it was kinda fun to tinker with.

Anyway, the object now is to design a 1,000 LED sequencer(one LED at a time), with a minimum of parts (other than the LEDs of course).

So far I've only been able to come up with a circuit that requires 110 Transistors, 120 Resistors, and 3 ICs. This doesn't include the clock osc., so add another IC for that and maybe one for the power supply.

The only uses I can think of would be something like a Fireworks sequencer, or race track sequencer, or possibly a clock that rotates one LED at a time every minute. Who knows.

I'm curious as to what interesting ideas that any of you have. Thanks!

evahle

### Re: 1,000 LED Sequencer

Posted: Wed Dec 10, 2008 5:42 pm
evahle wrote:Anyway, the object now is to design a 1,000 LED sequencer(one LED at a time), with a minimum of parts (other than the LEDs of course).
Max LEDs at any instant: one
Min LEDs at any instant: one
All LEDs of same type and colour

Charlieplexing would be the most efficient
use of resources for this task.

From this we can deduce that a matrix of 1056 LEDs
would require 33 IO lines. (1056 > 1000).

So an S/R of 33 length, which could be
control of data and you're done. Six ICs plus PSU,
plus 33 ballast resistors.

QED

Posted: Wed Dec 10, 2008 6:34 pm
perhaps that was a bit tongue in cheek. You will need to tell us a lot more about what you want.

what kind of sequences do you want? How fast do you want to be able to change the lights? What is the maximum number of LEDs on at the same time? If you want all of them on at the same time you will need at least a 10 Amp (up to 20 Amp) power supply.

### 1,000 LED Sequencer

Posted: Wed Dec 10, 2008 7:08 pm
Bigglez,
Excellent idea! I forgot about Charliplexing where it uses all three states of an I/O line for multiplexing.
A couple of years ago I started getting into that. They say it can be a bit perplexing, but I'm curious as to what it will involve. I printed out the Wikipedia article that you used for the link, and I'll read it tomorrow.

Philba,
I think I'd make the maximum current per LED at about 20ma. It would depend in part to the speed that was chosen. I really don't have a requirement for the speed other than it would have to suit the application. For instance if you wanted to make a clock, you'd want to make it sequence all 1,000 LEDs in either one second, one minute or an hour. Your choice. Anything goes.

Second, the sequence would only be in one direction, and only one LED will be lit at a time.

evahle

### CharliePlexing

Posted: Thu Dec 11, 2008 5:07 am
Bigglez,
I read the article at Wikipedia this morning. From what I understand, I would be able to sequence 1056 LEDs using only 33 I/O lines. I looked up a uController for this and I thought maybe a PIC16CR74. However, from my understanding of CharliePlexing, you wouldn't need anything but this uController and 33 resistors. Is there a reason why you needed the additional ICs?

Anyway, the programming required for this isn't too difficult from what I see. By keeping all I/O lines set for input (Tri-State), except for the two lines we will be working with, the program would look something like this:

Select I/O line #1, set it to High:
Then set I/O line #2 to low. (keeping the other 31 lines in Tri-State)
Then set I/O line #3 to low. (resetting line #2 back to Tri-State.)
Then set I/O line #4 to low. (resetting line #3 back to Tri-State.)
.
.
Continue this all the way up to I/O line #33

THEN Select I/O line #2, set it to High: (resetting Line #1 to Tri-State)
Then sequence the other 32 lines the same way as above.

Do this until all 33 lines have been set to high, then start all over.
(This will sequence up to 1056 LEDs, as you said)

The circuit that I had come up with would have used; 3-4017 counters, 110-2N3904 transistors, 110-10k resistors and 10-470ohm resistors, plus a clock chip, such as a 555 timer. The good point is, since programming is so darn boring for me, it doesn't require programming. (Remember, I'm doing this just for fun)

Your circuit uses considerably less parts, would be fairly easy to program, but the wiring may be complex. However, I haven't sketched a quick schematic on it, to see how it would be wired up.

My first idea years ago was simply use a 4017 counter to sequence 10 LEDs, then use another 4017 to sequence 10 banks of 10-LEDs each, for a total of 100 LEDs. Lastly I added another 4017 to sequence 10 banks of 100 LEDs each. I used transistors to turn OFF and ON each bank. It may sound complicated, but it isn't.

Any more ideas out there? I think we have a couple of good ones, but there is always somebody coming up with something new, and I really think this can be fun to tinker with. My thoughts are that maybe we can come up with a way to decrease the number of transistors, while not using any additional ICs.

Thanks.
evahle

### twinkle twinkle LED...

Posted: Thu Dec 11, 2008 5:27 am
here's a variation request if anyone has a drawing for it... how about a 100 led string (or more) of individual random flashing LED's.. that's what I'd like to put together for house lights at Christmas time. Seems everyone sells the LED Christmas strands, and some turn on and off, but none have the "old" fashioned twinkle that for some dumb reason has been long since discontinued.. thanks..

Posted: Thu Dec 11, 2008 6:55 am
Hi there,

Although three state multiplexing has been around for some time now,
there are still a few mysteries that havent gotten around too well yet.
There are two problems in particular that i would like to discuss,
with the first being rather simple but the second even Wikipedia
didnt get right.

One is the total number of LEDs that can be scanned with a given
number of control lines. This is easily solved however by examining
a few examples and realizing that it's the simple permutations forumla:

P(n)=n!/(n-2)!

where the exclamation point represents factorial and is equal to:
n!=1*2*3*...*n
so for n=3, n!=6.

What P(n) tells us is the total number of LEDs that can run off of
a given number of control lines, n, so we know what to expect.
For example, say we only have 3 control lines...

P(3)=3!/(3-2)!=6/1=6

so, we can control 6 LEDs with 3 control lines.

Also of some interest is that the formula, knowing the number
of LEDs for a given n, when we want to increase the number of
control lines by 1 is even simpler:

P(n+1)=P(n)+2*n

or stated another way, if n=3 we know that this will control 6
LEDs, so if we increase n by 1 (to n=4 for four control lines)
the number of LEDs would increase by 6, because 2*3=6, so
we would end up being able to control a total of 12 LEDs
(6+6=12).

The second problem is a lot less commonly known. Wikipedia
as of 12/11/2008 states that each LED is driven one at a time,
and although this CAN be the way to do it, it's not the ONLY way,
and in fact this takes a much higher scan frequency and also may
reduce the duty cycle too low to be successfully used for some
number of LEDs or LED segments. There is a limit that is reached
once we get to a larger number of LEDs where if you turn one on
at a time you reduce the duty cycle so low that it would take a
current that is much above the peak rating of the LED to drive it.
Even a 5 to 1 peak rating isnt good enough in some cases.
This means an alternate way of scanning has to be incorporated
in order to both scan the LEDs correctly and also to keep the duty
cycle high enough so that a reasonable peak current can be
employed to make sure the LEDs shine bright enough for a typical
display.
If the LEDs are divided up into rows and columns similar to when
standard multiplexing is used but instead using three state
multiplexing the LED duty cycle can be kept higher and still
able to drive more LEDs than with standard multiplexing.
I had worked out a scheme for 100 LEDs but i am a loss as to
where it is on the web now, especially since AOL has graciously
discontinued allowing members to post web pages in Hometown
now. It does exist on the web somewhere else, so i'll just have to
find it before i can post here with the results.

Since the point of this thread is to do 1000 LEDs however, that will
take a bit more planning and perhaps even dividing up the LEDs
into groups.
One thing i havent done yet is come up with a general formula for this
new type of multiplexing but it's not hard to understand once
you see the schematic and a very rough description.
I'll start looking and get back here, unless someone else can find

Here is a drawing, from memory, of the traditional way of
Charlieplexing vs true three state multiplexing. As shown,
Charlieplexing only allows one LED to be turned on at a
time, while with true three state multiplexing more than one
LED can be turned on at any given time. For the simple
example shown, turning any two LEDs on at a time means
raising the duty cycle by a factor of 2, which increases average
current by a factor of 2, which is significant. This has
even more of an impact with larger displays, and i hope i
can find that better drawing as the turn on pattern technique
is much more obvious than it looks at first.
Of particular interest is that the duty cycle for Charlieplexing
is 1/12 of the total scan time, while for turning two LEDs on
at any given time the duty cycle for any LED is 1/6, which is
better.
If i remember right, a 100 LED matrix can be done with a duty
cycle of 20 percent per LED, which is MUCH better than only
1 percent per LED with traditional Charlieplexing. This means
that with Charlie the average current through any LED would
be Ipeak/100 which would be roughly 1ma per LED (not a lot!)
but with true three state multiplexing would be 100/5=20ma,
which is very good for most small LEDs. This clearly illustrates
the huge impact this can have on a display.

The disadvantage of course is that more resistors are required,
and a few more control lines might also be needed in some cases
in order to divide the LEDs up properly for correct scanning.

In this drawing, the black L is a constant low, never turned off,
and the red H is a high that turns the red LED on constantly.
The blue H is a high that turns on the blue LED, and the
green L is a low that turns on the green LED. For that line
#3 the choice is to either apply a low or a high depending
on what other LED is to be turned on. Driving line 1 is
similar.

### CharliePlexing...

Posted: Thu Dec 11, 2008 8:27 am
Hi MrAl!
I hated to see you spend so much time on Duty Cycle, because I assumed that we would not be trying to make all the LEDs appear to be ON at the same time, as in a 7-Segment stick display multiplexing.

As an example; if I wanted to make a clock with the 1,000 LEDs, I would want to have one LED on, for say about 1-second, then turn off while turning on the next LED. The duty cycle would approach 100%. We don't have to worry then about how many LEDs we have. We should be able to have as many as we like.

As for the fomula on Charlieplexing, I've done that and here's what I wound up with:
If L = number LEDs, and: N = number of I/O pins

Then; L = N^2-N

And therefore; N = (SQR(4*L+1)+1)/2

I couldn't find anything in Charlieplexing that would cause a problem except possibly wiring it up, but I haven't tried it, yet.

Thanks!
evahle

### Re: twinkle twinkle LED...

Posted: Thu Dec 11, 2008 9:06 am
frhrwa wrote:here's a variation request if anyone has a drawing for it... how about a 100 led string (or more) of individual random flashing LED's.
I've done a couple of "thought exercises" to get this effect for
holiday lights and the problem is not trivial.
To light a single LED independently of the others requires a
LV power supply. Also, multiple wires must pass through the
earlier in this thread as Charlieplexing would offer the greatest
reduction in wiring.

### Re: CharliePlexing...

Posted: Thu Dec 11, 2008 9:44 am
evahle wrote:Hi MrAl!
I hated to see you spend so much time on Duty Cycle, because I assumed that we would not be trying to make all the LEDs appear to be ON at the same time, as in a 7-Segment stick display multiplexing.

As an example; if I wanted to make a clock with the 1,000 LEDs, I would want to have one LED on, for say about 1-second, then turn off while turning on the next LED. The duty cycle would approach 100%. We don't have to worry then about how many LEDs we have. We should be able to have as many as we like.

As for the fomula on Charlieplexing, I've done that and here's what I wound up with:
If L = number LEDs, and: N = number of I/O pins

Then; L = N^2-N

And therefore; N = (SQR(4*L+1)+1)/2

I couldn't find anything in Charlieplexing that would cause a problem except possibly wiring it up, but I haven't tried it, yet.

Thanks!
evahle

So you only need to light up one single LED at a time? That's
great...makes it a little easier. The discussion i was into was
about creating patterns on the LED display, which i think you
might end up wanting to do anyway because after all with
all those LEDs might as well use them for the best thing you
can do.

Here's the number of lines required for a given number of LEDs:
nLines=floor(sqrt(nLEDs))+1

Thus 33 lines are required for 1000 LEDs.

But that's for true multiplexing a different way...

Here's the drawing...

### Re: twinkle twinkle LED...

Posted: Thu Dec 11, 2008 11:01 am
frhrwa wrote:here's a variation request if anyone has a drawing for it... how about a 100 led string (or more) of individual random flashing LED's.. that's what I'd like to put together for house lights at Christmas time. Seems everyone sells the LED Christmas strands, and some turn on and off, but none have the "old" fashioned twinkle that for some dumb reason has been long since discontinued.. thanks..
Hi frhrwa! Getting the LEDs to look random isn't really too hard.

Like you've said, the older incandescent bulbs used to twinkle in random. That was because some of the strings had a white bulb that actually had a thermal switch inside. When it would reach a certain temperature, it would turn off that string of bulbs. Some of these strings had some bulbs that would stay on, because it didn't include the switch. I remember when some lights would twinkle too much, I'd replace the white bulb with another color.

Anyway to answer your question, the LEDs could be attached to a 4017 counter like my other circuit, but instead you would place the LEDs at different locations in the string. With 100 LEDs, it would look pretty random, I think.

Also, since the 4017 can have a Vcc of +15v, you could easily put 6 LEDs in series on one line, then maybe 2 LEDs on another line, and say 4 LEDs on the next one, and so on, for all 10 lines from the 4017 chip. Then place each and every one, randomly, in the string that you make for the tree. I doubt if anyone would be able notice a sequence.

Now multiply that by 10 to get 100 LEDs and that should do it! You might add a few LEDs that are ON all the time as well.

Hope this helps!

evahle

### 1,000 LED Sequencer

Posted: Thu Dec 11, 2008 11:12 am
Hi again MrAl. Wow, you're sure fast with the schematics!! I printed it out, and I'll look at it tonight to see how it works.

Thanks!
evahle

### Re: twinkle twinkle LED...

Posted: Thu Dec 11, 2008 11:50 am
frhrwa wrote:here's a variation request if anyone has a drawing for it... how about a 100 led string (or more) of individual random flashing LED's.. that's what I'd like to put together for house lights at Christmas time. Seems everyone sells the LED Christmas strands, and some turn on and off, but none have the "old" fashioned twinkle that for some dumb reason has been long since discontinued.. thanks..
I've started a new thread here to separate the 1,000 from the 100
LED discussion.

### Re: twinkle twinkle LED...

Posted: Mon Dec 15, 2008 3:16 pm
frhrwa wrote:how about a 100 led string (or more) of individual random flashing LED's.. that's what I'd like to put together for house lights at Christmas time.
How about a mix of 33 of these, 33 of these and 33 of these? They would all eventually go out of sync due to variations in manufacture causing the "random" effect you are looking for..?

Also, I've seen strings of RGB LEDs that do the same thing as they slowy get out of sync with each other. Some examples here.

Vern

Posted: Tue Dec 16, 2008 10:21 pm
dONE WITH TWO COMPONENTS!

One current limiting resistor.

One single-pole, thousand-throw switch.