I have seen many designs for LED Cubes, and they all share the same problem: How to control so many LEDs with so few pins. Many designers choose to utilize shift registers, which uses a serial load with parallel output. I was not to fond of this idea, primarily because of the time needed to shift all bits and the possible resulting trailing effect, so I started from my own drawing board, see attached.
My design uses 5 x 3-8 line decoders
(also known as DEMUX) to convert a 5-bit parallel binary output to a one-hot 25-bit parallel output, which drives the columns of LEDs. "One-Hot" means that only one of the 25 output pins will be "hot" at any given moment. If the five output pins of the arduino are: 01010, this is the number 10 in binary. The decoders take interpret this signal and in turn power on output pin number 10 of the 25 columns (numbered 0-24). See the attached design for illustration.
As many other LED cubes do, my design also uses NPN transistors to switch the cathodes of each plane of the cube.
My design also includes a custom designed Printed Circuit Board, to eliminate the many unsightly wires that would otherwise be needed.
Part No. Description Vendor Quantity Each Total
74HC238 3-8 Decoder eBay 5 $0.70 $3.50
LED 5mm Diffused Blue LED eBay 125 $0.09 $11.25
RES 150 Ohm Resistor 30 $0.05 $1.50
2N4401 NPN Transistor RadioShack 5 $0.20 $1.00
POT 10k Ohm Trim-Pot RadioShack 1 $1.49 $1.49
Arduino Arduino SparkFun 1 $30.00 $30.00
PCB PCB + Shipping AdvancedCircuits 1 $51.42 $51.42
Grand Total: $100.16Second Thoughts:
Be sure to get one-HOT decoders, many will have every output high, but the one selected output LOW. This is the opposite of what we want here. Be CERTAIN to check the truth table in the data sheet of whatever chip you purchase.