The 4x4x4 LED cube (Arduino)

 by forte1994
Featured
led.jpg
In this instructable I will show you how to make a 4x4x4 LED cube that will be controlled by an Arduino Demulionove. now yes you might say" that Arduino has only 14 I/O pins well also the 6 analog pins can be used as pins 15,16,17,18,19,20. that way giving us enough pins (16 columns + 4layers = 20 I/O pins)

This instructable is made for those who know how to solder (well) and how to program the Arduino. Also I will be providing detours to skip sum steps so if you see (Detour available skip to __ Step) you can follow if you are to lazy to do that.

 
Remove these adsRemove these ads by Signing Up

Step 1: Get the materials

DSC09021.JPG
To start of you will need these materials:

Mandatory
-- 64 LED (color optional) **
-- Arduino Demulionove
-- Wire

Optional
--32 male pin strip
--PCB prototype board
--Fine Grit (400 +) sand paper

Your choice
-- 64 resistors or 16
you can get 64 resistors which will help by keeping all the lights at the same light out put regardless of how many are on but it will be considerably more work.

Tools:
--Computer
--Soldering Iron
--Solder
--thin nose pliers

**Color is optional but use this website to find the right resistor for your leds http://led.linear1.org/led.wiz (I got Green so I used 100 ohm resistors)
 
1-40 of 95Next »
GeniusDevils says: Mar 9, 2013. 10:43 PM
It seems perfect LED design

Find another cool projects based on LED
jatinbatra says: Feb 15, 2013. 1:26 AM
I'm an Arduino begginer ...can i have line by line explanation of code? please
WGY says: Dec 29, 2012. 7:47 AM
I made my cube and all of the lights work, however, there seems to be a problem with the wiring. Whenever I address a single LED in 6 of the columns, The whole column lights up. This does not happen in 2 columns where the LED's light up individually.
Help would be appreciated!
Thanks!
forte1994 (author) says: Dec 23, 2012. 10:53 PM
I might make a miniature version with smd leds most likely bigger then a 4x4x4 maybe a 8x8x8 or a 10x10x10.
fryddog says: Aug 19, 2012. 12:51 AM
Hello,
I have made an 8x8x8 led cube already and I am trying to find an easy way to program it. Is it possible to use your code and adapt it to an 8x8x8 cube? If so would you know where to change it?
OCPik4chu in reply to fryddogOct 16, 2012. 1:24 PM
There aren't enough outputs on the arduino for that without additional logic such as shift registers or LED drivers, either one will require a major rewrite in the code since it is a completely different method.
Obruni says: Sep 22, 2012. 11:36 AM
Did it!
Thanks for the great instructable.
Took me 2.5 hours of constructing. The coding took about the same time (with code example available over here)

http://www.youtube.com/watch?v=XQynlmQtXY8&feature=plcp

Let's go for the 8x8x8 :-)

Obruni
velankani says: Aug 28, 2012. 11:22 AM
i did it successfully .
ajvdmeij says: Feb 21, 2012. 1:57 PM
I have just built the cube and it is working great. You can see it here: http://www.youtube.com/watch?v=TwlSijShbbc 

Making the code for great patterns is kind of difficult, so I made a little Javascript program to make designing them more easily. It basically works as follows. You see four squares: the first square is the front layer, the second, the one behind that, the third the one behind that and the last is the back layer. You can set the LEDS on or off and when you have made a pattern, and have set a time in a text box, you can write it to a text area. Then make another one, and another one and.. When you are finished, you can copy the contents of the text area and paste it in the Arduino Code. Then go for it!

Try it here: http://home.kpn.nl/ajvdmeij/makecode.html. If you want the source code, you can copy it or tell me and i will mail it to you.

Have fun!

twitter.com/arjanvandermeij
will2313 in reply to ajvdmeijAug 25, 2012. 3:53 PM
hi ajvdmeij
can u send me the source code for the 4x4 led cubes? thx a bunch..

will,
fryddog in reply to ajvdmeijAug 19, 2012. 1:35 AM
That is awesome!!! So handy. Thanks!
Any chance you could whip up a similar program but for an 8x8x8 cube?
'earl says: Aug 7, 2012. 2:43 AM
Hey guys, Ive finished mine, and started with this code, took me a while to figure it out, but after 7 hours of maually writing my own binary code, Heres my cube. Not Done. But its Pretty awesome so far I think. :D

https://www.youtube.com/watch?v=pYjYs9WjlLY
velankani says: Aug 5, 2012. 12:02 AM
at least send me Arduino Demulionove board .where will it available ?
velankani says: Aug 5, 2012. 12:01 AM
i want to bye this project .
can u tell me cost of this project .
and send to my address.
9949795249
jamesabruce says: Aug 2, 2012. 1:37 AM
Hey guys, I built one of these and wrote up the process as well as some additional software for this build:

http://www.makeuseof.com/tag/programming-arduino-4x4x4-led-cube-awesome-stuff/

It just goes over how to code programmatically for the cube rather than using a set pattern, so you can start to make games and interactive stuff. Sepcifically, I wrote code for a 2 segemnt random snake, and conways game of life. Hope you like and it spurs you on to making more apps for this - please send me a link if you do.

Forte1944 - thank you for an awesome build - gave you full credit in the original article here: http://www.makeuseof.com/tag/how-to-make-a-pulsating-arduino-led-cube-that-looks-like-it-came-from-the-future/
eagletech201 says: Jul 30, 2012. 9:40 PM
Is there a schematic. I can't tell what goes where.
gibsoncrazed14 says: Apr 14, 2012. 8:45 AM
I'm brand new with arduino and i was curious to how you would upload the code on to it? any help will be appreciated. Also great work.
- Thanks
Murel in reply to gibsoncrazed14Jul 29, 2012. 1:58 AM
First, you have to download arduino software from arduino.cc. There will be a manual for installing drivers. After you have done that, open arduino program, write code, comply and upload to board!
velankani says: Jul 6, 2012. 5:20 AM
can u tell me about the full wiring circuit diagram .
stringstretcher says: Mar 12, 2012. 4:34 AM
http://www.instructables.com/id/3X3-LED-Cube-Programming-tips-Arduino-based/
alsetalokin says: Feb 24, 2012. 10:21 PM
Well, I built a cube (from a different instructable) and uploaded the .pde, and it runs, and appears to make the correct patterns, I think... but I can't make heads or tails out of the pattern making strings. There are some weird brightness variations too.

There are sixteen "B0000" groups per line. One would think that each group corresponds to a vertical column, and the 0s and 1s indicate the plane, and whether the light is on or off.

But that's not how it seems to work for me, and I can't figure it out.

The java applet on makecode.html always prints the same line, sixteen B1111s, no matter what boxes I have checked. The only thing that changes is the duration number, which does correspond to what I enter in the box. But everything else is always B1111s.

Can you please help me understand the pattern strings?
ajvdmeij in reply to alsetalokinFeb 27, 2012. 7:01 AM
I tried it in Safari and Chrome on a Mac and they work. I just saw that it didn't work in Firefox. I also tried it in Windows: IE also didn't seem to work. But Safari for Windows does the trick and I think )although I did't try) that Chrome will also work on a Windows computer.

I made the code in Dreamweaver and I will try to make it Cross-platform compatible but I can't promise anything: I am just an amateur!
naylson in reply to ajvdmeijMar 2, 2012. 12:16 PM
ei grande me da awe umas dica como fazer ou me vende um
tboultwood1 says: Feb 19, 2012. 1:48 AM
Thank you ever so much for a great tutorial, i just made a 3x3 3mm red because I had no other LEDs :S So I just ordered a bag of 100 Blue! Thanks again and hope to see more of you in the future.

Trevor B
vishalapr says: Dec 30, 2011. 6:28 AM
I am making another cube and this time I am confused on the resistors bit...

I have a question...I am using these LEDs...

http://www.ebay.pl/itm/110783289032?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_1456wt_1139

I have resistors of all the values from 1 ohm to 1 mega ohm....in 10's ....
So which resistors will I need to use for those LEDs? The cube is connected to an arduino nano...

plz help :)
awang8 in reply to vishalaprJan 18, 2012. 3:36 PM
100ohm resistors should work.
Bruno Silva Pinheiro says: Jan 11, 2012. 1:52 PM
Please, could you post pictures of the links in Arduino, would help greatly.
Oh, and if you have the electronic circuit, would be great.

Thank you.

Great project, congratulations!

jwgillon says: Jan 8, 2012. 2:42 AM
If anyone has expanded on the code, please post it!
supernova12 says: Feb 4, 2011. 12:54 PM
This cube is awesome, I just built it as my first project with my new arduino and it works great :). Thanks so much for the code, I honestly couldn't be bothered writing all the patterns myself.
forte1994 (author) in reply to supernova12Feb 5, 2011. 5:03 PM
Good job, and I did make a java app to write the code for you and you just check and ubchek boxes, its still a work in progress but does genorate the code. I'll try to finish it asap and post it here.

jwgillon in reply to forte1994Jan 7, 2012. 1:21 AM
Great instructable! Could you post the java app in its current state?
joris14 in reply to forte1994Nov 22, 2011. 7:12 AM
Do you have finish the program that generate the code ?
It will be very helpful for me.

(sorry for my bad english)
vishalapr says: Dec 18, 2011. 7:00 AM
Could you help me with how the code works plz ? I get that we change the binary values for the LEDs and I can do that quite easily, but what does the rest of the code do? The instructions and help lines on the file don't really tell me what they are and why they are even there and not just the whole 10101 thing...

By the way,
This ible is awesome! It helped me a lot! Thx for the ible!
forte1994 (author) in reply to vishalaprDec 18, 2011. 8:27 AM
The code is there to do multiplexing. It turns on only one led at a time to fool our eyes that more are on. If you take out the code then when you light up the top corner and the bottom oposite corner 2 more leds will light up not only the ones you lit. Hope this answers your question :)
DARKEG0 says: Dec 14, 2011. 10:42 AM
Can you post picture how you connected all this to arduino please it would really help
markie says: Nov 27, 2011. 6:34 AM
Hi,
my english is not so good but this link helped me alot with my led cube ..

http://www.imagesco.com/led/LED%20Cube%20Instructions.pdf

gr mark
joris14 says: Nov 5, 2011. 2:22 PM
Great instructable, Very cool project to do.
vishalapr says: Nov 1, 2011. 11:09 AM
I am done with everything, making and running the code and everything worked smoothly, but to change animations how can I program the cube? Becaues the last step is a bit hard to understand as I don't seen to know what u are talking about, how can I change the program to light up a certain LED at a time, or a couple of LEDs at a time?

Thanks
emihackr97 says: Dec 8, 2010. 3:46 PM
i dont understand, doesn't Arduino only have 3 GROUND PINS??
how cmoe you connect 4 different wires to it, please answer.
lookwhatjoeysmaking in reply to emihackr97Jul 18, 2011. 2:03 PM
yes it only has 3 gnd pins.althoght you can use the digital pins as gnd to.
To set a pin to GND:

pinMode(pin,OUTPUT);

digitalWrite(pin,LOW);

i thought the same thing at first but then someone helped me so.
1-40 of 95Next »
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!