LED Cube 8x8x8

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 1Skills required

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.

« Previous StepDownload PDFView All StepsNext Step »
1306 comments
1-40 of 1306next »
Feb 20, 2012. 12:03 PMmatt.e.jenkins says:
How do you change the code to use the 74HC164 IC, the 8 bit shift register? I have a bunch of these and would like to use them. Also I would like to use the Arduino for it. Would I need to change the Arduino code to use the 74HC164 IC? Has someone done this already? I would love to make this.
Thank you,
Matt
Feb 20, 2012. 11:49 PMtriumphtotty says:
Yup, I've done the C programming for this to help another Instructables user. It's very straightforward to do, almost easier than the latches. I can post the code for main.c/main.h if you would like?
Feb 21, 2012. 4:49 AMsciguy102 says:
hello triumphtotty!!!!...i am having the same problem...i need the code for an arduino mega1280...and am using the 74hc164 ic ...and how to connect all the wires to the arduino pins......plzzz help.....tnxx....
Feb 21, 2012. 8:09 AMtriumphtotty says:
http://www.instructables.com/file/FU8Q0RLGYVDHX85/

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.
Feb 21, 2012. 10:37 AMmatt.e.jenkins says:
Thank you so much for the quick reply. That is a great help. Turns out I have 74HC595 ICs and not the 74HC164 like I thought, so unless those would work, I'll have to order some. Would you recommend ordering the 74HC164's instead of the 74HC574's? It will be a bit till I can get started but I want to make sure i have a good understanding of it all first. Thanks again.
Matt
Feb 21, 2012. 11:12 AMtriumphtotty says:
I'd go with the 595's for sure. They're a much nicer solution as they latch their old data until the new data is pushed in. Just one or two minor code changes to make for them, but you will get a brighter cube!
Feb 21, 2012. 1:42 PMmatt.e.jenkins says:
Well, that's good news. If you are willing I have a few more questions. Do you know if 595's attach the same way as one of the methods shown? I am familiar with Arduino's and have some atmega 328's here that are just waiting to be embedded in a new project. It was shown that a Arduino can be used but if so, can the cube also be run by the computer for the better animations? Or is the atmega32 with the rs232 necessary to communicate with the PC? I wasn't clear on that. Maybe this is to complicated but I would like to learn.
Thanks,
Matt
Feb 22, 2012. 12:21 AMtriumphtotty says:
They attach pretty much the same way. Grab the datasheet for the 595:
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)
Feb 22, 2012. 11:32 AMmatt.e.jenkins says:
Thanks again for your reply. So if I want to use an Arduino for the brains can I get away without buying an ATmega32 and still be able to run the more advanced programs from the PC?

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
Feb 22, 2012. 1:36 PMtriumphtotty says:
:o)  I stand on the shoulders of giants here!  The only critical thing with the Arduino is that you can access two full ports (all pins from 0-7)  You'll need RS232 RX/TX too obviously, and around 6 pins for LEDs, switches and the control wires for the 595 chips.  I'm not very clued up on Arduinos, but I think you could just about manage it with an Uno and the Mega(?) one with around 50 pins will definitely work!!  Given the actual cost of an ATmega32 is around 1/10th of the Arduino Mega-thingy, I'd go with the ATmega32 design for cost reasons alone if it came to it.  Again, datasheets are your friends for knowing what connectivity is available.
Feb 22, 2012. 2:02 PMmatt.e.jenkins says:
I though that might be the case with the lack of pins. I do have an Arduino mega i can use but that would be a lot of recoding. I should probably look into getting the atmega32 and a USBtinyISP. It would be fun to learn a new chip. Thanks
Feb 22, 2012. 8:51 AMaj1234 says:
Hi,
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.
Feb 22, 2012. 11:16 AMmatt.e.jenkins says:
I would check out http://www.taydaelectronics.com/ I have bought from them before and they have great prices. You can get at least some of your items there. Hope that helps.
Matt
Feb 21, 2012. 8:02 PMSomegod says:
Is it possible to have it modulated by sound from the software aspect?
Feb 21, 2012. 5:57 PMtarPancake says:
when i compile the custom code, all i get is the 2 flashing led's the cube never boots into avr mode. if i program the cube with the main.hex and main.eep from step 48, everything works fine. I think that there may be something in the code not letting it return 1 in the bootwait function. is there anyone that can confirm or send me a zipped up version of the file above with the correct code?

Feb 21, 2012. 7:58 PMtarPancake says:
hmmmm.... when i compile in linux, all is good :)

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.
May 31, 2011. 5:25 AMCroy9000 says:

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.
Feb 21, 2012. 4:53 AMfroibo says:
Very nice!
Feb 20, 2012. 1:14 PMchris84 says:
Can you please send me integrated PCB design and the circuit diagram/electronic schematic! Christoph@hausner-net.de Thank you very much!
Feb 18, 2012. 6:18 PMcang1988 says:
you can send me the PCB file is not so? I also want to make a product like this
chieuduongbocchay@yahoo.com.vn
Feb 16, 2012. 11:54 AMMitsuhiro says:
me parece estupendo todo esto queria saber en que pais se encuentrar y quisiera saber cuanto sale ese LED cube 8x8x8 demo el precio espero su respuesta pronto.
Feb 15, 2012. 9:36 AMtronghai_tk says:
You can send me all the PBC (printed circuit boards, code, diagram principle)? I want to make you one. thank you much.
mail: pkstyle9x@gmail.com
Feb 12, 2012. 12:01 PMmrdj3 says:
Can you please send me integrated PCB design mrdj3@hotmail.com
Feb 12, 2012. 8:17 AMloknar28 says:
Very nice, I like the integrated PCB design.
Feb 8, 2012. 8:52 PMcang1988 says:
you can send me the design PBC is not so
I also want to make a product just like you
forward your feedback
chieuduongbocchay@yahoo.com.vn
chieuduongbocchay@gmail.com
Feb 8, 2012. 8:52 PMcang1988 says:
you can send me the design PBC is not so
I also want to make a product just like you
forward your feedback
chieuduongbocchay@yahoo.com.vn
chieuduongbocchay@gmail.com
Jul 5, 2011. 9:05 PMledartist says:
Do you mind letting me know what MOSFETs you used?
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.
Jul 6, 2011. 5:34 AMCroy9000 says:
I used Mouser Part # 689-VN3205N3-G. These 1.2A Mosfets worked great for this application. Assuming you are building an 8x8x8 cube, remember the layers are on a duty cycle (1/8), so you will never be pulling the full current of the entire cube.
Jul 7, 2011. 8:28 AMledartist says:
Thanks! Too bad I was actually looking for P-channel MOSFET. I searched Mouser and the largest current was about 650 mA for TO-92 type...

Nice PCB you made. Congrats!
Jul 6, 2011. 3:20 AMnaeger says:
I am having the same problem. Trying to find a replacement for the 8x2 Transistors in the original text brought me to MOSFETS (or low-side mosfet drivers). But I also couldn't find the right part to switch 2A. Which MOSFETs do you use?
Jul 7, 2011. 11:40 AMlazardj says:
i just made my with uln2803
May 31, 2011. 8:43 PMfebinjohn says:
u are using only 8 transistor ???
2n2222??? it self!!!
Feb 21, 2012. 2:39 AMHighFly3r says:
Hello everybody,

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!!!
Nov 26, 2011. 11:52 AMwingraham says:
Does anybody have a recommendation or preference between carbon film and metal film resistors? Also the site I am looking at offers resisters divided into categories of 1/2 watt, 1/4 watt and 1 watt.
Dec 5, 2011. 12:08 AMdabamrak says:
I think they have used 1/4 watt, can somebody confirm?
Feb 20, 2012. 8:48 AMtarPancake says:
yes, 1/4 watt
Feb 19, 2012. 2:58 PMjuteda says:
OK, since Instructables is nuts and doesn't show some comments and stuff, I'm gonna try and make a new comment:

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!


Feb 10, 2012. 4:49 PMjuteda says:
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!
Feb 19, 2012. 1:44 PMvccat says:
Juteda, That is FANTASTIC!!! Can I please get a copy of it?
Feb 19, 2012. 1:33 PMjuteda says:
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!
1-40 of 1306next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
596
Followers
7
Author:chr
I like microcontrollers and LEDs :D