3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino 4x4x4 LED Cube

Arduino 4x4x4 LED Cube
Overview:

     This instructable will cover the building process of an 4x4x4 LED Cube. I will be using an Arduino to control the LEDs.  Since the Arduino (Freeduino) has a total of 20 pins (including the analog pins) we will not need to have any multiplexing or shift registers.  I will take you though what i did in order to build the cube and create some designs of your own.



 
Remove these adsRemove these ads by Signing Up
 

Step 1Bill of Materials

Bill of Materials

 For this project I used the freeduino Arduino. Because the Freeduino has a total of 20 I/O pins (with using the analog pins) we will not need and multiplexing or shift registers. So all we will need for our project is:

1. LED x 64
2. Resistors x 16
3. Arduino x 1
4. Perforated PCB
5. Soldering Iron
6. Drill (for the jig)
7. Piece of wood (for a jig)

Vendors:

   I have found sparkfun.com and digikey.com to be good suppliers of small electronic components in general and are currently the only two that I have purchased anything from.





« Previous StepDownload PDFView All StepsNext Step »
33 comments
Mar 8, 2012. 11:02 AMma7moodz says:
Okay Im pretty much stuck here..
Where do I connect the the layer's negative control wires to? (the black wires)
Note: Im very new to arduino
May 22, 2012. 4:29 AMma7moodz says:
It worked!
and here is my result
http://youtu.be/VWYiD5FnHZc
Feb 29, 2012. 3:22 AMDeNuzio says:
Great instructable :) Here is my results.
http://www.youtube.com/watch?v=lVW64nfY2PE
I used forte1994 arduino's program
Feb 28, 2012. 6:03 PMargentinoloco87 says:
hey. ive read your instructions, but im not sure where to connect the leads from the resistors to the arduino? Im not sure what ports to use
Mar 12, 2012. 4:21 AMstringstretcher says:
I just posted an instructable on programming a 3x3x3 cube with an Arduino. It *might* be possible to adapt that to a 4x4x4 and give us even more programming possibilities. One would need to change the pin setup, but that is about all, I think.
Feb 6, 2012. 3:08 AMearton says:
I have followed your instructions, definitely the best instructable to help a beginner! I see your map for the columns, but can you tell me which cathode goes to which ground, for the layers?
Much appreciated :)
Jan 29, 2012. 6:22 PMPizzapie500 says:
Hi! I finished the cube, but I'm not sure where to attach the 16 columns of positive diodes, to the Arduino. Also I don't know where to put the negative ones either. Can you tell me which one goes to which pin number (like if the first one goes to A0, or like D3)? Sorry i'm new to Arduino, and the other instuctables used too many pieces. Thanks!
Jan 21, 2012. 3:30 PMAndreD. says:
Hey Sir...

Can you please explain how you write some letters in your 4x4x4 Cube?
Jan 12, 2012. 4:28 AMBruno Silva Pinheiro says:
Oh, and if you have the electronic circuit, would be great.

Thank you.

Great project, congratulations!
Nov 16, 2011. 8:03 AMkelsorj says:
Great project! I played around with different colors on each layer and it makes for some fun patterns.

http://www.youtube.com/watch?v=fXeoowp5JtE
Nov 16, 2011. 10:29 PMiinzunza says:
I have a project for a subject, and I decided to do this Cube but I have one condition... I need to use transistors, so my question is... How can I design the circuit using my arduino and transistors???
Oct 27, 2011. 7:58 PMBrunomaster says:
Por que está chueco? sabes soldar?
Nov 1, 2011. 6:12 AMJiax says:
I don't get how you connect wires to arduino.
My leds will just blink as random and not in order when I use the code. 'Cause I wired them up just randomly. Which ports should I be using?

There is something I do wrong, but I don't know what. Please help!
Oct 18, 2011. 7:42 AMMichael Dean says:
Does anyone know where to get an Arduino (i.e. the Uno) for less than what I'm finding them for? I can't really justify paying $30 for one (even tho it is very programmable), when I can get a pair of 556 relay timers for ~$.50 a piece that would perform a similar function; with the right capacitor/resistor setup.
Oct 19, 2011. 4:34 AMMichael Dean says:
Thanks Phogie,
I may just do the 556 for my cube. I only plan on having a couple of groups of LEDs in mine turn on and off, so a 556 (i.e. two 555s) should do the trick. That said, I do plan on buying an Arduino in the future, as they are very robust for what you can do with them.
Sep 17, 2011. 2:47 AMfryddog says:
I'm having trouble downloading the .pde file you've provided. Any help would be appreciated. I'm hoping it will help me figure out the programming side.

Your instructions have been very helpful. Probably the best I've come across so far. Thanks!
Sep 9, 2011. 3:57 AMVoodooVW says:

This was my first Arduino project. I built this cube because I like the idea of using just the 20 digital pins, LEDs and a few resisters. Everyone at home and work likes this project and want to see what I can get it to do next. I used Paden's original code on this page to test my cube with excellent results on the first try. Here is the first sketch I was able to make funtion myself.

/*  4x4x4 LED Cube
Chase around outside edge, counter clockwise, top to bottom.
By VoodooVw
*/

// Initalize our LED columns (positive)
int LEDPin[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
// Initalize the LED layers (ground)
int LayerPin[] = {16,17,18,19};
// Initalize the outside columns counter clockwise
int OuterEdge[] = {0,1,2,3,7,11,15,14,13,12,8,4};

// The Setup
void setup(){
// Set up LED columns as output and off
for(int pin = 0; pin < 16 ; pin++ ){
pinMode(LEDPin[pin],OUTPUT);
digitalWrite(LEDPin[pin],LOW);}
// Set up LED Layers as output and off
for(int layer = 0; layer < 4; layer++){
pinMode(LayerPin[layer], OUTPUT);
digitalWrite(LayerPin[layer], HIGH);}}

// Loop to chase around outside edge, counter clockwise, top to bottom
void loop(){
// Setup increment through layers loop
for(int layer = 0; layer < 4; layer++){
// Setup increment through outer edge loop
for(int pin = 0; pin < 12 ; pin++)
// Turn on LEDs starting from first column, top layer
{digitalWrite(OuterEdge[pin],HIGH);
digitalWrite(LayerPin[layer],LOW);
// Keep LED on for this time
delay(60);
// Turn off current lit LED then loop up to light next edge LED
digitalWrite(OuterEdge[pin],LOW);}
// Once all LEDs have been lit loop all the way up to increment layer
digitalWrite(LayerPin[layer],HIGH);}}


 

Jul 29, 2011. 8:07 AMrbertsch8 says:
I am somewhat confused by this step. Are you soldering all of the bent cathodes for the entire layer together? So the columns will only be connected together on the first row that you solder together, correct? So all the cathodes for an entire layer are connected to the same node?

thanks for the help cant wait to get started

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!
5
Followers
2
Author:Phogie7