IMG_6445.JPG
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

IMG_6413.JPG
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 1969Next »
brent7890 says: Jun 19, 2013. 7:27 PM
Quick question: (In regards to using ATMEGA32L)

For the button on the latch array board, there are two LEDs, a red and green one. One is connected to pin1, the other pin2 on the 16pin ribbon connector. I imagine the red would be for debugging. For convienience, which pin on the 16pin ribbon connector connects to the red LED?

Thanks.
SuperTech-IT says: Jun 18, 2013. 9:14 AM
I know someone somewhere else mentioned this, but USB to TTL serial adapters are a couple bucks a piece on EBAY and they eliminate the need for the MAX232 chip altogether - just wire the header so it connects GND to GND, RX to TX and TX to RX.
Also, when the code is recompiled for 16MHz I get no errors at speeds up to 57600. I would probably have to drop to 14.7456 MHz to make 115200 flawlessly, I don't know, but I get data corruption at this speed at 16 MHz. Don't forget you need to recompile the code with the CPU set at 16 MHz if you change the crystal.
SuperTech-IT says: Jun 17, 2013. 8:16 PM
The return (ground) wires for each layer can drop a great deal of voltage when a large number of LEDs are on in any given layer, reducing the current available to each LED.
In my tests, the return wire was lowering the layer current by 400mA with all LEDs on.
My driver board has 2 40 pin connectors on it to go to the LED matrix, so I just doubled up the return wires (80 pins total...64 for each LED, and 16 for return rather than just 8...total, 80 wires)
CIMG1811.JPG
SuperTech-IT says: Jun 17, 2013. 7:41 PM
To those that have already built or are about to build their cube, I would like to point out here that the current for each layer can be substantial. As such, the ribbon type cable used to connect the ground connections for each layer will act like a low value resistor. They can under certain circumstances even get warm, but more importantly, they drop voltage and limit current. If your cube isn't as bright as you think it should be, this may be a cause. I suggest a lower gauge wire (thicker) if possible, or use a wider connector and run 2 wires to each connection. The ribbon is fine for just a single LED, and voltage drop is negligible, but when 1 wire has to support up to 64 LEDs at once, it becomes an issue. It can actually drop enough voltage so as to limit the available current to each layer by 400mA according to my tests. Yes, the cube will work without doing this, but you are potentially losing a great deal of brightness. Conversely it could be viewed as a good thing if you are trying to reduce overall circuit current draw.
elinortaylor says: Jun 17, 2013. 7:54 AM
Hello I LOVE THIS

Can we buy them ready made?
el:)
chewdog316 says: Aug 16, 2012. 11:42 AM
What voltage of 1000uf Capacitors do we need. There are so many diffrent voltages.
SuperTech-IT in reply to chewdog316Jun 17, 2013. 3:07 AM
Any cap needs to be a higher rated voltage than your input to it.
There are different voltage caps because a lower voltage cap can be smaller for the same rating as a higher voltage one.
Since our main voltage here is 5V, you can use 10V or above capacitors. Using 5V caps isn't recommended since you would be running them at their threshold, and they will break down a lot faster than a higher rated cap.
POMAHbl4 says: Jul 18, 2011. 9:32 PM
Can you say me, how are connected green wires?You can show the scheme?
SuperTech-IT in reply to POMAHbl4Jun 17, 2013. 2:52 AM
These are just the data lines for the latches. They go from pins 2 to 9 on one of the latches (since pins 2 to 9 are tied together on all 8 latches as a data bus) and to pins 14 to 2 on the connector for the AVR - which connects them to pins 40 to 33 on the Atmega.

The numbers are in order, so pin 2 on the bus is pin 14 on the connector which connects to pin 40 on the AVR - and so on.
Vick Jr says: Jul 19, 2011. 6:27 PM
Can you explain what the output enable (OC) line is for. What do we do with the pin connected to this in software? The datasheet says that pulling the OC high will make the outputs high-impedance which i don't think we want if they are driving LEDs. Do you just keep OC Low? ty
SuperTech-IT in reply to Vick JrJun 17, 2013. 2:46 AM
This allows us to load up all the 8 latches (flip-flops) with the data for the entire layer, and then enable all the 64 outputs at once (since the output enables are all tied together) with a single bit.
This will avoid ghosting or other adverse effects we don't want.
navyaj says: May 18, 2011. 8:54 PM
can someone help me: The 8 bit bus (green wires)

I dont think the schematic and the picture are the same. from looking at back side of board. The 3 blue wires are correct pins 3,4,5, and the orange wire (OE) is pin 6. But the schematic I think shows pin 7 as D7, and pin 8 is D6, pin 9 is d5 an so forth.

But if you go by the pictures and the datasheet for 74hc574n, pin 7 is d0 (it looks to be soldered to the next higher to the orange, pin 8 is d1, pin 9 is d2 and so forth.


Which should i follow
louige99 in reply to navyajNov 10, 2011. 11:11 PM
i see the same problem here. from the pictures it looks like hes used pin 11 as the OE, which means all of the pins for 1d-8d are correct. but in schematics pin 11 is used for the clock (LE for the latch). think its a simple problem off what should be used for pin 11 and pin 1 as the picture and schematics and data sheets contradict each other
SuperTech-IT in reply to louige99Jun 17, 2013. 2:42 AM
You're likely counting the pins wrong. Don't forget when you look at the bottom of the board, pin 1 is on the opposite side, and depending on how the board is flipped, the opposite end as well.
I looked at the board and it all seems correct.
febinjohn in reply to navyajMay 19, 2011. 2:55 AM
chr??
Mrwolf81 says: Feb 13, 2013. 1:32 AM
Hi all. I have already built this project and gave it to my nephew, upon building my second one, I have come across a problem. I haven't built the second cube yet, just the control board. 74hc138.... when i connect the vcc on pin 6, the status leds dull out and only one flickers... not only that but my power unit for the 138 is over heating, this wasn't a problem in my first board... any suggestions/help?
SuperTech-IT in reply to Mrwolf81Jun 17, 2013. 2:26 AM
Possibly mis-wired, shorted or bad 74138. Start checking continuity between pins, especially between pins 6 and 5, since 5 is ground and right beside pin 6.
artur36 says: Sep 16, 2011. 4:33 AM
Hi someone can post the formula to achieve the right value of transistors Output Current
Thanks
jasen in reply to artur36Jun 4, 2012. 3:58 AM
a rule of thumb.
for darlington transistors put atleast 1/100 the current you want to see through the transistor into the base.

You can probably get by with less than this but if this figure is not too high it's a good starting point,

SuperTech-IT in reply to jasenJun 17, 2013. 2:09 AM
Current per LED X 64 LEDs (this is the absolute maximum, and it's a peak value since no layer is ever just simply left on).
so for a 20mA LED, 1.28A. This is pretty typical of high brightness LEDs.
A 1A transistor should be able to handle it, but it's cutting it close. Use something with a 2A or higher rating if you plan on using only 1 transistor per layer.
get2leo says: Jun 20, 2012. 7:50 AM
Hi, can someone tell me whats the use of this 8pin female connector attached on atmega pins 33 to 39
SuperTech-IT in reply to get2leoJun 17, 2013. 2:05 AM
For those that may be reading this after June 2013, the connector is from pins 22 to to 29 (8 pins) and it's connected to the resistors on the transistor bases. It was used for troubleshooting initially, but once the project is complete, if you remove the Atmel, it makes a convenient hookup place for the Arduino if you decide to try to control it with an Arduino.
brent7890 says: Jun 16, 2013. 10:56 PM
The Pictures here:
http://www.instructables.com/files/deriv/F45/JMFQ/GICYB1F5/F45JMFQGICYB1F5.LARGE.jpg
Show pin 16 on the 16 pin header connected to ground along with pin 15 when the schematic shows that pin 16 on the header connects to (SS)PB4 and pin 15 going to ground. Take a look:
http://www.instructables.com/files/deriv/FJ4/7RE1/GICYB6CI/FJ47RE1GICYB6CI.LARGE.jpg

Thoroughly confused. Why are pins 15 and 16 connected together in that picture? Should I ignore all pictures and just stick to the schematics? It's the same for the latch array board. In the picture, it shows pin 15 and 16 connected together, but offers different input in the schematics. Any suggestions? To me, it seems that they should not be connected together, it doesn't make any sense.

Thanks for any input.
the seaker says: Jan 7, 2011. 5:59 PM
This is by far the best instructable on here! the one question i have for you though is if you could possibly give me more information on what i could leave out in order to use the Arduino? i would love to build this but i would like to have a better idea of what i need to do to make it especially for the Arduino
chr (author) in reply to the seakerJan 10, 2011. 9:20 AM
You can leave out the entire AVR board except the transistors.
SuperTech-IT in reply to chrJun 16, 2013. 7:58 AM
Or you can do what I did, and move the transistors to your LED Driver board.
This allows me to use any other microcontroller - but of course you have to write the code for it. 26 pin connectors and cables are very common, so this gives you enough for the 8 data, 8 layer select, 3 column (address) select and 1 output enable lines (20 pins total) with room left over for power and ground (input or output).
Driver-Board.jpg
omid-el in reply to chrMay 30, 2013. 9:37 PM
hi,i've made my big cube(8*8*8) and it has some problems
how can i amplify it by 12v or output layer selection?
think problem is about layer selection .and i use tip122 for 8 layer.
please help
20130524_172531.jpg20130521_120555.jpgIMG_20130523_183423.jpg20130523_183249.jpg
SuperTech-IT says: Jun 16, 2013. 7:49 AM
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.
SuperTech-IT in reply to SuperTech-ITJun 16, 2013. 7:50 AM
Maybe they included the 5V or the GND as the 21st line...
Boul says: Jun 16, 2013. 6:52 AM
Hi everybody,

I have a little problem to programm my ATMega32. When I type:

"avrdude -c usbtiny -p m32"

Everything is OK, but when I type these both instructions:

"avrdude -c usbtiny -p m32 -U lfuse:w:0b11101111:m

avrdude -c usbtiny -p m32 -U hfuse:w:0b11001001:m"

I break my ATMega32 (In fact, after that, I have no more access to the ATMega32). This is my third ATMega32. I don't know if this is the first or second instruction which break my ATMega32. With my new ATMega32, I tried this instruction:

"avrdude -c usbtiny -p m32 -B 1 -U flash:w:test.hex"

But I have an error message which say:

"avrdude: initialization failed, rc=-1

Double check connections and try again, or use -F to override this check."

Do you know what's problem can cause this error message? I verified the routing of my board, but I didn't see anything.

For information, I tried this with Linux and Windows

Thank you very much for your help.
araza12 says: Dec 21, 2012. 12:38 PM
All those resistors are of 100 ohms?
SuperTech-IT in reply to araza12Jun 16, 2013. 12:53 AM
All the current limiters for the LEDs are 100 ohms as well as the current limiters for the bases of the 8 transistors. The pull-up resistors on the collectors of each transistor are 1K. There is a 5V and ground plane up the middle of each set of 2 latches (flip-flops) with a 0.1 uF cap across each set of power rails. This board also now has three 5V regulators surface mounted under the board with three 1000 uF capacitors from the main power rail to ground. I will be powering the project with 9V to this board, and the regulated power will run all the circuits including the controller board. This is to eliminate strain on the controller board and it's regulator.
SuperTech-IT in reply to SuperTech-ITJun 16, 2013. 1:28 AM
These values pertain to my board, and not the original instructable. Sorry for any confusion, but I believe he's using the same values except for the power supply large caps.
Vick Jr says: May 26, 2011. 8:39 AM
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 in reply to Vick JrJul 19, 2011. 4:07 PM
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.
SuperTech-IT in reply to Vick JrJun 15, 2013. 7:09 PM
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 in reply to Vick JrJun 3, 2012. 11:38 PM
yeah, or even a counter like CD4017 which has an individual output for each state
cocoangle in reply to Vick JrJun 30, 2011. 9:36 PM
good idea!
LuenW says: Jun 12, 2013. 12:02 AM
It would be great if you can add a mic to it or somehow connect a sound file to it and have an audio reaction animation like this http://www.youtube.com/watch?v=PopWkg8-hsI
wigman27 says: Jun 10, 2013. 4:32 PM
Hi itssswojo, press the start button, button 1 and it should start.
1-40 of 1969Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!