The cube

Five hundred and twelve LEDs!

Since 6.111 is a digital electronics class, we were only given marks for the controller; however, it would have been much less fun if we didn't have a physical cube to control! We decided on an 8x8x8 display both for reasons of binary niceness (8 = 23) and because a 10x10x10 cube (our original plan) would have used 1000 LEDs, almost twice the number an 8x8x8 cube would need (512), for only a 2-voxel increase in linear resolution.

For practical reasons it was not possible to control every LED in the cube independently, so we decided to use a passive matrix arrangement, splitting the cube into effectively a 64x8 2D display that had been folded: within each horizontal layer all the LEDs' cathodes are connected, and within each vertical column the LEDs' positive leads are connected. See the diagram below, which shows the way the wiring works for a 3x3x3 cube:

LED wiring

This arrangement makes it possible to activate an arbitrary pattern of LEDs within a single plane (by driving the columns appropriately for the pattern, driving one plane negative and all the rest positive) or within a column (by driving the planes appropriately, driving a single column positive and the rest negative).

To simulate individual control of every LED, the controller must scan through each layer in turn, 'activating' it for only 1 millisecond (during which the columns are driven appropriately for that 'slice' of the image) before moving on to the next one. Since there are 8 layers, the whole cube refreshes at 125Hz which is well above the persistence of vision threshold (about 50Hz); however, since an LED that is 'on' is actually only on for 1ms and off for 7ms the LEDs look quite dim and the cube must be viewed in a darkened room. For this reason we used ultra-bright 8000 millicandela 5mm diameter LEDs from LEDshoppe.

Assembling the lattice

Although very tedious, this took a surprisingly small proportion of the total project effort - about 3 hours folding the legs of the LEDs appropriately, then 10 hours of soldering the cube together. The different stages were as follows:

  1. Fold the legs of all 512 LEDs - looking at the LED from on top, the cathode points straight forward (the blue line in the diagram above) while the anode is folded out to the side for about 5mm and then down (the red lines):
    Step 1
  2. Decide on the grid spacing for the lattice (with the lengths of the wires on our LEDs we could achieve a 15mm centre-to-centre spacing without extending the wires, but in hindsight a wider spacing would have made it easier to see through the cube). Make a jig to hold a plane of LEDs in place while soldering by drilling a grid of 64 appropriately-spaced 5mm holes in a piece of wood.
  3. Lay out the LEDs in the jig, with the end of the cathode of each LED touching the "shoulder" of that of the LED in front. Check while doing this that all the LEDs have been folded correctly and are put in the righ way round, to save troubleshooting time later! To make it easier to solder, you may want to lay out only half of the LEDs at this point:
    Step 3

    Close up of the LEDs in position:
    Step 3a
  4. Solder all the adjacent cathodes.
  5. Lay out the rest of the LEDs and solder their cathodes, if you have not already done so.
  6. At the front of the layer - where the last cathode from each row sticks out with nothing to connect to - bend the wires to the side and solder to the neighbouring row's shoulder. This will leave you a single "spare" cathode, which will be the connection to the driver circuitry:
    Step 6
  7. The layer is now electrically connected, but mechanically it is still very weak. To fix this, put in and solder crosswires (the green lines in the diagram above) linking the rows of LEDs, weaving them over and under the strings. Here the first crosswire has been attached:
    Step 7

    Close up of the crosswire:
    Step 7a
  8. Carefully remove the layer of LEDs from the jig without distorting it. I recommend you test all the LEDs at this point, to check again that they have all been wired in correctly and are functional.
    Step 8
  9. Make and test 7 more layers, to give a total of 8. (By the time you've finished, the powers of 2 up to 512 should be indelible engrained in your brain!)
  10. Now you need to start joining the layers together. Working with the layers upside down (i.e. with the LEDs' wires sticking up in the air), put one layer (layer A, call it) on the table and prop up another (layer B) with spacers so that the LEDs in layer B are directly above the corresponding LEDs in layer A and the column wires from layer A touch those of layer B. Try to get the top layer parallel to the bottom one and at a similar vertical spacing to the horizontal one you chose. The image below shows layer 6 ready to be soldered to layers 8 and 7:
    Step 10
  11. Solder the column wires. This is quite difficult - the best thing is to hook the wires from the lower layer around those of the upper layer and then apply the solder. A picture of the first three layers complete:
    Step 11
  12. I recomment that you take this opportunity to test the column connections you have just made, as when the next layer is added any problems will become impossible to fix unless you have a very unusually-shaped soldering iron! You may also want to attach the new layer's common connection to the sticking-out cathode from before:
    Step 12
  13. Attach the rest of the layers to the growing stack.
  14. Solder a wire to the bottom of each column, and you're done!
    Step 14
  15. You may want to (as we did) make a base for the cube, by drilling a grid of fine holes in a piece of wood and threading the column connectors sticking out of the base of the cube through each one before soldering on the wires.

Driver circuitry

Making the driver circuit boards took another 5 hours or so. They were needed because, while eventually one FPGA pin would control one connection on the cube, the FPGA was unable to supply the required current directly (30mA for each LED - thus 30mA per column or almost 2A if an entire plane were illuminated) so some form of buffer was needed. For the low-current buffers for the column drivers we simply used TTL inverters (7404), while for the plane drivers we used MIC4429 high-current MOSFET drivers. The schematic for each kind of driver was as follows:

schematic

The circuits were initially made on breadboard, and were thus disassembled at the conclusion of the project; however, for the EECS Open House on the 7th April 2006 we rebuilt the boards permanently using prototyping board. You can see pictures of the boards in the image gallery.