5×5 LED Cube using Arduino Uno

LED Cube

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.LED Cube

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:

And here’s another:

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 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
-Sturdy wire (for structure of cube)
-Insulated wires
-sockets (for decoders)

LED Cube Supplies.docx37 KB

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.LED Cube construction

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


Read more: 5×5 LED Cube using Arduino Uno

Leave a Comment

Your email address will not be published. Required fields are marked *