For the past couple of days, I thought it would be really cool to make either my own marquee hat, or eventually a vest of LEDs. It could display words or pictures (using PWM to dim the lights and get something besides ON and OFF) and it would be really hard to not notice a flashing LED vest.
Now, since I’m just a programmer, I’m used to having all the outputs on my processor. As far as I know, there’s not a processor in the world with a few thousand outputs…that would be impractical and stupid. But how do I multiplex? What chips are available?
I started Googling around, and remembered seeing Christmas light controllers on computerchristmas.com and immediately went there. On that site, there’s 2 different methods of controlling lights; one involving flip-flops and decoders (Link) and one with 595 shift registers (Link).
Both of these seem horridly inefficient, especially if the final goal is to have thousands of channels (can you picture me with a huge box of flip-flops on my back?:yikes: ). Is there a better method? I’m probably going to learn some of this at college, but I’m not there yet (I wish…).
How do real commercial marquees do it? They have cool multi-color effects and fading in and out…I’m sure it’s all pulse-width because I can see them flicker.
So…any suggestions would be greatly appreciated.
Here is something to take a peek at! Link
We have over 33,000 LED’s on it including a strobe to each panel. We use the serial port on the back of a laptop in order to control 34 different micro controllers which in turn control four different triangles. I really can’t elaborate too much on how it works, but Alan Anderson can.
I saw an awesome vest with fiber optic lights woven in it. It diplayed the coolest light show on his back. At the 2006 Boston match, there were people from MIT’s Waerable Computer lab. http://www.media.mit.edu/wearables/index.html
LED displays frequently use row/column multiplexing to make moving and animated displays. An LED only needs to be turned on for a short period of time for the human eye to notice it. As long as the refresh rate exceeds 24 Hz (30Hz is the TV vertical frame rate) then the human eye integrates the LEDs into a still or moving frame. You then just need to produce row and column switch generators and output a control signal in sync with the row/column encoder.
we’ve talked about doing something like this…
one way you could try doing this is with n-bit counter chips, attaching an LED to each bit of the counter, then count up on the counter until you get to the state you want. processor should be able to do it faster than you could notice, although using 4-bit counters doesn’t expand your ability too much.
i’m no EE, but if someone who is could critique this idea, that would be awesome:
you arrange your LEDs in a matrix, with one end of the diode connected in each column to every other in the column and the other end of the diode connected in the row to every other in the row. each row and each column’s continuity is controlled by a transistor, so closing the transistor on a row and a column will complete the circuit. not sure how you’d deal with the current requirements of LEDs to avoid blowing them or anything, or if this will work at all, but just throwing it out there. i could probably draw a schematic if my description wasn’t clear…
It’s a pretty good idea, but instead of a counter just use a shift register (as described above).
As has already been discussed, the only realistic way to build a large LED array is to scan through them using rows and columns. Once you have that in place (using just ON or OFF states for each LED), you can then implement brightness by scanning faster. For example, if you normally turn on one of the LEDs for 10 milliseconds when it’s supposed to be “ON”, you can subdivide that 10ms further to implement brightness. ON 2.5ms OFF 7.5ms for 1/4 brightness, ON 5ms OFF 5ms for half, etc. The challenge here is not having so many LEDs that your scan time for each LED is too low. Depending on how many LEDs to want to have total, you might have to break down the overall matrix into smaller grids and have a microcontroller dedicated to each grid. If you want color, then repeat the whole process with a different color LED. Once you do that, then you need to figure out how to communicate with all of them. As you can probably tell, the basics of an LED matrix are straightforward, but the practical implementation can get complicated.
we though of like a LED moving team sign thing.
the programming part shouldn’t be too bad (well, depends on how complicated you want to make it), but finding a portable power supply was a problem for us.
Essentially, what an 8255 gets you is 24 bits of I/O from 8 pins on your processor. (An 18F8722 has I believe 8 ports of I/O or 64 lines, so, if you really wanted to just with one level of multiplex, one 8255 chip per port, you could run 192 led’s). The interface is REALLY simple, just sit down with the data sheet and about one cup of coffee (or tasty beverage of your choice) later you should have enough knowledge to go out and hook up an 8255 to your processor of your choice.
Of course, if 192 output lines isn’t enough, you can just add another level of multiplexing (1 byte I/O from processor => 1 8255 Chip => One 8255 chip for each byte on the previous=> 9 bytes of I/O per 1 byte of processor I/O (or 72lines per every 8)). So, if you added one more level of multiplexing on all of those ports you’d still EASILY make your update rate with the 18F8722 (or other 40MIPS+ processor) and be able to run up to 576 led’s.
BUT! Remember to put resistors in series with your leds or you’ll easily go over the 2.5mA per line drive current. You’ll most likely need a darlington array IC to drive your LED’s in the end if you want bright ones… but thats another story which i’ll write if there is interest.
Have fun! Sounds like a fantastic for-the-heck-of-it-project!
2.5mA is likely not going to cut it. We typically supply 10mA to LEDs in our projects, and that is acceptable but usually not super-bright, and this is for regular status LEDs that are not multiplexed. When you multiplex them, they’re only on for a fraction of the time, making them appear even dimmer than usual.