Am I on the right track?

First off I would like to say HI. I am new to the arduino community, And have started laying out the plans for my first project.

Project is a 16x8 RGB table.

My plans so far is to use an arduino uno, 7 x 74hc595 shift registers, 128 x RGB (cc) led's.

for the description I will label the 74hc595's as SR1, SR2, and so on.

OK now for the layout

SR1 would control red anode for column 1-8
SR2 would control red anode for column 9-18
SR3 would control green anode for column 1-8
SR4 would control green anode for column 9-18
SR5 would control blue anode for column 1-8
SR6 would control blue anode for column 9-18
SR7 would control cathodes 1-8

the SR's would be daisy chained with the data, clock, and latch going from pins 11,12,8 from arduino respectively starting in SR1.

I will be using an external power supply from a cannibalized desktop computer, and would be putting +5V to the arduino, (not sure if that would be enough power to run the LED's since I will be multiplexing with PWM).

I know I will need resistors coming from each of the data out pins going to each of the anode columns.

First question is, Would it be safe to go with 1k resisters on all the anode pins, Or would I need to put smaller ones on the green and blue.
the specs on the LED's are"

Color: Red/Green/Blue
Package: Round 5 mm (T-1 3/4)
Peak Wavelength [R/G/B]: 630 nm / 525 nm / 430 nm
Lens type: Diffused, milky-white translucent
Viewing angle: 30 degrees
DC forward current: 30 mA
Intensity (typical) at 20 mA [R/G/B]: 500 mCd / 600 mCd / 300 mCd
Forward voltage (typical) [R/G/B]: 2.1 V / 3.8 V / 3.8 V
0.055" (1.4 mm) lead spacing
Common Cathode configuration

Second question is, would I need to use transistors? And if so, what ones PNP or NPN? and would they be placed before or after the resistors? and would I also need resistors and transistors on the cathodes as well?

For the record I have no formal training in electronics, and I am learning as I go, That is the reason for the questions. I have been reading and trying to take in all that I can from reading and tutorials on the web. And like I said earlier this is my first project, and I am really impressed with the knowledge that I have seen on these boards so far.

I have a crude hand drawn schematic of what I have so far, It does not show any of the LED's because I was stuck at the transistor/resister part.

Here is a link to the schematic. It is hand drawn because for some odd reason whenever I try to get fritz to work, My schematics come out all garbled and everything is just a blob on the screen.


If i'm forgetting anything, or more info is needed, please let me know.
Any help, suggestions, comments would be appreciated.

Hi daveydav27,

First question is, Would it be safe to go with 1k resisters on all the anode pins, Or would I need to put smaller ones on the green and blue.

To get the best possible white balance the resistor values would be different for R, G & B as your LED specifications shows...

Intensity (typical) at 20 mA [R/G/B]: 500 mCd / 600 mCd / 300 mCd

R & G are pretty close to each other in brightness but B is 50% lower than G.

Second question is, would I need to use transistors? And if so, what ones PNP or NPN? and would they be placed before or after the resistors? and would I also need resistors and transistors on the cathodes as well?

Transistor rule of thumb I use is PNP if its before the load and NPN if its after the load. As you load (LEDS) are common cathode the transistor would probably need to be before.

If you want to PWM (dim) the LEDs (to mix your RGB leds into many colors) you'd be better served with the TLC5940 as your current sinks -- otherwise your PWM blink speed will not be fast enough.

AndrewStone:
If you want to PWM (dim) the LEDs (to mix your RGB leds into many colors) you'd be better served with the TLC5940 as your current sinks -- otherwise your PWM blink speed will not be fast enough.

OK great, Thank you Andrew, As I said I am really new to this and do not know what all is out there. If i were to go with the TLC5940 would that cut my IC amount in half since they are a 16 channel chip? So I could use one for the red anode, one for the green anode, and one for the blue anode, as apposed to using 2 of the 74hc595's per color. And would i use one of these for the common cathode as well? And with using the TLC5940's that would eliminate the need for a resister to be placed in-line as well would it not? And I would still use a PNP transistor as stated by Riva? Whom I would also like to thank. I know i'm asking a lot of questions, But I think it's better to ask, than release all the magic smoke. And I really do appreciate any and all help. I'm glad that you informed me about the IC's before I placed my order.

If you want to PWM (dim) the LEDs (to mix your RGB leds into many colors) you'd be better served with the TLC5940 as your current sinks -- otherwise your PWM blink speed will not be fast enough.

I agree this is a probably a better solution but you will need common anode LEDs instead of common cathode as it's a sink driver

Riva:

If you want to PWM (dim) the LEDs (to mix your RGB leds into many colors) you'd be better served with the TLC5940 as your current sinks -- otherwise your PWM blink speed will not be fast enough.

I agree this is a probably a better solution but you will need common anode LEDs instead of common cathode as it's a sink driver

OK so go with 4 of the TLC5940's and CA RGB's then? And I can leave out the resistors?

You will be able to leave out the resistors apart from a single IREF resistor per TLC5940.

I have only ever used the MAX7219 to drive a 16x8 monochrome LED matrix so am no expert on this chip though I have similar bits (WS2803) to do something like your project on a smaller scale but I think you may be able to do your 16x8 matrix with 3x TLC5940 and 1x 74HC595. If not then you would need 24 of them.
A quick google finds this Mini Monome and it might be worth looking at the free book here http://sites.google.com/site/artcfox/demystifying-the-tlc5940

Ok thanks again. I will look into those links tonight. If anyone has. Anything more to add, or anymore suggestions. Please feel free to add them.

daveydav27:
SR1 would control red anode for column 1-8
SR2 would control red anode for column 9-18
SR3 would control green anode for column 1-8
SR4 would control green anode for column 9-18
SR5 would control blue anode for column 1-8
SR6 would control blue anode for column 9-18
SR7 would control cathodes 1-8

If you do it like this, that would be 8 on SR's 1,3,and 5; and 10 on SR's 2,4,and 6.
Doesn't sound like you're going to use that method anymore, but if you do... Just sayin'

Ahh... I missed that you are using common cathode LEDs... the TLC5940 is a sink driver so it would be on the cathode side. But I think it will still work for you. You just need to connect the 3 anodes to different current sources -- that is, use 3 channels in a shift register to drive high power PNP darlington transistors to provide power to 16 anodes -- one per LED (say the "red" anodes). Then set the TLC5940 to the proper the red brightness level for each LED. Next repeat for green then blue.

So that gets you 1 row of 16 RGB LEDs. Repeat 8 times. So you need 3 8 bit shift registers and 8 TLC5940...

[Edit] There was a question why so many TLC chips. With this layout (8 TLC5940s) each color is on 1/3 of the time. So your maximum brightness is 33% of whatever your LEDs look like running at 30mA off a battery. You can certainly use fewer TLC chips -- for example you could hook up the cathodes of 3 RGB LEDs to the same channel. This would mean that only one of those 9 possible colors can be lit at any time, giving you a maximum brightness of a bit over 10% of the LEDs actual max brightness. 33% sounds bad and 10% sounds terrible, but remember your eye sees brightness logarithmically. Doubling the energy output makes things look linearly brighter... this effect helps you when halving the energy; the end result does not look 10% less bright. However, if the table is competing with other lights (sunlight being the worst) it can look pretty dim at 10%. You may also see flickering, depending on how fast your strobing code is. You'll have to experiment to see what is acceptable to you.

AndrewStone:
Ahh... I missed that you are using common cathode LEDs... the TLC5940 is a sink driver so it would be on the cathode side. But I think it will still work for you. You just need to connect the 3 anodes to different current sources -- that is, use 3 channels in a shift register to drive high power PNP darlington transistors to provide power to 16 anodes -- one per LED (say the "red" anodes). Then set the TLC5940 to the proper the red brightness level for each LED. Next repeat for green then blue.

So that gets you 1 row of 16 RGB LEDs. Repeat 8 times. So you need 3 8 bit shift registers and 8 TLC5940...

I have not bought the led's yet, so getting common anode is not a problem. If I get the common anode ones will that cut down on the number of controllers I would need?

I have briefly looked at a few TLC5940 google links and it does seem you can use something like a 74HC595 to drive rows with the TLC5940 taking care of the columns. This would mean 3x TLC5940 chips to drive the 16 columns (you need 3 chips as one per colour RGB) and 1x 74HC595 to select the row. You will need transistors on the 8x 74HC595 outputs as a full row of 16 LED could be lit. The LEDs need to be common anode

Riva:
I have briefly looked at a few TLC5940 google links and it does seem you can use something like a 74HC595 to drive rows with the TLC5940 taking care of the columns. This would mean 3x TLC5940 chips to drive the 16 columns (you need 3 chips as one per colour RGB) and 1x 74HC595 to select the row. You will need transistors on the 8x 74HC595 outputs as a full row of 16 LED could be lit. The LEDs need to be common anode

Thanks for the reply. I was really racking my brain trying to figure out why I would still need so many chips. So my matrix will be laid out like this

Using 74hc595x1

X X X X X X X X X X X X X X X X -------PNP Transistor----- Q0 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q1 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q2 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q3 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q4 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q5 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q6 on 74hc595
X X X X X X X X X X X X X X X X -------PNP Transistor------Q7 on 74hc595

Connect the first TLC5940 chip to the Red Cathode of each column,
Connect the second TLC5940 chip to the Green Cathode of each column,
Connect the third TLC5940 chip to the Blue Cathode of each column.

If that is correct, thne I have one more question about the transistors. Would I wire them with a +5V to the collector, The base to the OUTPUT on the 74hc595, And the Emitter to the Anode of each row?

Once again, Thank you for all the help, It has been very enlightening thus far.

If that is correct, thne I have one more question about the transistors. Would I wire them with a +5V to the collector, The base to the OUTPUT on the 74hc595, And the Emitter to the Anode of each row?

For a PNP transistor it will be +5V to the emitter, anode to the collector & 74hc595 output via a resistor to base.

See Bipolar junction transistor - Wikipedia

Riva:

If that is correct, thne I have one more question about the transistors. Would I wire them with a +5V to the collector, The base to the OUTPUT on the 74hc595, And the Emitter to the Anode of each row?

For a PNP transistor it will be +5V to the emitter, anode to the collector & 74hc595 output via a resistor to base.

See Bipolar junction transistor - Wikipedia

thank you very much. This is great stuff, And I am learning a lot, And that is never a bad thing.

Ok I have been messing around with a schematic. It is not completed, There are no sync paths, or power ran to the chips, Nor is there any leads coming from the Arduino. I am just wanting to make sure that my thought process as far as connections are correct. If this is hard to see I apologize in advance. I am using kicad for the schematic, and it does not have a way to export the layout directly, so I had to do the print screen and copy it to paint.

Once again, Thanks in advance.

I found it impossible to read... try to make it bigger somehow!

AndrewStone:
I found it impossible to read... try to make it bigger somehow!

Sorry about that, I was afraid that would be the case. I did a layout in fritz with some notes on it. Hopefully this will work.
The blue junction that is connected to the transistors is for the common Anode. Not real sure why that note didn't show up.

I'm not sure if the Fritz diagram helped or not. Kinda wanting to know if what I have on there looks correct and/or is viable the way I have it.

Any input is welcomed and appreciated.

I find breadboard diagrams very hard to follow. Can KiCad print to a PDF file. Or maybe install something like doPDF that acts like a normal Windows printer driver. Attached is a sample of EagleCAD printing to doPDF.

Clock7.pdf (65.4 KB)