Maximum LEDS
flying_flip
Posts: 36
Another project that I'm looking to do is to light up a R/C Electric Sailplane for night flying.
With the Basic Stamp (2 or 2px) I would like to be able to light/control as many LEDs as possible.
With 16 io lines it seems that 16 would be the number, but...
I noted other posts talking about decoders or de-multiplexers....
A 4-16 decoder would allow 4 inputs to be translated to 16 single outputs.
a0·a1 a2 a3 => y0 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15
1·· 1·· 1·· 1··=>· 0· 0·· 0··0··0 · 0· ·0·· 0·· 0··0··0··· ·0··· ·0··· ·0··· ·0·· 1· => lighting 1 led
and with persistance of vision I can stream through
multiple nibbles to light all or some at a time, without flicker?
With 4 decoders I get control of 64 leds
With·8 decoders I get control of 128 leds (but don't have enough io pins to activate them all).
This reduces the voltage requirements as well, correct?
Am I on the right track or blowing smoke?
Any assistance is appreciated.
Phil
With the Basic Stamp (2 or 2px) I would like to be able to light/control as many LEDs as possible.
With 16 io lines it seems that 16 would be the number, but...
I noted other posts talking about decoders or de-multiplexers....
A 4-16 decoder would allow 4 inputs to be translated to 16 single outputs.
a0·a1 a2 a3 => y0 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15
1·· 1·· 1·· 1··=>· 0· 0·· 0··0··0 · 0· ·0·· 0·· 0··0··0··· ·0··· ·0··· ·0··· ·0·· 1· => lighting 1 led
and with persistance of vision I can stream through
multiple nibbles to light all or some at a time, without flicker?
With 4 decoders I get control of 64 leds
With·8 decoders I get control of 128 leds (but don't have enough io pins to activate them all).
This reduces the voltage requirements as well, correct?
Am I on the right track or blowing smoke?
Any assistance is appreciated.
Phil
Comments
http://www.mouser.com/Search/ProductDetail.aspx?qs=vul0MlC/a1dPzYEx8Nqwxw==
Phil
Probably you want to 'clump' the LED's anyway -- assigning one I/O pin per LED is probably over-kill, unless you really want fancy LED cycling.
but am looking to use 100+ leds if possible.
Power doesn't have to come for the Stamp, just control.
Phil
Not exactly perfect for this app, the MAX7219 allows you to control eight, 8-segment LEDs. There is nothing to prevent you from using this chip to control LEDs that are not part of a 7-segment (plus decimal point) device.
The scan rate on the MAX7219 is proportional to the number of "digits" you drive..typically 800 Hz. I have used the MAX7219 extensively with 5 digits and seen no flicker. You can also use the 7219 to set the intensity very easily.
It's got 16 outputs and these have current regulators so you don't need series resistors for the LEDs.
They can be cascaded like the 74HC595 which only has 8 outputs. 6 of the MAX6969 gets you just under 100 LEDs.
Post Edited (Mike Green) : 12/3/2008 10:09:50 PM GMT
A single 7219 can support 64 LEDs with a single chip, but they are mux'd and that might cause flicker depending on the application.
Classic engineering design choice here: "Good, cheap, fast...pick two"
How can I run 6-8-more of them? (6 get me 96, 8 gets 128,etc.)
Do I not need 4 pins to communicate with it?
My though is BS2PX talks to the MAX6969's by sending serial ie. SEROUT command?
Are there any other chips I would need for this project?
I am not an Electric engineer by any stretch....But I want to put on a dramtic light show in the sky.
Thanks Mike, awesome, and allen for your feedback.
Phil
Be sure to read thoroughly the Basic Manual's chapter on the SHIFTOUT statement. Also read the MAX6969's datasheet, particularly the sections on how it works.
I assume you want the blinking action of an airplane's tail light ect?
why not use a 555 timer to turn the LEDs on/off at a predetermined rate?
then via a transistor; turn on power to the 555 using a single IO pin from the stamp?
555's usually have a output current rating of 200ma so you could run more then 4 LED's if you wanted.
Right now that 555 is set to blink 200 times a second, slower times are easy to create.
Seems to me you guys are making this more complicated then it needs to be
I'm aware that I "could" just light the tails and wing tips, but I want to put on a light show !!
And when you can get the hardware to do something unusual, you tend to want to do unusual [noparse]:)[/noparse]
Mike, once again, Thanks.
Then the fun begins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
The plane that I will be putting this into is starting to sound like the Electric Allegro-Lite (2 meter).
The planes design is 18 ounces all up, with the ability to handle 20 oz of ballast.
The light show version shouldn't be more than 24-28 ounces....
It's suppose to be fun [noparse]:)[/noparse]
Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
I am having issues with the first pattern that I'm coding.
If I use this code, only 1 "set" of LEDS can be "lit" (the last set).
If I use this code, all sets are active.
I am using a shared Clock, and a shared Latch.
Is there another way other than wiring 6 latch pins?
Thanks,
Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
running 1 LED per pin on the MAX6969 gives me 16x6=92 or 2LEDs in series on each pin will be 32 X 6 = 192
On the Stamp...
1 shared clock line
1 shared Latch
1 output pin per MAX6969 (6)
Phil
You would only need one stamp pin to control all six with the shared clock and latch.
**
Each is passed on a differnet clock cycle, but I guess that the same as parallel....
not sure.
Phil
In series, you only need to latch once after the shiftouts.
Remember in series, the first shiftout goes to the last on the chain, and pushes back with each shiftout afterwards.
I guess it depends on what you are trying to achieve, i think it be worth a try.
**
You could also use a single MAX6955 http://datasheets.maxim-ic.com/en/ds/MAX6955.pdf
Maybe someone with a better understanding of LEDs and multiplexing could tell us if/how many resistors are needed with the 6955...but I am guessing, if configured correctly, and with a big enough Iset value, you might not need many resistors at all.
SHIFTOUT Dpin, Clk, MSBFIRST, [noparse][[/noparse]counter\16]
PULSOUT Latch1, 1
SHIFTOUT Dpin, Clk, MSBFIRST, [noparse][[/noparse]counter\16]
PULSOUT Latch2, 1
SHIFTOUT Dpin, Clk, MSBFIRST, [noparse][[/noparse]counter\16]
PULSOUT Latch3, 1
...
It's all on a breadboard right now, so best to get it right before burning circuit boards [noparse]:)[/noparse]
Thanks,
Phil
Apparently I can't count well [noparse]:)[/noparse]
I picked up 6 MAX6969 chips, and 96 leds, only to find that that will only cover 1/2 of the wing.
Instead of 16 bays, I have 32 bays.
With 6 leds (1 for each color) in each bay, I come to 192 Leds, and 12 Max6969's.
The Professionally done Circuit boards will be a godsend (and inexpensive ($60USD) for 3)
I now need to pick up another raft of LEDs, and 6 more MAX6969's before I can proceed on the build.
The LED circuit boards (1 per colour) will be mounted in the front portion of the wing, while the Power and Stamp boards will be placed inside the fuselage.
Therefore I can't close up the wing, until I have the LEDs·wired to the boards.
This is going to take a while....
I did come across a few issues when coding for the Serial version of controlling the MAX6969's, in that one or 2 of the chips would not get values, even though later on they do....
(looping through colors blue,yellow,red,green,white,orange,blue... the white and or orange would light after the first or second pass, not on all passes...)
Not concerned at this point as more parts are needed, and the code will change.
I think the final version will be a combination of Series and Parallel·for the MAX6969's
2 Chips per colour in Series, and 6 colour/pairs in Parallel.
With 8 leds set aside for the illumination of the tail surfaces, this plane will have at a minimum 200 leds.
(maybe 2 leds on the propeller to light it while spinning.)
This is going to be fun [noparse]:)[/noparse]
Phil
·
Since you are redoing this, you should look at the MAX6955, I think it will make your life a LOT easier.
Here is the final layout.
The Service that I'm going to use, will do 3 identical boards, for just over $60 USD.
I will be running 12 MAX6969's so, I need to have 4 per board (all boards will be further cut for placement in the plane)
Each pair of 6969's will hold one color.
They will share a clock, and share a latch, Enable will be wired to ground.
I built in a Pin Header for both the Stamp2Px, and the DB9 connector, so that all I need to do if I want to re-program is to plug in 1 connection.
I will also get extra of the Power supply layouts, although I only need 1 for this project, I will use 2 on my Scooter project, and have a few "spares"
Comments welcome.
Phil
They look great.
I still need to pull in another 100 LEDs, and 6 more MAX6969, but this is going to be sweet.
Phil