Picture of LED Cube 8x8x8
Create your own 8x8x8 LED Cube 3-dimensional display!

We believe this Instructable is the most comprehensive step-by-step guide to build an 8x8x8 LED Cube ever published on the intertubes. It will teach you everything from theory of operation, how to build the cube, to the inner workings of the software. We will take you through the software step by step, both the low level drivers/routines and how to create awesome animations. The software aspect of LED cubes is often overlooked, but a LED cube is only as awesome as the software it runs.

About halfway through the Instructable, you will actually have a fully functional LED cube. The remaining steps will show you how to create the software.

A video is worth a thousand words. I'll just leave it up to this video to convince you that this is the next project you will be building:

I made this LED cube together with my friend chiller. The build took about 4 days from small scale prototyping to completed cube. Then another couple of hours to debug some faulty transistors.

The software is probably another 4-5 days of work combined.

Remove these adsRemove these ads by Signing Up

Step 1: Skills required

Picture of Skills required
At first glance this project might seem like an overly complex and daunting task. However, we are dealing with digital electronics here, so everything is either on or off!

I've been doing electronics for a long time, and for years i struggled with analog circuits. The analog circuits failed over half the time even if i followed instructions. One resistor or capacitor with a slightly wrong value, and the circuit doesn't work.

About 4 years ago, I decided to give microcontrollers a try. This completely changed my relationship with electronics. I went from only being able to build simple analog circuits, to being able to build almost anything!

A digital circuit doesn't care if a resistor is 1k ohm or 2k ohm, as long as it can distinguish high from low. And believe me, this makes it A LOT easier to do electronics!

With that said, there are still some things you should know before venturing out and building this rather large project.

You should have an understanding of:
  • Basic electronics. (We would recommend against building this as your very first electronics project. But please read the Instructable. You'll still learn a lot!)
  • How to solder.
  • How to use a multimeter etc.
  • Writing code in C (optional. We provide a fully functional program, ready to go)
You should also have patience and a generous amount of free time.

1-40 of 2647Next »
Buskleif3 years ago
I find it much better to just use a USB to TTL serial adapter like FTDI friend from Adafruit . You also save some space on the circuit board as you don't need the MAX232/233 chip.

I tried this. im stuggling to get the code to work. the test code worked without a problem but uploading the actual main.hex and main.eep code does not work for me. according to the command prompt there are no issues. what are the odds that i have a bad USB to TLL?

Disregard my previous reply. When reading through old comments I made, I see that you have to flash hex first and then eep, not the other way around.

It's been almost 3 years since I did anything with my cube, so my memory is a bit outdated. Does it look like the upload works ok, but the cube does not do anything? I have a vague memory that you have to upload the eep file first, then the hex file. Try this and see if it helps.

(removed by author or community request)
Just connect the TX line from the adapter to pin 14 and RX to pin 15 on the microcontroller.
Don't forget that you must also connect adapter GND to circuit GND.

Basically the TX line from the adapter must go to the RX pin on the microcontroller and vice versa.

Good luck.

does the AVR ISP have the rainbow ribbon cable coming out of it or does it just appear that way?

Loskeem made it!10 days ago

It's not finished yet but it works. Thanks CHR and others for inspiration to learn. I designed and built my own PC boards, learned to write some code, and learned ALOT! Next I want to figure out why the ATMega 32-16 won't work correctly. It's something in the way it's complied, I'm sure. Will be fun to figure out. Cheers!


This is how my circuit boards came out...LOL

RAMP 1.0E Rev.4.jpg

This is the SMT version

ARMS Rev 3 top.jpg
roland938 days ago

I finished the circuit and tried to turn it on. Avrdude recognized Atmega and changed fuse bits, then uploaded test.hex. Unfortunately nothing was happening at all. I connected circuit to my Arduino and Cube was allright, i could see all effects. So i thought that maybe Atmega is broken, bought a new one and now I am getting problems like, unable to read fuses, the signature for Atmega is wrong etc. Can't do nothing about it and make it alive, any ideas ?

There's a switch you can use on the command line to ignore a wrong signature (-F) or try using AVRDudess.

I actually really like AVRDudess because I don't need to remember all the command line switches and data paths.

Tried with -F and didnt work. Also tried with AVRDudess and still no results, Cube is working great on my Arduino but nothing happening on Atmega. I managed to upload test.hex to one of them but nothing was happening. With the second one i still got problem with recognition and even getting access to program it...

Check your 16 MHz crystal, and triple check that the 22pF caps are the right value (remove them completely if you have no replacements - most often the circuit will work without them if the crystal is close enough to the ATmega). Make absolutely sure the crystal is on the right pins of the ATmega.


mik.cox4 days ago

This is an awesome instructable, thanks so much for all the time and effort you put into it! I just finished my cube today and I'm really impressed with how it's working.

I noticed one oddity though... I have to keep the programmer plugged in to the LED cube and the computer in order to run programs. If I ever unplug it, I get no status LEDs and the cube goes dark. Do you all have any ideas what might be causing this?

Hallo i have almost finished my Cube (very nice guide) im using a Arduino but have a liltle problem. I only have one row and 8 layers. But have som strange behavor, when im in the "rain" program, its lock like my LEDs are opersit (LED that should be off is on). Think i have the problem in my transitor? Im using "A684 Y122" (cant find a good data for this, so have maybe mounted it wrog?)

Is there somebody els there have problem whit the arduino duemilanove?

This happens most often if your LEDs are backwards (using anode layers rather than cathode)

I change the output for the layers, seems to my transitors are driffrent.

Here is what i changes if other need that:

// Invert A0-A5 of the arduino


// Invert bit 4 and 5 of the D8-D13

PORTB = PORTB ^ bit(4);

PORTB = PORTB ^ bit(5);

If your LEDs are in backwards, this is what you would have to do to make it look "right" - but you will likely burn out your pull-up resistors after a while, because it's those that are actually supplying current to the layers.

Yes, it'll look OK, but it's not the right way to do it.

So the right way will be? If i don't want to change all the LEDs? Can also see if i remove the pull resistors then there is more light in the LEDs?

kochel173 months ago

Are the capacitors in series or parallel?

kochel17 kochel173 months ago

I cannot interpret the picture of the power terminal at all and am very confused as to what is connecting to what... help would be much appreciated!

I'm quite confused about that as well. What part of the power source confuses you?

Capacitors on the power are in parallel. However, with most power supplies these days, they aren't really even needed.

Yes, you can actually power the cube off most USB ports if your cord is a "high current" cord. It also helps to plug directly into a motherboard USB port and not a front one.

Although I have powered these off a laptop, I don't recommend it because many laptops have 500mA USB ports, and you could blow the internal fuse for the port rendering it useless (unless you know how you repair the motherboard pico / SMT fuse).

Loskeem12 days ago

Does anyone know where the source code for "test.hex" is? The hex file won't run on my cube. Using Windows7 vs Linux?

Oh, the source idea.

If the hex won't run on your ATmega32A then something is wrong.

If you're putting it on an Arduino, that's the problem.

What ICSP programmer are you using - and did you initialize the AVR first?

I used the Arduino 2560 ( with modified code) and it worked great! Then I installed the ATMega 32-16. Programmed the fuses with no problems. Then uploaded "test.hex" to the chip. Program seemed to install fine but when I power the cube all I get is gibberish.
I copied the text of "test.hex", renamed it and installed it using USBtinyISP from windows7.


do not try doing a copy/paste of text because many characters get interpreted, and it just doesn't work the same. do a SAVE AS, and then rename it if you need to.

Try some of my hex codes - they all have a power on self test.

do not of course use any of the RGB text.

I am unsure what an ATmega32-16 is. we use the ATmega32 or 32A or 32L.

what is that component with the green led right by the power source? I am also really confused about how the whole power source is laid out. The schematic didn't really help me much either.

rpotts21 month ago

on step 72, how do you come up with 21? 8+8+3+1 is 20. do you just mean you have 1 extra available on the arduino uno?

a year ago, on step 70, I posted this:

Nobody seemed to pick up on this, but 8+8+3+1 = 20 lines, not 21 - which is a good thing because the arduino actually only has the 20 lines. A0 to A5 = 6 lines, and D0 to D13 = 14 lines...and 14 + 6 = 20. This hit me as I was getting ready to hook up the Arduino to my driver board, and wiring the driver board to the I/O connector. It's all good though and since the hookup instructions all work, it's not even a big deal. I just thought I'd point it out in case anyone else was scratching their heads.

He may have included ground - since that is a necessary connection between the MCU and the boards

jpeeples161 month ago

Just curious about what type of wire i should be using for connecting the power to the layers, and also for the loose wires that hook pretty much everything else up on the prototyping PCB. If you could help me out that would be a great help to me and my friend who are working on this project together.

When I first hand wired this project, I just used what's called KYNAR wire for just about everything except the transistors. I used wires stripped off an old ribbon cable for that. Kynar is nice to work with when you have a lot of wires to run because it comes in many colours, and is very thin. Stripping Kynar can be a challenge, but honestly, I put the end on a piece of cardboard, put my soldering tip where I want it stripped, and pull the wire, then quickly wipe off the soldering iron tip.

KrunoslavH18 days ago


I tried programming my Atmega32 for a project. I cinnected from the 6-pin header to the chip on a breadboard (100% i connected it correctly). I installed WInAVR and usbtinyisp drivers.
I opened cmd and wanted to try if it works.
I entered: avrdude -c usbtiny -p m32
and recived:
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.
At first i thougt it was the programmer. I had a Attiny2313 and tried it out and it worked like a charm.
I also have an Arduino. I got the chip out and tried it out and it didn't work, same message.
Here if this helps:
Using Port : usb
Using Programmer : usbtiny
Chip Erase delay : 9000 us
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
eeprom 4 10 64 0 no 1024 4 0 9000 90
00 0xff 0xff
flash 33 6 64 0 yes 32768 128 256 4500 45
00 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 20
00 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0
0 0x00 0x00

Programmer Type : USBtiny
Description : USBtiny simple USB programmer,
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

I really hope i get help. This chip is new, never tasted voltage before so pls help me to fix this.
Thanks in adv.

If you have already set the fuse bits, check to make sure your crystal is wired up correctly. If you haven't connected the crystal and the 22pF capacitors on your breadboard, or if you have not connected power to the chip, these are the most common issues other than getting the pins from the USBtiny in the wrong order.

The next most common problem is using the wrong capacitors. Try removing them completely and see if it will program then.

icsp pins.jpg

please click the photo to see the cropped off pin data.

very nice design

1-40 of 2647Next »