Surfing the web one day, I came upon some YouTube videos showing some cool LED cube displays that people have made. An LED cube is a kind of 3D display matrix that is constructed with the same wires that drive the LEDs. I figured with a week or so of soldering I could put together a small 4x4x4 LED cube without too much trouble. Doing a little more research I came across the Charlie Cube design by Asher Glick.
The Asher Glick Charlie cube takes advantage of a LED driving scheme called Charlieplexing. A good explanation of Charlieplexing can be found here on Wikipedia. There were other Charlieplexed LED cube designs on the web but all of the designs I could find used LEDs of a single color. Also, the aglick.com Charlie cube site had very detailed build instructions and Arduino libraies that were well documented. The big appeal to me in this design is that I would only need a single Arduino board to drive the whole thing. The only essential component that I didn’t have on hand was the 64 red/green/blue LEDs. Doing a quick search on E-bay I found this listing for 100 common cathode RGB LEDs for $11.88 U.S..
Unlike other LED cubes the AG Charlie cube is made up of 16 four LED spires. I had to wait a couple of weeks for the LEDs to arrive from China which gave me some time to think about how I was going to construct the little spires that make up the cube. Looking at some of the other AG Charlie cubes people had built, it seemed that the biggest difficulty was in building the little spires straight enough that, when completely assembled, the LEDs lay in a symmetric cube-like matrix.
First, I decided to build my spires as little four sided pyramids with a bit of taper to give them a little more stiffness when assembled. Second, I was going to have to make up some kind of jig to hold the LEDs in place while they were being soldered. Third, I would have to find a wire stiff enough that it wouldn’t be easily kinked (bent) during the assembly process.
Here’s the jig I put together with some cut up prototype PCB and double sided tape.
The wire I decided to use was 0.035″ steel gas welding filler rod. Normally a steel wire would be kind of difficult to solder but the type of welding rod I used has a copper jacket that turns out to be pretty easy to solder. When building up a spire on the jig, I would solder four of the LEDs together with a single wire then flip the assmbly 180 degrees and solder the opposite side. After two sides of the spire were soldered the third and fourth legs could be soldered on using a flat template with lines showing where the wires should intersect. While soldering the pieces together I also would use some tape to hold things in place while soldering.
64 LEDs later…..you have something like this:
The above picture was taken while my spires were drying after being sprayed with flux remover.
To make sure all the individual colors on each LED were operational I cobbled together a quick and dirty test jig to test each assembled spire:
The test jig is just a piece of prototype board with a Boarduino socket connecting 4 digital IO to four of the board doughnut holes. The wires connecting the IO to the holes are actually only soldered to the edge of the doughnut hole so that the hole remains open. The holes are plated thorough so there is a conductive surface that the spire legs can make a ‘good enough’ for testing electrical connection. The sketch I used for testing just cycled through the combinations of source/sink pairs required to get all 3 LED colors on the four LEDs to light up for a second.
I designed the spires to have a spacing of 0.8″. The prototyping board I was using had a 0.1″ pitch so spacing the spires out on the PCB side of the cube was easy. When placed into the holes of the PCB, the legs of the spires had enough tension on the sides of the holes that they would support the PCB without assistance. To hold the free side of the spires while I was soldering the legs to the PCB I made a jig out of a scrap piece of ply wood. I have a small CNC mill so drilling out the jig was a snap.
The Arudino board I used was a 5V 16Mhz ProMini knock off from China. You can see the Arduino along with the messy IO connections below:
In the process of putting together my Charlie cube I decided to add a clock function. Since the A4 and A5 ports on the Arduino were still available it wouldn’t be too hard to add a real time clock using I2C. Unfortunately, I couldn’t get I2C to work with the AG Charlie cube libraries. Instead I decided to add a simple battery backup and use the arduino time library to display the time. If you look closely at the picture above I still have the wires attached to the A4 and A5 pins on the Pro Mini.
In the picture above the long white package is the coin cell backup battery. The four coin cell pack in the picture is the first battery pack attempted to use.. The pack is made up of NiMh coin cells that I found at a surplus store. I just wired the battery pack in parallel with the 5V supply to the Arduino. The idea behind charging the cells being that when the voltage in the battery is lower than the 5V supply the voltage difference will drive a current to charge the battery only limited by the internal resistance of the battery. As the battery charges and the cells gets close to 5V, the charge current will slowly drop to 0. When the AC power adapter is removed from the wall socket the arduino runs on the pack until the voltage drops to an unuseable level. Turns out that with 4 coin cells the battery pack would not store much of a charge as the nominal voltage on the cell stack being 4.8 V was a little too close to the 5V supply. I removed one of the cells hoping that the current through the cells wouldn’t be too high when fully charged. With three cells the battery has enough power to run the cube for a minute or so. Exactly how low the voltage gets on the backup cell before the Arduino quits I haven’t measured.
The script that I wrote to display the time shows the time in a marquee type format on the outer wall of the cube. Hours are shown in red , blue shows tens of minutes, and green shows single minutes. Displaying the time information this way I can display a 12 hour format using just two faces of the cube. I also include a bit of a pause when the displayed time is showing on two complete faces to make it easier to read. If enough people find this interesting I’ll post the code.
This is what the clock function looks like when it’s running (in the video the time display switches from 9:00 to 9:01):