My 2x2x2 LED Cube |
The LED Cube is a project that I always see on the Internet, so I decided to build my own one night. I only had enough LED's for a 2x2x2 version, so that's what I went with.
Above you can see a video of the LED Cube. Click the jump below for more details about the build process and how it works.
The first video I came across of a 2x2x2 LED Cube happened to be this one: video. I wasn't exactly sure how to solder the LED's together, so I followed the tutorial found here: tutorial. The tutorial is for a 3x3x3 LED Cube, but the concepts work for what I was trying to do. I learned to solder the cathodes of one layer together, while soldering the anodes of each column together.
Jig for the LED's |
The layers of the cube |
Soldering the anodes together |
First test of the LED Cube |
Schematic found here: link |
For the code, I used the one posted by the creator of the original video that I saw, found on the Arduino forums. The cube works through multiplexing. To light up any single LED, a LOW signal must be sent to the ground layer that the LED is on, while a HIGH signal must be sent to the anode column. By multiplexing, only six input pins on the Arduino are needed: 4 connected to the anode legs of the LED's, and 2 connected to each layer's ground. While this only saves 2 pins (6 pins instead of 8 if you were to use a pin for each individual LED), it has the potential to save many more pins on larger LED Cubes.
With all this being said, I had to make some adjustments to the code posted on the Arduino forums. The code was written for an LED cube that had anodes soldered together in one layer and cathodes soldered in columns, so I had to reverse every instance in which the ground pin was written.
digitalwrite(groundpins[i], HIGH); digitalwrite(groundpins[i], LOW); //the first line became the second and vice versa
And that's my LED cube. Thanks for reading my post!
Thanks so Much!!!!!
ReplyDeletecan you show the full program you used for your LED cube?
ReplyDeletePlease send full code to samaratsn1@gmail.com
ReplyDelete