Multiplexing (Noob)

I was wondering if this arrangement could be used to control LEDs. I am creating my own version of the LED table.

http://img98.imageshack.us/img98/3949/diagram.jpg

Sorry for the crude drawing I am still getting use to making them.

If i understand correctly if i turn on row 3 and column 3, the led at the position (3,3) will turn on?

Will this arrangement also give me the ability to fade LEDs.

Thank You!

I just have to say, the best tutorial I've seen on shift registers so far is the one by one of our very own members, Mike Mc! You have got to take a look, I believe it's... uhh like 9 or 10? 11? I don't recall exactly, but do the whole thing.. alot to be learned from it.

http://earthshinedesign.co.uk/ASKManual/Site/ASKManual.html But my personal experience below.. :P

From the looks of your schematic, yes it will work. But I'm afraid you can't fade the LEDs, using the shift registers, all you're doing is sending in ones and zeros to turn on your outputs. For example, to turn on the first 3 LEDs, the information going out would look something like:

digitalWrite(latchPin, LOW); // latchPin LOW to send shiftOut(B00000111); // the last 1 is the first pin, third 1 is third. digitalWrite(latchPin, HIGH);// latchPin HIGH to show sent data delay(10);

At least that's the easiest way I've seen so far. You can also use Hex values, but being able to see which pin is going to be lit is helpful for me:) Also can set up an array at the beginning of your sketch,

redpins[] = {B10000000, B01000000, etc..}

and address them individually later in the sketch. But I'm sure there are easier ways to do it, just the best way I've come across so far! (I've only been using the 595s for about 4 days:P) and still learning me arduino code, slowly but surely.

I know there are some chips that do support PWM, but not sure if it's to the extent of 8 LEDs.

I think you will find you will not get enough current from those shift registers to power a whole row of LEDs. Add up how much current each row and column will take when all the LEDs are on and then stand back.

Then read:- http://www.thebox.myzen.co.uk/Tutorial/Power.html

Look up the projects Mini Monome for fading RGB ideas and Economonome for discrete LEDs implementation. http://www.thebox.myzen.co.uk/Hardware/Projects.html

Well I've used 2 and powered all the LEDs without a problem yet, haven't added the third. But yes, I'm sure I'm pushing it. They're all a few-values high of their regular value, just for the reassurance.

Just ordered 10x 595s, 10x 573s, 10x 164, 10x 165 for $5. I'm interested in seeing what you can do with the others. I'm sure most of it's do-able via software, but not as interesting! :) I've seen that you can run a LCD with just 3 wires using the 74HC164, serial-in parallel out shift registers, that's.. well, awesome!

Thank you for your help so far. I thought that these chips only blinked one led at a time very very fast giving the impression that more were on. So why does it take more current then just one led?

I thought that these chips only blinked one led at a time very very fast

Indeed they do.

So why does it take more current then just one led?

This is a matrix so that one row is on at a time. In that row every LED could be on. Now the column chip is only sinking the current for one LED but the row output (shift register) is sourcing the current for the whole row, that's 8 LEDs. So the row driver has to supply 20 * 8 = 160mA, a look at the shift register output says it can safely supply 40mA so you need to restrict the current to 40 / 8 = 5mA per LED. That is not bright enough especially as you say:-

these chips only blinked one led at a time very very fast

Hmm well i have i believe 15 79HC595 chips and 5 TLC5940. I was trying to avoid having using 3 595 outputs for every led that is why I figured the multiplexing would work better. What if i connected only 2 leds in parallel and used 12 chips.

Also the TLC9040 can very brightness by changing the resistance on cathode end of the circuit. Couldn't it still do the same and change brightness for a whole column.

very brightness by changing the resistance on cathode end of the circuit.

No it doesn't do that.

It changes the brightness by by pulse width modulating the constant current sink. The current is set for all the channels on the whole chip by an external resistor.

If you want to multiplex RGB LEDs then have a look at this project of mine:- http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html