Go Down

Topic: Limits of stringing of 74HCN595's (Read 3841 times) previous topic - next topic

I'm new to electronics and Arduino but I have been lurking and studying for a little while now and it is time for me to ask: What is the limit of stringing together the 74HCN595s?

I want to control 96 common cathode RGB LED's.

96 RGB LEDs = 288 pins to control.

288 pins / 8 outputs per shift register = 36 shift registers.

Is it possible to connect 36 74HCN595's together? Any obvious difficulties with this setup? Will the code end up being monstrous? Is there an easier way?

What if I multiplied this x8 and I wanted to control 768 LEDs (2304 pins) with 288 74HCN595's??

CrossRoads

96 seems pretty simple, just an 8x12 (or 36 for 3 colors) matrix. Five 8-bit shift registers to drive the 36 anodes, one 8 bit shift registerto pull the cathode low on the part you want to turn on.
Repeat 8 times.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

johnwasser

I don't think there is any technical reason why you can't extend the shift registers that deep.  The code for updating a long shift register is no different than a short one, just more load cycles.  

You can get faster updates if you divide up the shift register into shorter segments.  That way you could shift bits into more than one register at a time.  You could have one shift register (set) for each color, for example, and have them use a common clock pulse.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

This brings me to another question: Is it better to put all three RGB anondes on the same shift register?

At first I thought it might be easier but with only 8 outputs and 3 leads per LED there would be no way to get an even number of LEDs per shift register.

I figure that all the reds will be on the "red" leads will be together and all the "green" and "blues will be the same.

So the order the LEDs would be connected to the string of shift registers would be:

Red 0-95, Green 0-95, Blue 0-95

Instead of:

R1, G1, B1, R2, B2, G2

CrossRoads

So you're gonna have something like this for efficient control, yes?
(which is an 8x8 triLED matrix with another 8x4 added to the side)

So you have one shift register on the side pulling the cathodes low while 5 along the top drive the anodes high.
You shift out the 5 on top to set up the anodes, then pulse the first row low to make the selected LEDs flash.

Shift out the set of anodes,  pulse row 2 low.
Shift out anodes, pulse row 3 low.
For the cathodes, you wouldn't even need a shift out -  just clock out a 0, turn the output enable on/off.
Shift the anodes, 1 cathode clock to move the 0 along, pulse the OE.
I would put current limit resistors on the the anode pins, and use a hefty current sinking part on the cathode pins if you plan to drive lots of anodes at the same time.

If instead you plan to only drive 1 anode at a time (or not for it to be off), then a different approach would work - you shift a 1 across with PWM say and hold the cathode low while you work the anodes on across the row.
This would work well for driving 1 device together:
have all the Reds go out of two devices (one for 8, one for the 2nd 4), same for Blue, same for Green - then you drive 3 anodes with PWM for varying color intensity, go to the next, go to the next, working across the row.
Still need decent cathode current sink as you would have 3 LEDs on at once, say 60mA of current worst case.

Please fill us in more on your application, maybe you want more brightness, or just steady on all the time, and multipexing isn't really the way to go.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

It is an LED wall. It will need to have the ability to have all LEDs on for extended periods. Max brightness would be good too. :)

I was just going to follow this but repeat 36 times.



I had originally drawn up this schematic that multiplexed all the LEDs.



I could only print it to an XPS doc and cant output to a jpeg but I was able screen cap a portion of it.

Basically, all the cathodes are wired in rows and each row has an NPN transistor which is connected to a pin on the Arduino.

The anondes are wired in columns and have NPN transistors on each one, which is controlled by the Arduino. The problem with that it was limiting in the max size of the array.
With the shift registers there is no multiplexing and I can control each color of each LED individually, no?


CrossRoads

"With the shift registers there is no multiplexing and I can control each color of each LED individually, no?"
Yes, that is correct.

Get rid of the 1uF cap, that will just screw up your signal.
If you have not bought parts yet, I would not use 74HC595 - go with something that can sink more current, like TPIC6B595.
HC595 seems to be only sped'ed for 6mA - LEDs can typically go 20mA, so if you want max brightness use a part that can deliver it.

Do you have the LEDs already? If not, I would go with common anode, and let the 6B595 pull the individual cathodes low to turn the LED on, vs trying to pump the current out.
I am looking for 16 bit shift registers as well, help you cut down on parts count.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#8
Mar 02, 2011, 08:58 am Last Edit: Mar 02, 2011, 09:03 am by carbine000 Reason: 1
No I don't have the materials yet. I really like those ideas?

What is the advantage of switching the circuit and using the common anodes and using the shift registers to turn the LED on by going low?

edit: Dang those TPIC595's are expensinve. That might be a little overkill at 150 mA per pin. I only need 20-25 mA. Is there something in between?

Or better yet, is there a place where I can see these pins next to similar pins and browse for something that might be more suitable for my application?

CrossRoads

http://www.fairchildsemi.com/ds/74/74ACT299.pdf
This one is good for 24mA. $0.56 at Newark.com

Lot easier to find parts that can sink higher current vs a part that can source higher current.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

I did a search at newark.com, mouser.com, digikey.com, looking for shift register availability and  price and then looking at family type for what they had current wise.
CMOS logic not that good for hight current. Really need what would be considered older style technology, or adding current drive parts to CMOS parts like HC595, HCT595, 4000 series.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

I'd rather see you use this part
http://www.fairchildsemi.com/ds/74/74ACT299.pdf
Good for +/- 24mA of output current, much better than the HC595.
$0.56 at Newark.com
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


CrossRoads

What do Pin0, Pin1, etc go to? The Arduino?
You are feeding shifting from  the bottom one into the top one?
I'd have to review the datasheet again to confirm the shift-out to shift-in connection, but I'd say you have the idea.

I don't know what's going on with Newak and the Fairchild part. Looks like the part has gone into a last-time buy mode (i.e. will no longer be made) and their datasheet will no longer open, and the $0.56 parts are now $2.25!  TI has the same part, but only in surface mount, for $1.36 in small quantities.

http://www.newark.com/jsp/search/browse.jsp?N=500003+1001899&Ntk=gensearch_001&Ntt=74act299&Ntx=mode+matchallpartial

I'm going to look around some more, see what mouser, digikey, arrow/avnet, gerber have.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

#14
Mar 03, 2011, 05:11 pm Last Edit: Mar 03, 2011, 05:22 pm by CrossRoads Reason: 1
Mouser is showing 487 of the Fairchild DIP parts for $1.35 each,  go snag some while you can.

Or get a HC595 ($0.56) & ULN2803 (Toshiba $0.45) for slightly less and do some more wiring.

Okay, this is bizarre - I searched for 74ac299PC at Newark, and they have the $0.56 pricce again
http://www.newark.com/fairchild-semiconductor/74ac299pc/ic-8bit-universal-shift-register/dp/58K3253?Ntt=74AC299PC

GerberElectronics is showing the National Semiconductor version for $0.27.
http://www.gerberelec.com/browse/?PartNo=74ac299&-search=Start+Search
$50 min order tho. Can buy all 162 they have & not meet that!
Take one for the team, buy 'em all & resell here!
Nice datasheet tho, easy to see where the serial in/out connections are
http://www.national.com/ds/54/54AC299.pdf#page=1
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up