3x3x3 LED Cube
I have always liked LED cubes and everything you can make them do. So this year, I decided to make my own. It was a 3x3x3 led cube and was powered by esp32 which was a mistake, because it takes a long time to upload the code to it, so I decided to make this one and post it on Instructables. This one is powered by Arduino Nano and is also a 3x3x3 led cube and I am glad that I can share it with you.
Supplies
Here is a list of the parts you will need to make this project.
- 5mm LEDS (any color) 27x
- NPN Transistor (I used BC549) 3x
- 220 Ohm Resistor 12x
- Arduino Nano 1x
- 5 Cm X 7 Cm PCB board 1x
- 22 - 28 AWG Multi Core wire
- 22 - 28 AWG Single Core Wire
Tools Required:
- Wire Cutters
- Wire Strippers
- Soldering Iron
Software Required:
- Arduino IDE
- Cura (or some other 3D printing software)
Print the Template
Before we make the layers you will have to print a template to hold the LED's. Below is the STl file and the print settings I used.
- Bed Temp: 60
- Extruder Temp: 200
- Filament Type: PLA+
- Buildplate Adhesion: Skirt
- Support: None
- Infill: 12%
You might have to make the holes a bit bigger after you print the template.
Downloads
Make the Layers Part 1
In this step, we will make the layers for the LED cube.
First, get the template that you just printed and put the LEDs in it as shown (fig 2). Make sure that the LEDs are rotated 45 degrees(fig 3).
After you get the LEDs in place, bend the cathodes (the negative wires) down on each other (fig 4) and do that for each column(fig 5). Then solder the cathodes together so there are three rows of three (fig 6).
Now we will connect the columns by cutting three pieces of wire as wide as the layer (fig 7) and soldering then onto the the layer (fig 8).
Then you can take the layer out of the template (fig 8) and test all the LEDs (fig 9).
Now you just have to make two more layers flowing the same steps (fig 10).
Make the Layers Part 2
Now, we will bend the anode (positive) pins of the LEDs away from the cathode pins (fig 1) and cut them off about a millimeter from the bend (fig 2). Then do that for the other two layers (fig 3).
Make the Cube
Now we will start making the cube.
First, get the cut nine pieces of wire about one and 1/2 inches long (fig 1) and solder them onto the PCB, spacing them four holes apart (fig 3). Then get the layers (fig 4) and solder one of them on the PCB and the wires (fig 5), (fig 6).
Then do the same thing for the second and third layers, soldering them onto the wires (fig 7 - 10).
Add the Resistors
Now, we will solder the resistors onto the PCB.
First get nine resistors (fig 1) and bend down the leads (fig 2). Then put the resistors on the PCB (fig 3) and solder them down (fig 4) (I used tape to hold the resistors down while I soldered them down). Finally, cut the leads off (fig 5).
Wiring the Resistors to the LEDs
Now we will attach the resistors onto the LED cube columns.
First cut three lengths of wire (fig 2), and solder the resistors to the columns. For your convenience I have numbered the resistors and the columns in (fig 3) and I have added a chart below that tells you which columns to solder the resistors to.
R1 - C1
R2 - C2
R3 - C3
R4 - C4
R5 - C5
R6 - C6
R7 - C7
R8 - C8
R9 - C9
Add the Layer Switches Part 1
Now, we will add the transistors that will control what layers are on.
First get the transistors (fig 1) and solder them by the LED cube making sure that they are each spaced one hole apart.(fig 2) (fig 3), and cut the leads off (fig 4).
Then get the resistors (fig 5) and bend the leads as shown in (fig 6) and solder them by the transistors as shown in (fig 7). After that, solder one of the leads on each resistor to the base pins of the transistors (fig 10).
Add the Layer Switches Part 2
Now, we will finish making the transistor switches that will control what layers are on.
First, get three pieces of wire and bend it as shown (fig 1). Then, solder each one onto a different layer, the tall one onto the top layer, the medium one onto the middle layer, and the short one onto the bottom layer (fig 2) (fig 3).
Then, cut three pieces of wire (fig 5), and solder them onto each layer wire, then solder the other end onto the emitter pins of the transistors (fig 6).
Finally, cut two pieces of wire (fig 7), and solder the collector pins of the transistors together (fig 8).
Add the Arduino
Now, we will solder the Arduino Nano onto the PCB.
First, get the Arduino Nano (fig 1), and place it on the PCB (fig 2).
Then, solder all the leads to the PCB (fig 3), and cut them off (fig 4).
Wire the Arduino
Now, we will attach the resistors and the layer switches to the Arduino Nano.
First, cut three pieces of wire (fig 1) and solder them as noted (fig 2)
Layer 1 (bottom layer) - D11
Layer 2 (middle layer) - D12
Layer 3 (top layer) - D13
Then, cut one piece of wire (fig 3) and use it to connect the collector pins that you soldered together to one of the ground pins of the Arduino Nano.
Next, we will solder the pins of the LED cube to the Arduino Nano.
First, cut nine pieces of wire approximately two inches long (fig 5). The solder them as noted.
R1 - D2
R2 - D3
R3 - D4
R4 - D5
R5 - D6
R6 - D7
R7 - D8
R8 - D9
R9 - D10
After that you are finished with the wiring and you can upload the code now.
Adding the Base
Now, we will print the base of the LED cube. Below is STL file and the print settings I used.
- Bed Temp: 60
- Extruder Temp: 200
- Filament Type: PLA+
- Buildplate Adhesion: Skirt
- Support: Yes
- Infill: 12%
After you print the base, place the LED cube on top of the notches at the corners of the base and glue it on.
Downloads
The Code
Now, we will upload the code to the Arduino Nano.
I have included 3 different patterns in the code, but fell free to change it as much as you want. And if you want to, you can post another code for the LED cube in the comments and I will add it to this instructable.
Downloads
Done!
Now, you are finally done with the LED cube. I hope that this tutorial was helpful to you, and if you have any questions or tips, please leave them in the comments.