LED Cube 8x8x8

FeaturedContest Winner

Step 7: Cube size and IO port requirements

Picture of Cube size and IO port requirements
To drive a LED cube, you need two sets of IO ports. One to source all the LED anode columns, and one to sink all the cathode layers.

For the anode side of the cube, you'll need x^2 IO ports, where x^3 is the size of your LED cube. For an 8x8x8 (x=8), you need 64 IO ports to drive the LED anodes. (8x8). You also need 8 IO ports to drive the cathodes.

Keep in mind that the number of IO ports will increase exponentially. So will the number of LEDs. You can see a list of IO pin requirement for different cube sizes in table 1.

For a small LED cube, 3x3x3 or 4x4x4, you might get away with connecting the cathode layers directly to a micro controller IO pin. For a larger cube however, the current going through this pin will be too high. For an 8x8x8 LED cube with only 10mA per LED, you need to switch 0.64 Ampere. See table 2 for an overview of power requirements for a LED layer of different sizes. This table shows the current draw with all LEDs on.

If you are planning to build a larger cube than 8x8x8 or running each LED at more than 10-ish mA, remember to take into consideration that your layer transistors must be able to handle that load.
Remove these adsRemove these ads by Signing Up
Dane111711 months ago
I understood that not all the LED's would be on at a time, but I thought it was a 1/8 duty cycle, I'm not sure in which step that was. So, you have actually around 1/10 duty cycle? Because with a 1/8 duty cycle, I'm fairly sure you'd draw 0,64 amps, at 10 mA per LED., thus too much for the transistors.
EDIT: I understand now. I totally forgot you have multiple transistors :P
Something else, I can't reply to you. When I press post, I get an error that I have to enter the two words on the image, but there is only an image at the place for a normal post, and when I type it there, it's not accepted.
Dane111711 months ago
So, with the PN2222 transistors, of which the collector current is 0,6 A, one could never light up the whole LED cube with 10 mA for each LED?
Vick Jr3 years ago
If only one layer is on at a time, why do you need 8 IO ports to control them?

Could you use the 74HC138 (or similar chip) connected through some sort of transistor array? That would reduce those 8 IO pins to 3.
Vick Jr Vick Jr3 years ago
Another idea: you could use a shift register, since you're already turning on the layers in successive order. That would only require 2 IO pins, data and clock.

Actually, could you connect the last out pin of a shift register to its data pin so it shifts in its own data? Then you could just feed it a 1 and 7 zeros and keep looping it with only the clock pin.

Of course I'm not nearly advanced yet to design such a circuit.
The more you multiplex, the less LEDs are on at once, and therefore the faster you have to cycle through to maintain POV. This actually requires more processing power and speed too, but it is a good idea in concept. I just think in practice you may have issues being able to run a high enough frame rate.
jasen Vick Jr2 years ago
yeah, or even a counter like CD4017 which has an individual output for each state
good idea!
Do we ever need to glow 512 leds at the same time, which takes almost 5amps.
No. Although it's technically possible with this circuit, with the program it's using 64 at a time is the max.
smartell11 year ago
You can do this with 24 pins if you charlieplex instead of multiplex, but it think the perceived brightness decreases due to the reduced cycles.
mmenegali3 years ago
I guess I found a little mistake in the text here. It says that the number of IO ports increases exponentially with x, but in fact it increases quadratically. It would be exponentially if the formula were something like 2^x.

Also, I'd like to thank you for this great instructable! :)