Instructables
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 2652Next »
roland9310 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.

After lot of debugging I managed to force my Atmega to work, thanks for the tips ! And last extra question, in few effects i can see how diodes in all colums (driven by separate IC) indexed 7 and 8 are flipped, except corner ones. i checked all the wires and everything seems to be ok but this 6 columns change places all the time. Any quick idea ? ^^

"Managed to get it to work" won't help anyone else reading this that might run into the same issue. Please share what was wrong, and how you corrected it.

If what goes to chip 7 is swapped with what goes to chip 8, then the answer is you have them reversed coming out of the 74HC138 (which is responsible for what chip is used when). So this means take the wires going to pins 9 and 7 and reverse them on the 74HC138. Of course if you happen to accidentally be calling chips 1 and 2 incorrectly chips 7 and 8, then it's pins 14 and 15 you need to reverse.

The problem was in capacitor next to GND and VCC, one of the legs wasn't soldered good enough, that solved the problem. Cables was swapped as You mentioned, thanks !

i am really confused about the whole purpose of the RS-232 cable and where it should be connected. can the cube be made without it?

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?

The TTL or RS232 on the ATmega32/32A/32L is only for sending cube frames to the cube from a PC - not for programming it.

I don't get why you are using a USB to TTL. You are supposed to be using an ICSP programmer like the USBasp (fast) or USBTiny (old, tried and true, slow). Until you get one of those, I don't know where your issue is except that you aren't using one of these.

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!12 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!

046.jpg050.jpg053.jpg045.jpg

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

fantastico!!!

mik.cox6 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

PORTC = ~PORTC;

// 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).

Loskeem14 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 code...my bad...no 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.

Thoughts?

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.

http://www.instructables.com/id/CHRs-8X8X8-LED-Cub...

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.

http://www.instructables.com/id/Led-Cube-8x8x8/step46/Program-the-AVR-with-test-code/

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

1-40 of 2652Next »