LED Cube

LED Cube

What is an LED cube?

An LED cube is some kind of 3D display. Theoretically, everyone could build it on his own. However, since it is a lot of work and there are many small, but costly parts, it's resolution will be very limited.
An 8 by 8 by 8 Cube consists of an array of 8³ = 512 LEDs. Since this is 3 dimensional, we are not speaking from pixels anymore. We are speaking from voxels, which mean volumetric pixels.


1. Current Status
2. Build Your Own
3. Firmware
4. Snake Game
5. Leap Motion © controller
6. Verdict
7. Gallery

Current Status

This is a huge project for one person. That's why there is still a lot of work to do.
I finished the LED array, first. I made eight layers, each one containing 64 LEDs. Then I connected them all together. This took me lots of time.
Meanwhile, I had a helping hand which made the wooden parts of the case for me. Thanks, dad! Then I made the protective cover out of acrylic glass. It looks blue on the photo because of the protective foil, still present. I also drilled some holes for switches, connectors and so on in the wood and painted it black afterwards.
Finally, I could fit my LED array in. Pushing 192 small legs through 64 holes at the same time means some work, but it's not impossible.
Next, I started building the controller. There are only two PCBs, yet: a multiplexer board for the green color channel and the main board with the microcontroller and transistors for the cathodes.
I am still not too familiar with microcontrollers, but after finding out how to use the programmer, setup the ATMega32 and which compiler to use, I got it running. I'm also not really familiar with the programming language C, but fortunately there was already running firmware in source code, making this possible for me.
At this point I have to report a technical problem: All voxels are ghosting in their next line below. Maybe the transistors at the cathodes switch too early or they are to slow. I am not sure, but I found a way to reduce this ghosting: Lowering the framerate. Originally, there are 1309 frames displayed, each second. Rising up the AVR's interrupt counter from 10 to 200 lowers the framerate to 65 Hz, at least in theory.

A nice firmware displaying demo animations is fine, but it becomes boring after a short while. Therefor the cube has a serial interface (USART). This makes it possible to render more complex animations on a PC, and stream the data onto the cube. It also makes it easier to create new animations or games and use the computer hardware for input.
Speaking of games: I have improved a Snake game in 3D for the LED Cube.

  • build a controller for red and blue color channel
  • extend main controller
  • alter firmware for the new channels

Build Your Own

This project is based on the instructions by chr. However, there are a few mistakes in the scematics.


I have fixed the schemes and altered them slightly, along with the firmware code.

AVR board as PDF AVR board schematic
multiplexer board as PDF multiplexer board schematic

RGB Extension

Because of my lack of time I could not implement an RGB mode, yet. However, I extended the schematics.
The AVR board now has two I²C port expansions.

extended AVR board as PDF extended AVR board schematic
R/B multiplexer board as PDF R/B multiplexer board schematic


I have altered the firmware to reduce ghosting and make it more expandable.
Note: There is no RGB firmware, yet.

Compiled version in hex format
Source code
Source code documentation

Snake Game

There is also a 3D snake game for LED cubes. I improved that game. It was a good practice for me improving my skills in C.
I removed the original level borders to make the area seamless, re-aligned the movement axes, made the cube display the highscore, improved the keyboard layout and added a config file for setting up controls and serial port.

So, this is Snake 3D - Revised. Have Fun!

PC build
Source code
Source code documentation


Leap Motion © controller

Leap Motion © is an optical tracking device for hands. It generates coordinates for each bone of multiple detected hands. To use this device in combination with the LED cube, I wrote a few programs in C#.
The first one just visualizes hands on the cube in a scale of 1:1. The second one is a gesture-based paint tool. That way, the user can add and remove voxels. The third is an interactive aquarium animation.

Download source code


Building my own LED cube turned out to be very time consuming. I learned about micro controllers and the programming language C.
In the end it was a big experience for me and I'm very proud of it.


Snake 3D - Revised also runs fine on a Raspberry Pi. You can even remote control it via SSH, with an Open Pandora for example, to bring old fashioned arcade gaming to a new dimension. Only the sound is missing on the pi.