Summary of 5×5 LED Cube using Arduino Uno
This article details a 2-week undergraduate project to build a 5x5 LED cube using an Arduino Uno. The builder constructed five layers by soldering LEDs in styrofoam, connecting cathodes horizontally and anodes vertically with insulated wires. Control is managed via five 3-8 line decoders and NPN transistors, wired to the Arduino for layer selection and column activation. The project required careful soldering and specific resistor values to prevent short circuits.
Parts used in the 5x5 LED Cube:
- 125 LEDs
- 30x 150 Ohm resistors
- 5x 3-8 Line Decoders
- 5 NPN Transistors
- Arduino uno
- Soldering iron
- Solder
- Sturdy wire
- Insulated wires
- Breadboard
- Sockets
This is a step by step explanation of how to build a 5×5 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
Step 1: Supplies
-125 LEDs
-30x 150 Ohm resistors
-5x 3-8 Line Decoders
-5 NPN TransistorsThe 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)
Step 2: Cube Construction
Unfortunately, I have not perfected the construction of the cube. I found this portion of the project both frustrating and painful (hot wires!).
I began by assembling the 5 layers or planes of the cube. This involved connecting all the cathodes of the LEDs together. Id did this by poking 25 LEDs (about 1 inch apart) into a piece of styrofoam. I bent all the anodes out of the way and soldered the LEDs in 5 columns and then two rows on the end (see picture). Be careful when soldering because the entire wire becomes hot and I accidently burned myself multiple times by touching the end of one of the wires.
The next step in cube construction is even trickier. You need to connect the anodes of the LEDs in 25 vertical columns without letting any of them (or their connecting wire) touch the cathode planes. The way I did this was leaving the top plane in the styrofoam and placing ~6 inch wires next to the anodes. I used needlenose pliers to curl the anodes into loops so that it was easier to solder. Alternate the directionality of the wires of the cathode planes for stability. See photos.
Step 3: Wiring and Breadboard
See attached pdf for a circuit diagram. 3-8 decoders labeled A-E. But a brief overview…
1) Solder sockets into board (w/o decoders in)
2) Wire in series with socket pins according to 3-8 decoders as follows (seehttp://www.alldatasheet.com/datasheet-pdf/pdf/15570/PHILIPS/74HC238N.html? for data sheet for further information)
Note: Error in circuit diagram. Z0 should actually be connected to the VCC wire.
“A”-“C” 3-8 decoders
-connect A0 together and to digital output 4 on arduino
-connect A1 together and to digital output 3 on arduino
-connect A2 together and to digital output 2 on arduino
-connect g to ground on arduino
-connect Vcc to 5V on arduino
-connect Y0-Y7 of “A” to COL1-COL8 (with 150 ohm resistor between)
-connect Y0-Y7 of “B” to COL9-COL16 (with 150 ohm resistor between)
-connect Y0-Y7 of “C” to COL17-COL24 (with 150 ohm resistor between)
-30x 150 Ohm resistors
-5x 3-8 Line Decoders
-5 NPN Transistors
-Arduino uno
-Soldering iron
For more detail: 5×5 LED Cube using Arduino Uno
- How long did it take to complete this project?
The project took about 2 weeks to complete. - Where can I order materials for this project?
You can order materials from www.mouser.com and www.amazon.com. - What is the cost of the main components?
The cost was about $40. - How are the cathodes connected in the cube construction?
All cathodes of the LEDs are connected together in each layer or plane. - How are the anodes connected in the cube construction?
Anodes are connected in 25 vertical columns without touching the cathode planes. - Which digital outputs on the Arduino connect to the decoder A pins?
A0 connects to digital output 4, A1 to output 3, and A2 to output 2. - What correction is needed for the circuit diagram regarding Z0?
Z0 should actually be connected to the VCC wire instead of its original placement. - What tool was used to curl the anodes into loops?
Needlenose pliers were used to curl the anodes into loops for easier soldering.