Go Down

Topic: 595's sinking current? (Read 4550 times) previous topic - next topic

whiteglint143

Hey guys, I bought a spark fun 8x8 R/G matrix and have been looking up how to control it. To sink the current, a lot of sites ended up using maxim or darlington display drivers, another used 4066's, another used NPN transistors and everyone seemed to recommended PNP transistors. Out of curiosity I wired a 1 x 8 row of separate LEDs to a shift register and ran it as a common cathode model, then a common anode model. It worked either way (albeit reversed outputs)  I then wired the 8x8 matrix with 2 shift registers. One for the rows, one for the columns and eight 330ohm resistors on the anodes. It appears to be working fine, I have ran it for about an hour now and the shift registers are not hot and the LEDs look fine. I do not need maximum brightness so I am using a slightly high resistor value, but I was wondering what are the risk of using my shift register to sink the current?

I am using these shift registers by the way:
http://search.digikey.com/us/en/products/SN74AHC595N/296-4619-5-ND/375877

Thanks!

mschn

The 595s are able to deal with both sourcing and sinking current. Just make sure not to exceed the maximum current output of the pins you connect it to on the arduino, or the arduino board itself by turning too many LEDs on at once.

Grumpy_Mike

The data sheet says that 25mA is the absolute maximum so you are OK. However, I am surprised you can see the LEDs with 330R current limiting but that is fine.

whiteglint143

Here is the set up.. One 595 controls the cathodes, one controls the red anodes and the other controls the green anodes. For each anode there is a resistor (16 total) With 330 ohm resistors, brightness is pretty good, I like it a lot. When I only had 8 resistors on the cathodes, the lighting was real poor and changed depending on which lights were on. (I know LEDs will "fight" if ran off a single resistor and that stuff) Nothing has exploded or caught fire yet, so I think it's good.  :smiley-mr-green:

Grumpy_Mike

I can't quite follow what you are doing, any chance of a schematic. If you have a resistor in the anode and cathode that is 600R, are you sure on the values it doesn't make sense to me. 

Magician

595 rated for 75 mA   Icc / Ignd only. Even you switch on only 1 column at a time, there are 16 leds, only < 5 mA you can get per led, that is 4x times less than recommended value .
Nobody says with 150 mA  (what, probably, you loaded it via 330 oHm)
it would failed instantly or  get extremely hot, but I'd not account on it'd last long enough.
http://tronixstuff.wordpress.com/2010/09/28/moving-forward-with-arduino---chapter-18---rgb-led-matrix/

whiteglint143


I can't quite follow what you are doing, any chance of a schematic. If you have a resistor in the anode and cathode that is 600R, are you sure on the values it doesn't make sense to me. 




I haven't made a schematic yet but I will describe it as best as possible..

The cathodes are directly connected to one 595 (to control the rows)
The red anodes have a 330ohm resistor which connect to the 2nd 595 (to control red columns)
The green anodes have a 330ohm resistor which connect to the 3rd 595 (to control green columns)

So when I light up a LED there is only 330 ohms resistance on it, not 660 ohms. To be honest, I used 330 ohms to be conservative on the resistance and chose to place them on the anodes  because they were running at different brightness on the cathode side.

It seems to work fine, I have been able to make a simple animation of a 4x4 green blob jumping up, getting shot down and splatting against the ground while turning orange.

Grumpy_Mike

Quote
I haven't made a schematic yet

It never ceases to amaze me how anyone can do that. Why make things ten times harder for your self by not using one. You don't need any software just draw it on some paper.

Despite you description I am still not quite clear what you have. Basically there are two ways of driving a matrix, see:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

Now while I see that any one LED is going to have a 330R resistor in line with it so the LEDs are fine. However one of the pins on one of the shift registers is going to be sourcing or sinking all the current for a complete row or column.
So lets assume that at 330R you have 9mA through each LED then the complete row will take 72mA which is overloading something.

Go Up