Common Cathode RGB LED Help

Hey there, I am currently trying to figure out if i can wire a DIY RGB LED matrix that is 40x20 to 74595's and an arduino uno. Currently i can not find anything online that helps. Do i need to add transistors? please....any help would be great

I think you need to start by explaining how you propose to construct this matrix - with a diagram.

Next, you need to realise that 74595s are obsolete and if you actually mean 74HC595s, they are still not suitable for driving LED matrices.

When you properly enumerate your matrix design, we can discuss possible approaches to drive it, but it will be immediately pointed out to you that it may be far easier and vastly more effective to construct your matrix from WS2812 or similar addressable LEDs, with which pre-assembled modules are readily available.

20x40=800 RGB LEDs = 2,400 individual LEDs.

You could use 300 x 74hc595. This would keep the display reasonably bright, as no multiplexing would be needed (and no transistors). But not the brightest possible, because as Paul__B pointed out, 74hc595 was not designed to be an led driver and has limited current sourcing capability. You would need 2,400 series resistors (a higher value would be needed for the red LEDs compared to the blue & green). You would also need some buffer chips for the clock and latch signals, as the Arduino output pins could not drive 300 inputs directly. The data signal will be ok as the Arduino only has to drive the first 74hc595. That first chip then buffers the data signal for the second chip and so on. Does that sound like a practical idea?

To reduce the number of components needed, you would need to multiplex the matrix. You need to have drivers for the rows and columns. In the simplest design, you would have 40x3=120 columns, so 120 series resistors and 15 x 74hc595 to drive them. To drive the rows, you would need a further 3 x 74hc595. The pins if these chips cannot sink the current from 120 LEDs, unless you choose very high value series resistors, which would make the display so dim that it could perhaps only be seen in a dark room. To boost that brightness and current, you could use 20 transistors, or maybe use 3 x tpic6b595 instead on the 3 x 74hc595. These are similar chips but in effect have "transistors built-in" and can sink much more current. But they cannot source current, so you can't use them for driving the columns. With the current limitations of the 74hc595 and the need to scan 20 rows, the display will still be pretty dim.

To make the matrix brighter, you can split the matrix up into smaller matrices, for example 40x10x2. Physically it would still be a single matrix, but electronically it would be two matrices. This would require another 15 x 74hc595 to drive the second matrix's columns, but the same drivers could be used for the rows. Each matrix only has 10 rows to scan. This effectively doubles the brightness of the whole matrix, because twice as many 74hc595 are sourcing twice as much current into the matrix. You could double the brightness again, by making it 4 matrices of 40x5. You would then need 60 x 74hc595, so the component count is starting to get quite high again.

Perhaps you begin to understand why Paul__B is suggesting to use ws2812 LEDs. These each have driver chip built into the led, making things very easy.