(Also lomonster.com and clomont.com)

Chris Lomont's LED Cube Page Part 1



The 3D LED Cube

July 30, 2005. Gene and I started construction on a 3D LED Cube. We built a 4x4x4 bicolor prototype over the weekend to help us decide on LED colors, programming interface, etc. Our final cube(s) will be at least 8x8x8, and we contemplate up to 13x13x13 = 2197 LEDs, which would be a tad expensive, not to mention the horrible mess of wiring we'd have to do. For those of you who are impatient, here is the final video (18MB avi) of the weekend results. Sweet....


Day One - Saturday Jul 30, 2005


After our initial package arrives from Digikey with some parts, we begin. Gene makes a template to hold LEDs as he solders them together:


LED template



Gene soldering:


Gene soldering



We built a PIC programmer to program out Microchip PIC 18F4620. It has 64K or program ROM, 4K of RAM, and runs at 40 MHZ (although we’ll probably only use 32 MHZ - max internal clock). We added one LED to test output. It was difficult to find a nice, cheap programmer circuit, but we found one.


PIC programmer



I wrote come code to test the programmer and PIC. The Microchip C compiler was very flaky, so I had to resort to a bit of inline assembly. This is my first PIC program, but it was not hard to pick up.


First working programFirst program



And viola - we made a blinking light.





Then we added LEDs to test an entire 8-bit port, by using 4 2 color LEDs. Soon I had a bouncing light created by pusle modulating the LEDs to get varying brightness in red, green, and red+green. This was done to test our programming and circuitry for the programmer. Here is a video (3.9 MB avi) of this in action.


More blinking lights



Meanwhile, Gene was soldering LEDs and constructing a clocked timing circuit to run from the PIC. Here is a 4x4 slice for our prototype:


A LED grid



Several slices:


More LED grids



2 views of the 4x4x4 LED cube:


The LED Cube

LED Cube view two


On Day One, Gene finished the cube and a timing circuit that will control it from the PIC. I get the programming under control, but there is still a lot of flakiness in the C compiler. The PIC is running at 1 MHZ instead of the 32MHZ we’ll test tomorrow.


Day Two - Sunday Jul 31, 2005

As Gene makes a plug to hook the 4x4x4 cube to the PIC programmer, I worked on getting the C compiler smoothed out. After I enabled the extended instruction set on the chip and compiler, things were better, although some code still does not work as it should. But it is much better.


And I am now running at 32 MHZ.


After hooking the 4x4x4 cube to the PIC, it was time for a lot more programming. Since the final cube will have > 500 LEDs, we cannot hook a PIC output to each LED. We wire them in a clever matrix to maximize the LED on time, and have the complexity of coloring and modulating them done in software. The final design will have an interrupt driven animated display, and I have some ideas for creating lots more colors than the 4 gotten by on/off of the red/green LEDs. I’ll do it later. See this video (7.8 MB avi) to see the hardwired cube in action before we added it to the programmable PIC.


More complex programming



We finally got some blinking lights. Here is an initial video (7.3 MB avi) before more complex programming was completed.


The cube in action



However there was a timing bug in the circuit (on power up, the chips controlling the LEDs are in seemingly random states). After adding a new control line to the PIC we were able to programatically fix the initialization settings. It seems our prototype works, and now we will experiment with code to see what we can learn before making buying decisions for the larger cube.


The final result of this weekends work is in this video (18MB avi).


See also: MainPage, Part II, Part III, Part IV, Videos