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 ads by
Signing UpStep 1Skills required
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)
| « Previous Step | Download PDFView All Steps | Next Step » |


























































































![Hard Wired LED Cube: [No Programming]](http://img.instructables.com/files/deriv/FTD/SF1T/GO8DC8KW/FTDSF1TGO8DC8KW.SQUARE.jpg)
















Thank you,
Matt
The code should be 100% self-explanatory, and the text file in there should help describe the changes. Just copy main.c and main.h over Chr's and make. Simples!
Changes to Chr's basic circuit design are:
1)move the main button onto PD6 to free up some extra pins on PORT B for other things.
2)The 74HC164 is wired to PORT A for the data (one pin of PORT A goes to each of the DSA pins on the 164s)
3)PB0 goes to the CP pins on all of the 164s
4)PB3 goes to the MR pins on all of the 164s
5)Wire DSB to Vcc on each 164
6)Wire the outputs (Q0-7) on the 164s exactly as the 574s.
Read Chr's comments on cube rotation if using shift registers. You may wish to pre-empt any problems by wiring your cube base wires "along" rather than "across" the cube to rotate the effects 90 degrees. Or... just rotate your cube!
The other wiring is identical to Chr's Instructable, so just follow that for everything else.
Using the 74HC164 saves a LOT of bus wiring on the multiplexer board (just two buses for CP and MR instead of 9 for data+CP on the 74HC574s!)
Good luck. Let me know how you get on.
Matt
Thanks,
Matt
http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf
ersonally I would wire all the OE pins to GND, the MR pins to Vcc, then put the DS pins to one each of PORTA, and SHCP and STCP to PB0 and PB3. Modifying the C code would then be a simple case of clocking in the data on PB0 (remember this will NOT change the output pins, so the transistor for the previous layer can be left ON), then transistor off, push PB3 high to latch the new data, next transistor on. I'll happily do the code mods if you let me know which pins you are using. As I said, my code uses PD5 and P6 for the RS232 and main buttons respectively, so there are enough free pins (5?) on PB for wiring up the OE pins (and even MR, although that's kinda pointless) if you wanted to for completeness. But it will work perfectly with the above wiring, as it's basically how the 164s behave, but with the advantage of the latching data on the outputs. :o)
I would like your help with the code mods but I probably will not get to that step till this spring. Can I PM you when the time comes?
It's people like you who make this online community great. Thanks for helping me out.
Matt
I am starting on this project and i have bought all the parts from digikey using the spreadsheet you provided in one of the comments. I also bhought the LED's from ebay. By comparing your spreadsheet and your list in the second step i found that i am missing these parts
64x resistors. (see separate step for ohm value)
3x status LEDs. You choose color and size.
3x resistors for the status LEDs.
16x PN2222 transistors
1x 2-pin screw terminal
1x 2wire cable with plugs
9x 8-pin terminal pins
1x 4-pin terminal pins, right angle
2x 16-pin ribbon cable connector
1x 10-pin ribbon cable connector
Ribbon cable Jameco
x pushbuttons
2x ribbon cable plugs
9x 8-pin female header plugs
Serial cable and 4pin female pin header
Piece of wood for template and base
8x optional pull-up resistors for layers
I managed to find the ribbon cable at Jameco but having trouble finding the other parts. is there anyway you guide me in finding the rest. I really want to build this LED cube. Thanks in advance for any replies, hope to be hearing from you soon.
Matt
I am thinking that my winavr setup is bad. maybe crlf? lf? cr?
anyway, dual booted into linux, edited the source and compiled first time no errors and programmed the chip with no problems either.
Here are some pictures of my completed PCB board for the project.
There is a video of the completed cube further down. And more pictures here https://picasaweb.google.com/steve.easley/LEDCube?authkey=Gv1sRgCK3EjJ65sbacrgE#
The circuit design includes 8 high power mosfets, instead of the 16 transistors, and 8 bit shift registers instead of the flip-flops. Works great.
If you are interested in the ExpressPCB designs and parts list, shoot me a PM.chieuduongbocchay@yahoo.com.vn
mail: pkstyle9x@gmail.com
I also want to make a product just like you
forward your feedback
chieuduongbocchay@yahoo.com.vn
chieuduongbocchay@gmail.com
I also want to make a product just like you
forward your feedback
chieuduongbocchay@yahoo.com.vn
chieuduongbocchay@gmail.com
They look to be TO-92 type, which I could not find a decent one (to handle about 2A). I can only find larger package ones.
Nice PCB you made. Congrats!
2n2222??? it self!!!
i´ve got a question about the program for the pc to communicate with the µC. In which software it should be compiled? I´m a windows user...using Visual Studio 2008/2010 and AVR Studio 5.
The cube is working perfectly. I´ve testet RS232 with an terminal program too, and it works.
sry for my bad englisch.
thx for all replies!!!
Original comment:
Hey! I've written this program in Processing to control the LED cube via serial port, which allows to create animations very easily by saving frames (It's very time consuming though). It's very easy to interface the cube with Processing, just port the setvoxel() function and make one function that writes the array to the cube. Easy peasy. You should definitely try it!
Here's a little video of the program capabilities:
Cheers!
Second comment:
OK, since some people have showed their interest in my program, here are the download links for the binaries.
There are two versions:
1) LED cube program boxes
This versions uses boxes as the shape to represent LEDs in the 3D cube model. It runs considerably faster than the second version.
Download link
2) LED cube program spheres
This versions uses spheres instead of boxes for the shape of the LEDs in the cube model. It's very slow but looks nicer.
Download link
Hope you enjoy it!
Cheers!
Third comment:
Oops, forgot to mention:
Inside the zip file there is a Windows version and a Mac OS version. No linux this time, I couldn't get it to work properly :(
-------------------------
Hope it works now!
Here's a little video of the program capabilities:
Cheers!
There are two versions:
1) LED cube program boxes
This versions uses boxes as the shape to represent LEDs in the 3D cube model. It runs considerably faster than the second version.
Download link
2) LED cube program spheres
This versions uses spheres instead of boxes for the shape of the LEDs in the cube model. It's very slow but looks nicer.
Download link
Hope you enjoy it!
Cheers!