With about 2000 LEDs (From Instructables build night), my maker space came up with many great projects. This is one of them with many more yet to come. This is a 4*4*4 LED Cube, there is a lot of these on instructables, but this Instructable uses 10mm LEDs to build it with custom patterns.
What's more I will even show you how to build this with an Atmega 328 IC, if you don't want your arduino to be locked up in a box.
Step 1: Parts
The components for this Instructable is quite simple and easy to find, so like always lets start with collecting the tools and components.
- 64 LEDs
- Atmega 328 IC (Or an arduino)
- 16mhz Crystal
- 2x22pf Capacitor
- L7805 IC
- 2X10uf capacitor
- 9V Battery
- PCB, Wires.... etc
- Hand drill
- 10mm drill bit
- Soldering iron
Step 2: Time to Drill the Wood
Soldering the LEDs without any support is really hard and messy. So lets build us an support, you need to drill 16 holes and the distance between each is determined by the length of the LED terminals. Instrucatbles gave us awesome 10mm LEDs, which is bigger than the average 3mm so make sure you have a right bit.
Once you're done with the drill you will have something that looks like the picture above. Try placing an LED into it to see if it fits. Now you have an easy hold for you to solder the LEDs.
Step 3: Multiplexing
The cube has 64 LEDs and it is not practical to connect one wire to each LED. Even in common catode we still have to connect 65 wires, and a arduino has only 13 digital pins. To overcome this we multiplex the circuit. Multiplexing is connecting all the anodes in a vertical column together. Similarly all the cathode in a row is connected together.
Now if i want to light up the LED in the upper left corner in the back (0,0,3), I just supply GND (-) to the upper layer, and VCC (+) to the column in the left corner.
You can follow this youtube video for a good multiplexing tutorial.
Step 4: Soldering LEDs
Start with placing the LEDs in the holes and see if the terminals reach the next LED. Now you have to start soldering a layer, all the cathodes are connected together in each layer. Be care full while soldering cause soldering the terminals too long will cause the LED to fuse out. Its just the cathodes that you need to solder leave the anodes for later.
Repeat the above steps until you have 4 layers. Once you have completed it check each LED to see if they are working, It would be really hard to change a LED once you have soldered all the layers together.
Step 5: Soldering 2
Once you have got 4 layers and done checking all the LEDs its time to solder all the layers together all the anodes of each layer is connected to the anode of the led at the next layer (see the picture for reference). Do this for all the layers and you will have 16 anodes and 4 cathodes in the end.
Step 6: Box
Once you have done soldering the LEDs into place now its time to find a right box. I found mine at a local hardware store, it is a 6x6 switch box. Once you have your right box its time to start drilling again. Before drilling plot the same measurements as the one with the wood in the beginning, on the lid of the box.
Step 7: Soldering 3
Once the holes are drilled in and the cube is stuck with the lid of the box solder the terminals of the anodes and cathodes. Using different colored wires will help you in tracking the LED.
Step 8: Time to Build an Arduino
If you have an arduino uno and are planning to use that, you can skip this step. If you want to build an arduino follow the proceeding steps. Building an arduino is not as hard as it seems. If your doing this for the first time make sure you follow each and every step.
Step 9: Description
Before we start, I just want to say a few lines about atmega328. Well if you look at online stores for the IC you would probably see that there are two types of it one with boot-loader and the other without. If you spent some few extra dollars and brought the one with the boot-loader, you can skip a few steps in this instructable. If you brought the one without the boot-loader then you need to follow all the steps.
The boot-loader is necessary to write and upload codes from the arduino ide to the IC.
Step 10: Uploading a Bootloader
Here is how you upload a boot-loader to the ATmega IC. You would need an arduino UNO for this step. Follow the circuit as seen above and solder the parts on the pref-board, you don't have to connect the voltage regulators at this stage as the arduino would provide the necessary power.
First lest start with configuring our arduino UNO as ISP, this is done because you want the arduino to upload the sketch to the ATmega IC and not itself. Don't connect the ATmega IC while the below upload is running.
- Plug the arduino to a PC
- Open the arduino IDE
- Open > Examples > ArduinoISP
- Upload sketch
Step 11: Uploading a Bootloader2
With everything connected open the IDE from the folder you just created (the copy).
- Select Arduino328 from Tools > Board
- Select Arduino as ISP from Tools > Programmer
- Select Burn Bootloader
After a Successful burn you would get a "Done burning bootloader".
Step 12: Adding the 5V Regulator
After successfully burning the boot-loader lets complete the arduino. Adding the 5v regulator is an important part of the circuit, for the voltage regulator I used a l7805 IC which is commonly found on the internet. With the printed side of the IC facing you and the legs facing down the one to your extreme left is the input. The one in the center is ground and the one to you extreme right is the output.
Follow the circuit and connect the voltage regulator to the arduino.
Step 13: Soldering for the Last Time
Hope you had a fun time building an arduino. Now time to solder again.
Start soldering all the anodes to the digital pins of arduino move from left to right in order once you have completed connecting the digital pins start with the analog pins. Make sure you have an order or you would have a hard time programming it. Make sure not to plug in the battery when you solder the wires.
Step 14: Switch
Add a switch before the power connection to the arduino, you will need this if you are planning to shut the box at the end and don't want to drain out the battery. This is the simplest step in this Instructable.
Step 15: Code
Time to upload the code if you don't have the arduino IDE download it from their website. You can find the code in the attachments. Upload the code to your arduino. Each LED is represented as a binary number in the code. Each row is represented as B0000. To light up an LED simply rewrite an 0 with a 1 and similarly to light up two LEDs replace two 0 with an 1. After you upload the code turn on the switch and the LEDs light up according to your pattern.
Step 16: Finishing
Once you have completed all the steps it's time to close the box and you should have a working LED cube. If you have any problems you can comment it. And if you made one yourself don't forget to use the "I Made it button" above.
Many more LED projects coming up follow me to stay updated.