The primary challenge of this project is to wrap your brain around how Charlieplexing works. In my own words, I would say that Charlieplexing uses the tri-state nature of microcontroller (MCU) pins and the one directional nature of LED's to allow for a relatively large array of LEDs to be individually controlled with small number of pins. In concrete terms you can drive n*(n-1) LEDs with n number of pins, so 3 pins drive 6 LEDs, 4 drives 12, 5 drives 20, etc...  Wikipedia has a pretty decent explanation ( and Maxim Integrated also has a very helpful application note ( to explain the electrical theory, but neither expands very far into the physical placement of the respective LEDs. I know that it takes 9 pins to control 64 LEDs (9 * 8 = 72 LED's max) but how should I wire them? I created something similar to the way the app note drives the 7-segment display were each pair of two neighboring verticals is the common cathode of 8 LEDs and the other 8 available signals are what drives the anode of the particular LED that I want to illuminate. You can see below how I arranged the cathode verticals, for all images in this post the anode is on the left and cathode is on the right. (Note: pin 1 is shown because that's where it goes off to the MCU, but it is never connected to a cathode because I have 8 fewer LED's than my theoretical maximum with this pin count)

Breadboard wiring of microcontroller pins

Changing our perspective, if we look at only the first layer of LEDs from the right side of the cube we will see the wiring below. The cathodes of each vertical row are bussed together as described above and there is some creative wire twisting to connect to anodes to their respective pins:

The wires for pin 4 and 5 cross on the top left but can easily be bent out of each others way or the pin 5 vertical can be extended past the top LED to avoid crossing all together.

Right most layer of the LED cube

The next layer of LEDs is much easier to wire. The verticals are the same as the previous layer and pins 6-9 are connected to all of the anodes on a single row starting from the bottom going to the top.

Right middle layer of the LED cube

The next layer of LEDs in, still looking from the right side, is very similar to the previous one. The verticals are now pins 6-9 going from right to left and pins 1-4 are connected to all of the anodes on a single row starting from the bottom going to the top.

Left middle layer of the LED cube

The last layer of LEDs, still looking from the right, unsurprisingly looks a whole lot like the first layer. The cathodes are the same as the previous layer and again some creative wire twisting is required:

Again wires cross on the top left and they must be bent or run so they do not touch.

Left most layer of the LED cube

I chose to jump signals across inside the cube between layers so that I could use the cathode verticals themselves as signal risers and only connect the MCU to the verticals coming out of the breadboard on the outermost layers. Other options are certainly possible especially if you make a PCB to solder the verticals to, but this is what made sense and what I thought would look best.

This method of common cathode verticals could easily be expanded to drive an 8x8x8 cube with 25 pins. That is not as efficient a use because theoretically you should be able to do it with 24 pins (23 * 24 = 552 LEDs max), but I think the extra wiring necessary to make that happen would be arduous to figure out logically, worse to code, and in the end probably block more of the light coming from internal LEDs diminishing the animation visibility. Either way it's a noticeable improvement from the 72 inputs required to drive a traditional 8x8x8 cube with vertical ground planes and 64 verticals each connected to a unique shift register output.

All images drawn in Fritzing. I should have done that before I soldered the cube....