Asher Glick’s Charlie Cube

2013-12-23 14.07.29

Charlie cube in its acrylic (Softball Display) box

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 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.

2013-12-16 13.30.40        2013-12-17 16.08.30          2013-12-20 12.42.18

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… have something like this:

2013-12-20 14.28.36

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:

2013-12-17 19.07.54

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.

2013-12-22 09.42.18 

   2013-12-22 10.06.24     2013-12-22 10.36.21

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: 

2013-12-23 11.17.37

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):

10 comments on “Asher Glick’s Charlie Cube
  1. Goldfish says:

    Love the idea of a using your cube as a clock – just cant figure out how you set the correct time, unless you switch the cube on at the specific time that your code starts counting from!! I will have a try to implement a similar clock with a date function on my cube.

  2. mantaray says:

    Hey there, real nice project you got going. I really like that you are making the spires a bit like pyramids. Anyways, I’m also building the charlie cube, and was wondering if you’d like to share your sketch for testing each spire? Thanks

    • sgyoshida says:

      Here’s the sketch I used:

      //CharlieCube Spire Test Program

      #define PIN_A 3
      #define PIN_B 4
      #define PIN_C 5
      #define PIN_D 6
      int delayTime = 400;

      void setup()
      // first set all pins to input, or high impedance
      // (not strictly necessary as all pins are inputs by default)
      pinMode(PIN_A, INPUT);
      pinMode(PIN_B, INPUT);
      pinMode(PIN_C, INPUT);
      pinMode(PIN_C, INPUT);

      void loop()
      // run through a sample loop, lighting each LED

      // in turn and holding for half a second.
      set_pins(PIN_A, PIN_B);

      set_pins(PIN_A, PIN_C);

      set_pins(PIN_A, PIN_D);

      set_pins(PIN_B, PIN_C);

      set_pins(PIN_B, PIN_D);

      set_pins(PIN_B, PIN_A);

      set_pins(PIN_C, PIN_D);

      set_pins(PIN_C, PIN_A);

      set_pins(PIN_C, PIN_B);

      set_pins(PIN_D, PIN_A);

      set_pins(PIN_D, PIN_B);

      set_pins(PIN_D, PIN_C);


      void set_pins(int low_pin, int high_pin)
      // reset all the pins

      // set the high and low pins to output
      pinMode(high_pin, OUTPUT);
      pinMode(low_pin, OUTPUT);

      // set high pin to logic high, low to logic low
      digitalWrite(high_pin, HIGH);

      void reset_pins()
      // start by ensuring all pins are at input and low
      pinMode(PIN_A, INPUT);
      pinMode(PIN_B, INPUT);
      pinMode(PIN_C, INPUT);
      pinMode(PIN_D, INPUT);

      digitalWrite(PIN_A, LOW);
      digitalWrite(PIN_B, LOW);
      digitalWrite(PIN_C, LOW);
      digitalWrite(PIN_D, LOW);

  3. sgyoshida says:

    I don’t know if I still have the jig. It has been a while since I made the cube and the perf board that I used for the jig may have been re-purposed already. If it is still around I’ll put up some more pictures. The jig base board is just a piece of perforated PCB board that I had laying around. The little square chips that I used to make alignment features was also made from perforated PCB chopped up into some squares that were the same length as the spacing I wanted between the layers less the size of the LED wire. I put some double sided tape on the backside of the PCB squares so I could position the squares and just stick them into place. I had to draw out the placement locations on the main PCB before hand so everything would line up correctly. You have to reference the holes on the base PCB (where one of the LED lead pass through) so the other LED leads are held in place at the correct location. You have to place the chips on either side of the LEDs so that there is a small space between them that will create a groove for the LED leads to rest.

    When soldering a set together I would hold the leads and welding wire down with a bit of Kapton tape (heat resistant tape so soldering iron wouldn’t melt it) – regular tape might work too though.

Leave a Reply to mantaray Cancel reply

Your email address will not be published. Required fields are marked *


* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Hit Counter provided by orange county property management