Hello,
My major goal is to build a 4x4x4 RGB LED Cube (and eventually, an 8x8x8). Obviously, that's a pretty big project, so I'm trying to work through things one piece at a time. Conceptually, I understand how it all works in terms of the signal processing/programming. What I'm not so confident about is the actual electronics of it. I'm going to be essentially following this tutorial, however I'm using these common anode RGB LEDs because I already had them on hand. Additionally, I wanted to use the 74HC595 8-bit shift registers because 1) I already had them, 2) the tutorial uses them) and 3) because they look like fun and I want to learn. I should note I'm using an old Arduino Duemilanove (should I upgrade? I think it's fine for this project).
As a way of testing things before I get too deep in the project, I wanted to take a single slice of 4x4 LEDs and see if I can play with it on the arduino - just to get a better understanding of how it works before becoming too confused with the full 4x4x4 cube.
I have the common anodes tied together in horizontal rows, while all the cathodes are tied together in vertical columns. This is a vertial "slice" of the cube. It looks like this:
What I'm not understanding is what other components I need to make this work with my Arduino for testing purposes. (By "testing" I mean not only checking that the LEDs work, but that I can also play around with the Shift Register - lighting each LED up one at a time, etc.) Having 4 layer anodes, and 4x3=12 column cathodes, that's a total of 16 pins, which I could play with using just 2 74HC595's, correct?
In the tutorial I linked earlier, he has each "layer" connected to a 2N2222 NPN transistor. However, his LEDs are common cathode - so my understanding is that I can't follow that tutorial to the letter. Would I need to use a PNP transistor instead? Where does the transistor go in a common anode set up like mine?
Would it be like:
5v > Anode
Cathode > resistor > transistor > GND
Or would it be like this:
5v > transitor > Anode
Cathode > resistor > GND
Or is it something else entirely? Any insight on this is greatly appreciated! Thank you!


