P1020689 b.jpg
P1020672 b.jpg
P1020669 B.jpg
P1020682 b.jpg
P1020625.JPG
P1020676 b.jpg
A while ago, when I first started using Arduino, my first project was a 4x4x4 LED cube, I built it from a Guide I found here in Instructables, I didn't know anything about programming, and little about electronics, yet I was able to build it and make it work, I didn't know how it worked but it did!
That success made me like this page a lot and also made me want to make guides like that one, well documented and properly explained, enabling people to make cool things, at first without them knowing how they work, and from there, from a working piece, start learning and understanding how it works.












note: the last 2 videos are not from my cube, but it works in the same way and gives the same result.
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

P1020390.JPG
For the most basic cube you will need;
  • 1x Atmega328 (With arduino Optiboot bootloader)
  • 3x TLC5940
  • 4x P-Channel MOSFETs
  • 3x 4K7 Resistors
  • 3x 16 pin Male and Female headers
  • 1x 4 pin Male and female header
  • 1x 28pin IC socket
  • 1x 1000uf 10v capacitor
  • 1x 0.1 uf ceramic capacitor
  • 2x 22pf capacitors
  • 1x 16Mhz crystal oscillator
  • 64x RGB common ANODE LEDs (it is very important that you check your LEDs are common ANODE, or else, the cube won't work!!)
  • a LOT of Solder!

for more advanced functions;
  • 3x 8k2 resistors for optional, low power mode.
  • 3x 3pin male headers for jumper selection of the power mode
  • 3x jumpers for selecting the power usage/brightness setting
  • 2+x 64KB EEPROMs for storing custom animations
  • 1x DIP switch for selecting different modes (random, serial, music responsive, random2, custom animations, etc.)
  • 2x MSGEQ7 chips for audio analyzing and music response.
  • Black paint

Tools;
  • An Arduino to use as a USB to Serial converter for programming
  • An USBTinyISP if your Atmega chip is not pre-Bootloaded
  • A Multimeter for troubleshooting and checking connections
  • Some way of cutting PCBs, I used a Circular Saw, but you can use whatever you have in hand.
  • Diagonal cutters
  • A Sharpie or any kind of marker
  • A Drill/Drillpress
  • A Cutter or Xacto knife
1-40 of 50Next »
parry453 says: Mar 7, 2013. 2:42 PM
In fact, after trying it again today, I have found that when I reset the microcontroller, my cube led's do light up for a split second then off for a second and then on again for a split second. It carries on repeating thing. The only thing I have done different is to wire up the MOSFET to Arduino using thin wire. Would this cause it a problem? Is the Thin wire struggling with the current? Also the LED's are very dim... I need to turn the light off to see them light. Any Ideas??
camtheman1283 in reply to parry453Apr 13, 2013. 9:23 PM
Thin wire from MOSFET to arduino wouldn't cause a problem as the arduino only provides a small current to basically flip a switch in the MOSFET. The higher current that powers the LEDs flows through the other contacts.
hey101 says: Mar 19, 2013. 1:07 PM
I looked around but could never find an LED driver that would work. So I just ordered the common anode LEDs. Where did you get the PCB from? Also what do you recommend for powering the cube?
parry453 says: Mar 6, 2013. 4:10 AM
Hi Emihackr97,

I have built the cube, and the circuit. And when I go to upload the program onto the chip it says it does it with no problems. But nothing happens after that. No patterns, no lights, no anything.
Did this happen with you? i'm using the power from the Arduino Uno board/fed by PC.

Any suggestions would be great!
hey101 says: Feb 21, 2013. 4:07 PM
I already have common cathode RGB LED's. What would it take to modify the circuit to use those instead of a common anode? I can modify the code myself but I am not sure on the circuit side of things. Thanks.
emihackr97 (author) in reply to hey101Feb 26, 2013. 1:54 PM
Hi, unfortunately, the TLC5940's are an open collector sink only constant current drivers, which means they can only connect LEDs to Gnd, not to Vcc, therefore you need the specified type of LEDs if you want to use those chips, you could search for some different chips, but I can't guarantee you it'll work.
camtheman1283 says: Feb 13, 2013. 3:44 PM
I used 4.7k for the TLC's. Weird, i guess ill recheck all the wiring and make sure nothing is shorted or anything. I used 10k for the pull-ups on the FETS but that shouldnt make any difference. I'll use a different supply and see if it works and ill make sure to take a video in case it does the same thing again.
camtheman1283 in reply to camtheman1283Feb 24, 2013. 11:59 AM
yeah.. so i blew another power supply. This one was rated to supply up to 2 amps. I really dont understand what could be going wrong. The lights turned on but didnt change colors or anything. I might just have to toss this project as i cant afford to keep wasting money on power supplys.
BIGDOG1971 says: Feb 24, 2013. 8:28 AM
This is a marvelous work.
Very nice... Super!
Congratulations.
camtheman1283 says: Feb 12, 2013. 9:09 PM
What current am trying to get for this? And that definitely makes sense then because if it couldn't handle the current the cube was drawing then it would burn it out for sure. And I'm sorry, i was going to take a video but it burnt out before I had the chance haha.
emihackr97 (author) in reply to camtheman1283Feb 13, 2013. 2:37 PM
Well, depending on the resistors you used for the TLC5940's, the cube could take up to 1 amp of current
camtheman1283 says: Feb 12, 2013. 4:26 PM
Rrrghhh. Thanks for the quick reply on the last question. So i got it programmed but then when i plugged it in.. It flashed rapidly and did not fade as its supposed to then popped my wall wart. Any ideas?
emihackr97 (author) in reply to camtheman1283Feb 12, 2013. 8:39 PM
Ok, my first idea on this one would be that probably the wall wart wasn't able to give enough current, therefore the voltage dropped, causing the Arduino chip to work improperly (flash?) and, at the same time, the wall wart overheated and maybe burnt.

I would recommend checking the specks of that wall wart to see if it can output enough current, and to try to power the cube with something like a computer PSU to determine if the problem lies in the cube itself or in the wall wart.

P.S. I can only imagine the problem from what you tell me so try to be as descriptive as possible so I can get a better idea of the problem.

Cheers, please keep in contact.
camtheman1283 says: Feb 11, 2013. 12:49 PM
Im getting an error and cant figure out why so i cant upload the program to arduino.
Here is a screenshot http://camsconstructs.wordpress.com/2013/02/11/error/
parry453 says: Oct 22, 2012. 5:18 AM
Hi emihackr97,

Love the cube! a quick question :

Did you manage to connect the MSGEQ7 for music response?

Thank you

Parry453
emihackr97 (author) in reply to parry453Oct 22, 2012. 1:53 PM
Not yet, As i'm still a student and school takes most of my day, I haven't had time to tinker around with that, but I already have the chips and i'll do it as soon as I find time.

cheers,
emihackr97
gcbalster says: Oct 2, 2012. 4:18 AM
Hi emihackr97

got a few question about the schematic
-are there alternative for the BUZ171 if yes which one ? (Q1 -Q4)
-why are there resistors by the buz171 and whitch one? an d not on the schematic.
-which are the value of R1,R2,R3

thank you
emihackr97 (author) in reply to gcbalsterOct 2, 2012. 6:51 PM
Hope I solved all your questions and make sure to post pics if you do build the cube!
gcbalster in reply to emihackr97Oct 2, 2012. 10:42 PM
Goodmornig emihackr97

Thank you for your awnsers
For now it solved a few questions, when i build a bueatiful cube as yours i think i wil have more.
and when i,m finishd i wil send a picture of the cube.

thanks
emihackr97 (author) in reply to gcbalsterOct 2, 2012. 6:50 PM
Hi, in fact, any P-channel MOSFET will work, I just wrote that in because that's what I used, the resistors aren't on the schematic because I frankly forgot to put them in, they are just to default the mosfets to the OFF state, they go between the gate and +5v and they can be anything from 1k to 100k.
R1, R2 and R3 can be anything 4k and 10k (they must all be the same) they are the current setting resistor s for the LEDs, the higher the resistance the lower the current, so the brightness will get reduced, however, the power consumption is reduced aswell.
gcbalster in reply to emihackr97Oct 3, 2012. 5:55 AM
Hi emihack97
ihave one more question how dit you connect the dipswitch?
Cello62 says: Sep 14, 2012. 12:16 AM
Hello. Congratulations, you did a nice project.
emihackr97 (author) in reply to Cello62Sep 16, 2012. 8:47 AM
thanks!
vvien says: Aug 31, 2012. 9:10 AM
Thanks for answering, I managed to make the LED cube to light up. But the problem now is that after I uploaded the program, I didn't get the flowing hue lights like the one in your video. In one of the columns, the color changes, but the others stays in the same color the whole time. And after about 1 minute, only the first or second layer would light up. Do you have any idea what the problem might be? I used a 5 V USB as the power supply. Thanks :)
emihackr97 (author) in reply to vvienAug 31, 2012. 1:54 PM
Hmm, perhaps it might be some mismapped wiring, maybe if you could get a video of it I can more easily try and diagnose the problem.
It's great that you´re building it,i'm acually currently adding the MSGEQ7's to mine so it can respond to music, that update will (Hopefully, if they work as intended) be up soon.
vvien in reply to emihackr97Sep 1, 2012. 11:07 AM
Here's the video:
http://www.youtube.com/watch?v=Dplms7SouR8&feature=plcp

As you can see there only a few are changing colors, but the other stayed in one color and some are blinking.

Wow, I would definitely love to see your cube when it's done with the upgrade. :)
emihackr97 (author) in reply to vvienSep 13, 2012. 2:07 PM
BTW, I'm just smoothing up the next version of the code, which will treat the cube as a 4 dimensional array and should be faster and super easy to modify, i'll tell you as soon as I finish it! ;)
emihackr97 (author) in reply to vvienSep 13, 2012. 2:05 PM
Hi, sorry for the late response, but I was out of town, I can see that your cube is really well built and that, at the beginning, all the LEDs light up, it's after a while that it "Freezes". this is not a problem of your cube, it's actually a bug in that code which I haven't been able to find, it happens to my cube also, but only sometimes, how often does it happen in yours??
vvien in reply to emihackr97Oct 11, 2012. 5:46 AM
It happens quite randomly, sometimes it immediately freezes, and sometimes it can lit up for two minutes and then freezes. Even so, I did not get the LED cube to be like the one in your video (the hue changing like a wave). did you use a different code for that video?
paler31 says: Aug 24, 2012. 2:20 AM
Hi I am going to have a go at building this, but I have a question about the resistors for selecting maximum current output. I am sure my LEDs have a 20mA maximun current but using a 4K7 ohm resistor according to the data sheet and my calculation only gives a max current of about 8mA. Is this still ok? or have I missed something?

John
emihackr97 (author) in reply to paler31Aug 26, 2012. 4:00 PM
Yes, it's still ok, the 20 mA are the maximum current you are supposed to give them, anything below is fine, as long as it's bright enough.
paler31 in reply to emihackr97Aug 27, 2012. 1:38 AM
ok thanks for that. I have a sneaking suspition that the led's i have saturate well before 20mA anyway.
emihackr97 (author) in reply to emihackr97Aug 26, 2012. 4:04 PM
hi, depending on your programmer, it should have all pins labeled, match them with the pins on the arduino pinout diagram.
you need to connect RESET, Ground, Vcc, RX and TX, you may need to reverse the RX and TX lines depending on the programmer you use.
vvien says: Aug 25, 2012. 2:10 AM
Hello. Thank you for replying the last time. I have another question: how to program using the pins? which one goes to which? thx. :)
Dreaded Boss says: Aug 23, 2012. 9:27 PM
I don't quite see where the 2 1000uF and 2 100nF capacitors are supposed to go. Are they all supposed to be in parallel attached to any ground and 5V?
awong19 says: Aug 12, 2012. 7:46 PM
Hi, your cube is beauiful!. If i were to build one like this and connect to the arduino nano instead of the bare chip, how would the schematic differ? Thank you.
matt_v says: Jul 8, 2012. 2:37 PM
hi there i am very interested in building this cube and was wondering if you have managed to get it to work with the msgeq7 and if so could you post an upto date sch as im just making a shopping list of parts..... cheers
vvien says: Jun 20, 2012. 2:52 AM
I'm trying to make this as we speak, one question: what do you use as the power supply? batteries or usb? thx :)
emihackr97 (author) in reply to vvienJun 20, 2012. 1:28 PM
The cube is designed to accept regulated 5 volts ONLY, if you want to power it with a higher voltage you should add an LDO regulator, i personally power my stuff with an ATX PSU for testing but USB should be able to supply enough current.
RobertRobbie says: May 23, 2012. 1:38 AM
Is it possible to make a bigger cube using this instructable?
1-40 of 50Next »
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!