Picture of 4x4x4 interactive LED-cube with Arduino
To explain my 4x4x4 interactive LED-cube published before, a bit more clear, I will try to make my first step by step instructable.

This 4x4x4 cube is interactive by using the top four corner LEDs both as LEDs and as sensors that will react on light. Depending on what LED gets the least light, the cube will run a different show.

Step 1: You will need:

Picture of you will need:
soldering iron
small screwdriver
some drillbits
piece of wood
computer with Arduino software
breadboard (optional)

64 led's
4 resistors that go with the LED's (yes just 4)
1 Photocube
1 Arduino
some wire
some small COAX wire (isolated wire)
16 headerpins

1-40 of 101Next »
dtidbeaux1 year ago
i think i may have soldered the third layer down to the second layer incorrectly. i soldered the anodes of the third layer to the cathodes of the second. That meant i had to turn the third layer 90 degrees clockwise instead of counter clockwise as your instructions say. I'm not sure what i did wrong
kenyer (author)  dtidbeaux1 year ago
That could mess up the patterns a little (what you could fix in the sketch) but they should still light up correctly. So there must be something else...
dtidbeaux1 year ago
I double checked polarity. Everything seems correct. double checked resisters. Using 100 ohm as per led calculator for 3v@20mah leds at 5v+. Every led is functioning at some point. i can't seem to figure it out:/
dtidbeaux1 year ago
Very informative instructable. I'm trying to duplicate your work here. I've finished the cube as far as i can tell, but the top 2 layers only light up to half of the brightness and do not seem to follow the rest of the patterns of the first 2 layers. I've double checked everything i can think of (anode touching cathode, wire disconnected, short... ) im still new to arduino so any help would be appreciated
kenyer (author)  dtidbeaux1 year ago
I can't think of any reason that would happen except the things you already checked. You could check the values of your resistors and the polarity of the LED's although I don't really think that would be it. When I think of something smarter I will let you know.
Sorry I can't be of better assistance at this moment.
pgautam12 years ago
sir ,i am just starting the project so please help about which arduino should i buy (which type,name,code)or any.
plzz reply
kenyer (author)  pgautam12 years ago
Any Arduino board would work, but to start with I would choose the UNO or leonardo. The (old) Duemilanove would also work fine.
I would advise you to start with some simple playing with LED's and sensors before you try this more complex LED-cube. Adafruit (http://www.adafruit.com) and Oomlout (http://www.oomlout.com) have some great tutorials.
If you have already some electronics experience and you understand what multiplexing and charlyplexing is about, this project will not be a problem for you.
Have fun!
ya i have done some led project in clg,so m trying this one.
I m not understanding the concept of top corner four sensors led n how are its connection so plz help me out with it and m using blue led for 1st &4th layer and green for 2nd &3rd layer let me know weather its ok or not.
n thanks for previous reply
kenyer (author)  pgautam11 year ago
The color you use is up to you. Just be sure to use the right resistors to go with your LED's.
It might help to look at this ible to understand the tot corner LED's: http://www.instructables.com/id/LED-as-lightsensor-on-the-arduino/
This YouTube clip might also be helpful:
i just completed my cube but the problem is,when the rotational function comes the LED's become very dim n the fourth layer is also not glowing.i used 560ohm resister let me know weather its correct for green n blue led or not.
i under stood the sensor part Thanks for that...
kenyer (author)  pgautam11 year ago
The resistor can be different for every type and brand of LED. If you can find a datasheet with your LED's, this might help. Otherwise just ask your supplier what resistor should go with your LED's for a 5 volt supply.
Thanks,I got my fourth layer on but still the rotational function is very dim n not at all clear
can u plzz suggest me about my question,i have almost completed the project
kenyer (author)  pgautam11 year ago
The only thing I can think of is that you use the wrong resistor. The LED's will never be in full brightness because they are not burning full time but blinking very fast. (faster then the eye can see) but they should not burn dim.
ok...thanks for your suggestion n help throught the working.
comment:keep making and sharing such innovative things ;):)
White-Tea1 year ago
Hi, thank you very much for your great tutorial. As promised a link to my finished Cube:
kenyer (author)  White-Tea1 year ago
Super cool!
White-Tea2 years ago
(I'm also having problems with the captcha and replying, sorry)

I finished it now, but the problem with the LEDs in the second row always lightly burning still exists... If you have any idea about that I'll be gratefull.

I also had to change the portnumbers and some other things in the code because I think I did things slightly different.

Now I'm working on 3D snake code :) I'll post a video link when it's done.

Thanks very much for your instructions
Userr123452 years ago
No it's not , want me to post a picture?
Ps: sorry but for some reason it won't let me reply
kenyer (author)  Userr123452 years ago
Yes, a picture might be helpful.
Userr123452 years ago
also i have another question, i dont know if you are going to know this but with my arduino uno came a nother board that mounts on top of the arduino with the arduino ports. do you know what that board is for or if i should even use it? i tried serching for it on the internet but couldnt find anything
kenyer (author)  Userr123452 years ago
Could it be a protoshield? http://arduino.cc/en/Main/ArduinoProtoShield
Userr123452 years ago
i did the first two layers succesfull, but im having trouble with the 3rd and 4th.
i dont quite understand what you mean by the corner LED's.
on mine i didnt finish reading the instructions so i did the 4th layer like i did the first one. How can i fix this and how to i hook it up properly
kenyer (author)  Userr123452 years ago
When you didn't leave out the top corner led's, you will end up with a normal 4x4x4 LED-cube without the interactivity aspect of it. If you do want the interactivity, you will need to desolder the corner led's and resume as instructed. The four top corner led's need to be totally separate from the rest of the cube.
Hmmm... I have a 3x3x3, but this looks so good I may have to make one! Great instructions. Thanks!
fallenheart2 years ago
is there something besides COAX wire you can use? something like maybe speaker/lead wire?
kenyer (author)  fallenheart2 years ago
The wire needs to be shielded in some way to work. The signal from the LED is very weak and easily disturbed.
jimdsouza2 years ago
Could you tell me the music you used in your final video?
kenyer (author)  jimdsouza2 years ago
I just used one of the tunes Youtube provides.
fallenheart2 years ago
What are the dimensions of just the led cube part?
kenyer (author)  fallenheart2 years ago
The distance between the LED's is 12,5 mm, so the cube is approximately 40 x 40 x 60 mm.
oh that's perfect thanks!
zealroy3 years ago
thanks a lot kenyer. I am now half-way on finishing the project. your work really appreciated specially the codes.

Questions: If i want to replace the 4 LED sensor and replace it by a switch, how would i write the code. I mean where would i start?...
kenyer (author)  zealroy3 years ago
Hi Zealroy,

If you leave out the sensors, it will make your code much easier. You can delete everything in the void loop() and replace it by code that will test your button(s) and then calls one of the four splash voids.

I hope this was helpful for you
mrwicked3 years ago
Alright here is the finished product, as promised.
2012-06-27 20.21.jpg2012-06-27 22.21.jpg
kenyer (author)  mrwicked3 years ago
WOW really nice! I like the nice box for the electronics.
mrwicked kenyer3 years ago
Thank you, I bought the wood at micheals and built, sanded and stained it.
I am impressed with the finished product, now I need to attempt a larger cube!
mrwicked3 years ago
So I just completed this cube and I did it without the sensors,
I did layer one as described, layer two charlieplexed with layer 1, layer 3 i have the anodes of layer 3 bent down and soldered with the cathodes of layer 2, and i have the cathodes of layer 3 soldered to the anodes of layer 4.

I have the code uploaded to the arduino, and it seems to be working, well the bottom two layers work fine, the top 2 layers, are half working? the leds are very dim and dont seem to follow the pattern expected. I may have mis soldered layer 2-3 im not sure any idea?
Turns out the pin zero on my arduino is shorted, i moved them all over one pin and made the adjustments and it works great!
kenyer (author)  mrwicked3 years ago
Cool to hear that it works. I'm curious how it turned out. Can you post a picture?
1-40 of 101Next »