In the first post I said that building small LED cubes is reasonable easy. Without much prior experience we (my girlfriend and myself) built this small 2x2x2 cube. Its really tiny and the soldering is sloppy but it worked. Unfortunately I can’t find the board that belonged to the cube so I there is only a picture of the cube itself.

Although this doesn’t look spectacular it shows a common principle for LED cubes. The one thing to notice is the number of wires visible. In this picture there are 6 pins / connections visible. If each of the 8 LEDs would be connected individually there would be 16 connections necessary to power the cube. Instead the LEDs are connected vertically by their anode (+) and horizontally by their cathode (-), forming two layers with 4 LEDs each. Now to power up a single LED the corresponding layer and the corresponding column need to be connected. If both layers are connected and one column than both LEDs of that column would light up. The principle behind all this is called multiplexing. This means that only one layer of LEDs is active at a given moment. So for a given picture each layer is activated after another in such a fast way that thanks to persistence of vision, the human eye does see the complete picture, without noticing that is composed of multiple steps. Does that make any sense? I should probably add a video or animated gif.

For smaller cubes its also not important whether the LED layers are connected via the cathode or anode. For bigger cubes its important but I’ll get to that later. Multiplexing in general has two major benefits. First of all it allows to control many LEDs with fewer IO ports / pins and therefor saves wirings and possible errors and secondly it simplifies the power supply as only one layer is active at a time. This is especially important for bigger cubes. Think about 16x16x16 * 20mA compared to 16×16 * 20mA – quite a difference.

We connected this cube directly to the Arduino and wrote a really simple program that included a few animations. With only 8 LEDs there is not much to do but still its fun to exploit all possibilities. I found one code example for this code on one of my disks that can be found here: https://github.com/hukl/Cubino/tree/master/2x2x2/

Its as spectacular as the 2x2x2 cube itself.

2 Responses to 2x2x2

  1. I just built one myself, but I don’t have a breadboard yet, so I could only connect half the cube. BUT anyway, this is SO much fun, thank you for that great project and bringing me into electronics. You explain it very understandable!
    If anyone cares: You can checkout my poor cube at YouTube!

    • Hey,

      that’s awesome! Seriously – its great that you got started and even built your first cube. I will continue to post about electronics shortly.

Leave a Reply

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