5x5 LED Cube (Arduino Uno)

 by icky_unicorn
Featured
IMAG0182.jpg
This is a step by step explanation of how to build a 5x5 LED cube using an arduino.  I did this project for my undergraduate electronics class and it took me about 2 weeks to complete.

Note: Apparently, some of the links for the supplies and code aren't working, if you need them send me a message with your email and I will send them to you. 

You can find a video of the working LED cube on youtube here:
http://www.youtube.com/watch?v=KiE-WHqU5a8&feature=youtu.be


And here's another:
http://www.youtube.com/watch?v=6zRlhSzXP80&feature=youtu.be


 
Remove these adsRemove these ads by Signing Up

Step 1: Supplies

I used www.mouser.com and www.amazon.com to order my materials for this project. The main parts needed are:
-125 LEDs
-30x 150 Ohm resistors
-5x 3-8 Line Decoders
-5 NPN Transistors

The manufacturer numbers and prices can be found in the attached document though the cost was about $40.

Additional required materials:
-Arduino uno
-Soldering iron
-Solder
-Sturdy wire (for structure of cube)
-Insulated wires
-Breadboard
-sockets (for decoders)
1-40 of 96Next »
Amun_Ra says: May 11, 2013. 2:25 AM
Hi there, I followed your guide as best as I can but am not quite sure how to interpret the connection from the planes (Z0-Z4) in your circuit diagram. Should each plane (Z) be connected BOTH to the arduino via a resistor AND to VCC (the diagram says gound but I read that was an error)? Wouldn't that short-circuit all planes?
icky_unicorn (author) in reply to Amun_RaMay 13, 2013. 3:49 PM
Hi! From the arduino ouputs, the wires for the planes should be connected to a transistor where the emitter connects to the planes and the collector is connected to the VCC. Let me know if that works.
icky_unicorn (author) in reply to icky_unicornMay 13, 2013. 4:00 PM
Though, I'm still pretty sure I connected my collectors to ground.. the connection to the VCC was a correction by someone who made my project, so I'm not totally certain.
SHIFT! says: Jun 30, 2012. 3:39 PM
Hey icky_unicorn, just wanted to say thanks for your truly awesome instructable! Your LED Cube was the first project I ever made with arduino and it came out fantastic! Thank you for sharing!

BTW, slight correction on your circuit diagram. Z0 should actually be connected to the VCC wire. But other than that awesome!
icky_unicorn (author) in reply to SHIFT!May 13, 2013. 3:58 PM
Hi! You made this correction a while ago, and I am getting a lot of questions about how the planes should be connected to transistors Ground/VCC. I made this cube a while ago and can't totally remember the set up, but I'm pretty sure I connected I connected the arduino outputs to the transistor with the emitter connected to the planes, and the collector connected to ground. You thought the collector should be connected to VCC?
cyclone731 in reply to SHIFT!Aug 16, 2012. 3:48 PM
Could you explain what you meant here with connecting Z0 to VCC. I think i might be missing something but if you connect Z0 to vcc you will no longer have a lead going to that ground plane and nothing lights up on that one. I tried several other configurations with vcc on the collector instead of ground but that realy didn't make much sense to me when i thought about it. Im having issues with not all of the pattern showing up, but as far as i can tell it is displaying the pattern correctly. i'm suspecting it might be the transistors
shanerm in reply to SHIFT!Aug 7, 2012. 5:48 AM
It chould be connected to the VCC wire instead of analog outbut 7? Or both? Sorry, I'm just learning all of this Arduino stuff, it's so cool though!

Thanks,
Shane
shanerm in reply to shanermAug 7, 2012. 8:09 PM
*Could it

icky_unicorn (author) in reply to SHIFT!Jun 30, 2012. 4:08 PM
Thanks! I'll make a note of that error. :)
rsaceanu says: May 7, 2013. 8:52 AM
what value have the transistors?
icky_unicorn (author) in reply to rsaceanuMay 7, 2013. 10:47 AM
I used the following transistors:

Mouser #: 863-2N4401G
Mfr. #: 2N4401G
Manufacturer: ON Semiconductor
Desc.: Transistors Bipolar (BJT) 600mA 60V NPN
RoHS: RoHS Compliant
Edmoon says: May 6, 2013. 8:49 AM
Hello I have a problem with the link that has .docx at the end so could you please send me the code?
Email: mondchung@gmail.com
Ravboy82 says: Apr 21, 2013. 8:10 PM
Can any one please tell me where the pin 12 from the arduino go to!!!!!
mng8 says: Apr 11, 2013. 3:16 AM
The project is awesome, i would like to do one myself too, could you please send me the code? my email is melvinngjl@gmail.com .
KRITIKA15 says: Apr 10, 2013. 10:09 AM
the project is awsome . but plez send me the code at my id. Its kritika.porwal@yahoo.com
betonano says: Apr 10, 2013. 8:12 AM
Thanks, it's an excellent project
betonano says: Apr 9, 2013. 11:30 AM
Hi, I have problems with programming, you could send an email with your code please
icky_unicorn (author) in reply to betonanoApr 9, 2013. 12:07 PM
Sure, just message me your email and I will attach the new document
betonano says: Apr 9, 2013. 11:32 AM
Hi I have problems with programming, you could send an email with your code please
humberto_nano4@hotmail.com
Ravboy82 says: Apr 3, 2013. 3:26 PM
Hello
I really like how you made this project.This is going to be my first big electronic project.
Could you please send me the parts list needed and the codes please!
sulemankhan1996@hotmail.com
Thank you!
chamaran8 says: Mar 31, 2013. 8:38 AM
Can you please send me the code?>_< thank you for being done it for me.... chamaran8@gmail.com
emmabellep says: Mar 27, 2013. 9:10 AM
Can you please send me the code? patmore1eb@alma.edu
zap56 says: Mar 25, 2013. 5:38 AM
Hey. can you send me the code too please? zap56@luukku.com
jonniebgood says: Mar 17, 2013. 8:53 AM
Mar 17, 2013. 8:50 AMReply
Hi, I have got so far with your 5x5x5 cube and now need the coding please. Will it be possible to e-mail me the coding details .
Kind Regards
John
icky_unicorn (author) in reply to jonniebgoodMar 17, 2013. 11:21 AM
Sure. Message me your email.
cmcnabb2 says: Mar 9, 2013. 8:33 AM
i need help with y7 output on first 3 decoders its not working right i have checked all conections and noticed it not putting ou the correct voltage directly from that pin
icky_unicorn (author) in reply to cmcnabb2Mar 10, 2013. 2:16 PM
what do you have it connected to? have you checked that the decoder works otherwise?
neo3587 says: Mar 9, 2013. 8:18 AM
digitalWrite(); is a really bad instruction, better use:

void setup () {
DDRD = 0xFF;
DDRB = 0x3F;
DDRC = 0x3F;
}
void loop () {

PORTD = 0b00000011;
}
/* PORTD = pins 0 to 7, now for example I'm activating pin 0 and pin 1 to HIGH.
PORTB = pins 8 to 13
PORTC = pins A0 to A5 (yes, analogic input pins)

those instructions are ~10 times faster, and spends less memory, also you can actívate multiple pins at the same time and not 1 by 1.
*/
Geekaton says: Mar 7, 2013. 10:43 AM
hi
i am 15 and have made my own LED cube, heres a video of how I made it: http://www.youtube.com/watch?v=gTZJOy70rrc&list=LL7RW6Py5QalcKDnSCnX9_Dw
let me know if its helpful!
juliusli says: Mar 6, 2013. 11:13 PM
because some led are dark,
also,how to switch on 125 leds at same time ?
the truth table only show each 1 output = =
icky_unicorn (author) in reply to juliusliMar 7, 2013. 9:25 AM
have I sent you my code? that shows how to light up every LED as well as multiple LEDs at a time. if I haven't sent it to you, send me your email
juliusli says: Mar 6, 2013. 10:03 AM
hi, i want to know how to brighten up all leds
icky_unicorn (author) in reply to juliusliMar 6, 2013. 10:12 AM
I think if you increased the voltage it would brighten the LEDs but you would have to be careful not to blow out the resistors.
MozeAngel says: Feb 28, 2013. 1:21 PM
It works only when is connected to pc?, can I somehow put programm in and use without PC?
icky_unicorn (author) in reply to MozeAngelFeb 28, 2013. 2:28 PM
Hey. I'm pretty sure that if you save the program to the arduino (while it's plugged into the computer) and then attach the arduino to an external power source, it should run.
santosjl says: Jan 30, 2013. 3:02 PM
can you send me the code too please? santosJL87@gmail.com
My 3month old son was hypnotized watching your video so i thought it would be fun, for him and me, if i can pull it off. thanks so much!
juliusli says: Jan 29, 2013. 12:29 AM
would u plz send me the code ?
starlai@live.hk
karthiksagar says: Jan 26, 2013. 8:51 PM
please mail the ckt to my mail id karthiksagar9999@gmail.com
juliusli says: Jan 26, 2013. 12:28 PM
so, Z0 to Z4 should connect to earch plane of (-)
i have 74hc238B1 Decoders ONLY, is it work ?
sorry,i am junior ,
icky_unicorn (author) in reply to juliusliJan 26, 2013. 2:39 PM
Correct. Z0-4 connect to the planes not the columns. Then the other arduino outputs > decoders > 25 columns
1-40 of 96Next »
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!