Reducing wire count for a few hundred LEDs question.
T&E Engineer
Posts: 1,396
I am working on a project with a few hundred LEDs that are in one box or module per say.
I have another circuit box /·module with 10s of 4017 LED driver ICs that need to be connected to the LEDs box / module. There may be·300-600·LED Anode wires needing to be connected to the·circuit box / module.
Is there an easy way to do this without having to run 300 to 600 wires from one box / module to the other box / module ? I guess·using (6-12)·50 pin SCSI ribbon cables may work. I need to have connectors that can be professionally mounted to a box / module case on both ends.
I was wondering if it would be possible to use cascaded 74HC165 Parallel to Serial into cascaded 74HC595 ICs? If possible this would reduce the cable down to 3 wires (Clock, Data and Latch).
Do these 3 wires still have to be connected to a BS2 or SX28 using a SEROUT command to drive the Clock, [noparse][[/noparse]Data?] and Latch lines?
If this is not possible, what other alternatives can I use to make the cables leaving the boxes / modules at a minimum?
Any help would be appreciated.
Thanks,
Timothy Gilmore
Post Edited (tdg8934) : 1/1/2006 10:15:16 PM GMT
I have another circuit box /·module with 10s of 4017 LED driver ICs that need to be connected to the LEDs box / module. There may be·300-600·LED Anode wires needing to be connected to the·circuit box / module.
Is there an easy way to do this without having to run 300 to 600 wires from one box / module to the other box / module ? I guess·using (6-12)·50 pin SCSI ribbon cables may work. I need to have connectors that can be professionally mounted to a box / module case on both ends.
I was wondering if it would be possible to use cascaded 74HC165 Parallel to Serial into cascaded 74HC595 ICs? If possible this would reduce the cable down to 3 wires (Clock, Data and Latch).
Do these 3 wires still have to be connected to a BS2 or SX28 using a SEROUT command to drive the Clock, [noparse][[/noparse]Data?] and Latch lines?
If this is not possible, what other alternatives can I use to make the cables leaving the boxes / modules at a minimum?
Any help would be appreciated.
Thanks,
Timothy Gilmore
Post Edited (tdg8934) : 1/1/2006 10:15:16 PM GMT
Comments
Yes, cascading '595s will dramatically reduce the number of wires to control the LEDs. However, depending on the application, there could be a problem with the response time turning on or off LEDs.
It will take a finite amount of time to send the serial data through all the '595s to turn on or off LEDs that are "further down the chain" of '595s.
Another thing to condider is whether or not the power supply has enough current capability.
If all LEDs are on at once at a scant 15 mA, 600 x 0.015 mA·= 9 Amps. Far more than any wall-mart power supply can supply (any one that I have seen).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Are you saying that I can use:
Cascased 4017s·==>cascaded 74HC165s ==>connector 1==>3 wire cable??==>connector 2==>cascaded 74HC595s==>300-600 LED anode wires
What about driving the Clock and Latch? Is this needed.
Also I won't be turning on more than 1 or 2 of them at a time so current issues are not a problem.
Let me know...
If I can't do this approach...Recommend any cables?
Thanks,
Timothy Gilmore
Why not set up the display as one matrix or several matrixes, and scan them (like TV) where only one (or one from each) is on at a time?· If you scan them, you'll have to run them at "high" currents (>20 mA), but that is allowable given a low duty-cycle (ON-time.)
With using all the port bits on an SX28, you can DIRECTLY drive 380 LEDs without ANY external components other than a total of 20 resistors and 20 wires. That's all you need!
Now, depending on what else your SX needs to do, as in sensing things that cause the display to activate or change, then the 380 number is reduced approximately by the square of the number of port bits consumed for those purposes.
So if you needed to drive more LEDs than that, simply have 2 SX's communicating over one line, still leaving you 342 LEDs per SX28, minus the square of whatever port bits you need for other things.
Quite simple really when you think about it.
Cheers,
Peter (pjv)
Post Edited (pjv) : 1/2/2006 3:18:51 AM GMT
The LEDs will be·soldered in a separate box and by another person and can't be soldered in a matrix format because they will be at random places - so the cascaded 4017's have separate anode outputs.
I also found out the project LED's have been increased to 650+ LEDs now. This is going to be alot of soldering.
I really need to know if I can convert the 4017 outputs from parallel to serial with a cascaded 74HC165s and possibly convert them back in the LED box (serial to Parallel using cascaded 74HC595s).
If this is not possible, I am going to have to use (26) DB-25 cables to run all of the 650 outputs to the LED box.
I know SCSI uses 50 pins and I may use this but I want to see what my alternatives are.
Thanks for the great comments!
Timothy Gilmore
I can't understand why you want to do things the hard way; you dont need all that other logic; each box of (up to 342) LEDs just has a power wire, a common and a serial comm line.
Stick an SX28 in the box, and wire up 342 LEDs to it, reserving one I/O line for serial coms to it.
If you need more LEDs or more boxes, repeat the process with up to 342 LEDs per box or per SX, again communicating over the same comm line.
Have your master SX that is doing the keybord work communicate to these slaves via one of its 3 spare I/O pins.
Control thousands of LEDs if you like.....full scalable without practical limit.
Even control the brightness if you like.
Piece of cake!
Cheers,
Peter (pjv)
Post Edited (pjv) : 1/2/2006 6:38:08 AM GMT
Peter is right. Just because the LEDs aren't physically in a square matrix doesn't mean you cannot wire them in matrix fashion.
I did this years ago with a PC parallal port. I used only two 4-to-16 decoders and 16 inverters to control 256 LEDs from one 8-bit port.
Of course only 1 can be on at a time, but if you need 2 or 3 you just flip back and forth quickly.
Peter are you use the so called "Charlieplexing" ? Could you maybe show a smaller matrix example ?
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"I hope the goonwave is not vaporware"
·
I did not want to tie up a computer for the project, so I am using a mini-
keyboard with a PAK6.· The number of the LED I want to turn on is entered on the keyboard and sent to a BS2E.
I have 2 slave Stamps, each with five groups of 6 daisy-chained 595s. When the BS2E receives the LED number from the PAK6 it determines which slave it goes to and which group on that slave to call.
serout so, baud, [noparse][[/noparse]"A", 1, 36]···· 'transmitted to both slaves
On slave 1:
serin si, baud, [noparse][[/noparse]WAIT("A"), dec grp, dec ix]
Slave 2 ignores the serout since it says serin si, baud, [noparse][[/noparse]WAIT("B")....
Slave 1 shiftouts to "grp", in this case Grp 1, and sends a command to turn on LED "ix" = LED 36.
Both slaves use lookup tables to determine the proper command to send to Grp1, and each slave has a 2x4 header for each of the 30 595s.· This simplifies wire identification.· The header from 595-1 controls LEDs 1-8, the header from 595-2 controls LEDs 9-16, and so on.
The number of LEDs can be increased to 720 by adding another slave PC board.
The entire system is the essence of simplicity.· Programming is lengthy but very repititious, meaning you can copy and paste the lookup tables, changing only the shiftout commands to reflect the grup you are using.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
Perhaps I can figure something out easy in the wiring method.
The person has a large map·4' x 5' or so with various locations that will have LEDs representing them. ·As you know map locations·are not layed out in a nice square format and I will not know where all the 650 locations are at. Perhaps I need to ask him to coordinate this with me and I can draw out a representation matrix on paper first. This will be more work on his end but save us all the extra wiring.
The other issue is that 650 4 digit numbers will have to be stored in a lookdown·table. I have this working already for few numbers entered it on a·BS2. I'm concerned it will be too big in EEPROM size for a BS2. I have a BS2px and SX28's. If I use·an SX28 with SX/B,·can I use a big Lookdown table (or will I have to do·some programming tricks when it gets too big for the initial 2K EEPROM (e.g. bank switching needed)??
Peter,
How do you get 342 LEDs with 20 I/O line from the sx-28. It seems like an strange LED count for 20 I/O lines. You mention 20 resistors too. I thought resistors should only be placed on one end of the resistor not all 20 I/O lines. Please explain.
Thanks for everyone's comments.
Timothy Gilmore
· The number comes from 19 I/O lines (he left one for serial I/O). and it's (IOs ^ 2) - IOs so 19^2-19 = 342
· Here is a website that explains it http://www.maxim-ic.com/appnotes.cfm/appnote_number/1880
· Also I was wrong about only 1 LED being able to be on a time too.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"I hope the goonwave is not vaporware"
Post Edited (Bean (Hitt Consulting)) : 1/2/2006 4:21:20 PM GMT
I came up with another approach in that I will provide the user my circuit board with 650 terminal pins to solder to. This will be contained inside of the 650 LED box (if there is room). I don't know....
Then a single cable can be run down to the keypad and serial LCD as a user interface box.
2 boxes are used just components are shifted around a little.
I am trying to make this as simple as possible for the other user and still make it look professional.
This leads up to another question. Does anyone know where I can get 650 solderable connections (connectors?). This would be on the 80+ driver ICs board(s) inside the 650 LED box.
Thanks,
Timothy Gilmore
Could you use 50 connector flat ribbon cable and split the wires on one end to the led connection? You could then crimp on a 50 pin female header, that plugs into a 50 pin male header on board... It would take 13 of em, and would eliminate some of the soldering, and if you get the color coded cable, it would be easier to keep track of the wires..
The ribbon cable can be had in as long as you would need it to be..
Bob N9LVU
That's what I originally thought about but wasn't sure if the other user would just use hook up wire or ribbon cables. If the circuit boards can fit inside of the LED Map box, (waiting to hear back via email) then using 50 connector ribbon cable (same as SCSI ??) with 13 headers to plug into the circuit boards.
Thanks,
Timothy Gilmore
This is too simple!
You seem to be focussing on point-to-point physical wiring too much. Why not simply get a good length of "rainbow ribbon" wire, peel a pair off for one LED, solder the LED onto the pair and run the other end to the SX circuit board. If you like, and for professional quality, use a few long dual row pin circuit board mounted headers, and solder a 2 pin header socket to the end of the wire. In fact, you could also terminate the LED end of the wire in a 2 pin header socket, and plug the LED into that. Then your "remote chap" only has to make a bunch of one pair socketed "extension cables", of several "standard" lengths, and when you determine the position of the LED you just pick the right length of pre-made cable. He should be able to test each cable and by repetition get quite good at doing a quality job.
No "matrix" involved; that is all done on the PC board. Do realize though for my simple low hardware count suggestion, one side of all LEDs are NOT commoned together.
So the cables between your "boxes" and the logic unit consist of just 3 wires.
Bean, the number of LEDs (Q) you can drive with my scheme is the number of port bits available (B) multplied by one less than the number of port bits. Q = B * (B-1). In the case of an SX 28 with one comm bit leaves B = 19 for LEDs, so in that case Q = 342. And yes, it takes only one resistor per LED port bit, so that is 19.
I'd love to show the muliplexing software and a schematic, but how do I easily draw and post something? I don't want that to become a bunch of work, especially if only one party is interested. It would be easier to hand sketch something and FAX it.
Cheers,
Peter (pjv)
Post Edited (pjv) : 1/2/2006 6:32:47 PM GMT
This was too much for the EEPROM data space for the BS2. I went to the BS2px and learned how to write a subroutine into Bank 1 (main program uses Bank 0) and it all works well. I used the "Basic Stamp 2p: Commands, Features and Projects" manual. It was very helpful and easy to follow.
My code is working well now. The other person has allowed me to use (27) 25 position terminal·blocks (with screws). It will be mounted inside the LED box so all he will have to do is run wires from each LED anode to each screw terminal block.
I will still run 1 cable out of the LED box / circuit board(s) that will go to another box with a Serial LCD and Keypad (maybe the BS2PX to keep the wire count down in the cable to the LED box).
One (hopefully last) question. I have the Back lit version of the Serial LCD by Parallax. Is it ok to leave the Backlight on?
I want to thank everyone for the good inputs and all is working well now.
I know it may not be the most efficient way to do this but for simplicity sake it works well.
Thanks again,
Timothy Gilmore
Post Edited (tdg8934) : 1/3/2006 2:15:23 AM GMT
I'd purchase the Molex "KK" series connectors in .1 size.
I have seen computer manufacturers do this. I've included a picture. Then all the other guy would have to do is take the LED and "plug" it into the molex KK socket. I don't know your budget on the project, but this seems to be the easiest.
The sockets can be held onto the LED by bending the LED's cathode or anode over the back of the socket. The picture includes information. Just clip off the other side of the LED so that they can't accidentally touch.
I *THINK* digikey sells cables with these connectors preinstalled on them.
Sorry for the blurry pictures, I'm at my office and don't have my camera, so I had to revert to my cell phone's camera.
Knight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
This message transmitted with 100% recycled electrons.
-=-=-=-=-=-
Gravity doesn't exist. The Earth sucks.
-=-=-=-=-=-
Make a man a fire, and he will be warm for the night.
Light the man on fire, and he will be warm for the rest of his life.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
That is an excellent connection method regardless of how Tim does the driver circuit.
Would make changing LED easy too. In case you get a bum one.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"I hope the goonwave is not vaporware"
·
Sid
with the metal jumper removed. I tried removing one... relatively painless. The drawback is that for 300-600
LED's this may be a little time consuming.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I killed a good day huntin and peckin out a 'troller for a large number of leds...
and here spouts off a plan that more then doubles what I need...
CHarlie plexing, which, I just happen to read about 15 mins BEFORE I got here...
/me sighs.... Ho Hum... anyway... that still better then what I was thinking... the charlieplexing idea that is...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Until our bytes cross again, may your chips never smoke, your bits never fall off, your parts bin never be empty and your jumpers never fall off.
KK
·
I just looked up what Charlieplexing means, and guess what....that's exactly what I'm doing.
Works great provided you don't need too many leds on at one time; the duty cycle ratios can then get pretty dim.
Cheers,
Peter (pjv)
How would the jumpers allow a electrical connection? The plugs that I mentioned would still allow the cables to exit the other side of the plug.
I'll get a picture of the plug with wires, the way the pin is designed it will allow a LED to protrude past the other side of the plug, while still allowing the cable to the controller to be connected.
I'll get some better pictures that show a cable exiting the other side with a LED installed, and a picture of the pin itself without the plastic housing.
As for the Part numbers requested from Sid, I bought mine from Jameco (while I was in the intimidated stage with digikey) so I will pull up the jameco part number and I'll see if I can find a digikey part number for the plugs. The plugs are the exact same as used in computers for the fan's that have the RPM wire. The three pin, but the plugs above are 2 pin instead of 3.
I tried to find the jameco part # and couldn't find it online, I'll have to look at my manual tonight and see if I can find the partnumber out of there. I did however find a good picture of the pin that is used in these sockets.
I'll find the part numbers, but they are from Molex, and they are the "KK" series connectors in .100" size. The ones I have are with the polorized tabs, and the feed ramp, and this application wouldn't need either the feed ramp or the polorizing tabs.
Knight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
This message transmitted with 100% recycled electrons.
-=-=-=-=-=-
Gravity doesn't exist. The Earth sucks.
-=-=-=-=-=-
Make a man a fire, and he will be warm for the night.
Light the man on fire, and he will be warm for the rest of his life.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
Ahhhh I See.... I thought that "wires" would be soldered to the LED legs. My misunderstanding.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I get ya. [noparse]:)[/noparse]
This would allow solderless for the installer. [noparse]:)[/noparse]
I can't explain things well, that's why I use pictures, and those pictures didn't explain how I wanted it to. lol So I hardly doubt it's yer fault. [noparse];)[/noparse]
Knight.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
This message transmitted with 100% recycled electrons.
-=-=-=-=-=-
Gravity doesn't exist. The Earth sucks.
-=-=-=-=-=-
Make a man a fire, and he will be warm for the night.
Light the man on fire, and he will be warm for the rest of his life.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
Sid
roxon
nickb
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
Sure....that's all part of "Charlieplexing".
Cheers,
Peter (pjv)
<edit> sorry the board is 12 MAX7313's (six on each side to reduce board cost) </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 1/9/2006 10:37:42 PM GMT
Can't wait to see your RGB unit.
Chris I.