• Halfway Through

    de∫hipu10/08/2015 at 19:54 0 comments

    For now I paused the experiment with a disco ball, and focused on finishing the cube first. The ordered extra LEDs arrived, and now I'm soldering together the remaining faces of the cube. I already have three:

    Through trial and error I determined two important tricks to doing that easily. One is to use a piece of adhesive tape to keep the LEDs together while you are soldering them. The other is to use a good quality wire. I makes all the difference, really.

    I also tested the GPS module, and it seems to be working well. I'm still waiting for the digital compass to arrive, and then I can start working on the insides of the cube.

  • Disco Ball

    de∫hipu09/15/2015 at 16:49 6 comments

    @zakqwy and @davedarko suggested in the comments that I should try making a ball, since hand-soldering the LEDs allows a nice curvature. I decided to try that using my favorite prototyping material -- two-sided adhesive tape. Here's the result:

    The packing is not as tight as I expected, especially near the pole, but it seems that I would need about 40 LEDs for the whole ball. I would also want to fit battery and an ESP8266 indside, to control the LEDs. Ideally, I would also fit some kind of IMU in there, so that I could display consistent image no matter how the ball is rotated, but at that point I would probably need a custom PCB for it all.


    I tried two other ways of tiling the sphere with the LEDs. I think the one with the cross on the pole looks the most promising. Next step is planning the connections, I guess.

  • Pretty Pictures

    de∫hipu09/15/2015 at 13:34 0 comments

    Once you have the display, you want to display something on it. The only problem is that the direction of rows changes every other row. But there is a simple formula for calculating the address of a pixel given its x and y coordinates. The code below uses the Adafruit NeoPixel library to display a simple paletted image:

    #include <Adafruit_NeoPixel.h>
    Adafruit_NeoPixel strip = Adafruit_NeoPixel(25, 2, NEO_GRB + NEO_KHZ800);
    const unsigned char image[5][5] = {
        {3, 7, 5, 7, 0},
        {7, 2, 7, 2, 7},
        {7, 2, 2, 2, 7},
        {4, 7, 2, 7, 1},
        {6, 5, 2, 0, 3},
    const uint32_t colors[] = {
    void setup() {
        for (int y = 0; y < 5; ++y) {
            for (int x = 0; x < 5; ++x) {
                int address = 5 * y + (y % 2) * x + (1 - y % 2) * (4 - x);
                strip.setPixelColor(address, colors[image[y][x]]);
    void loop() {
    Of course you can display pretty much anything, and then animate it, etc.

  • Crosshatch Pattern

    de∫hipu09/15/2015 at 11:54 0 comments

    This pattern is pretty nice, because it minimizes the distances between the pixels (they can basically touch sides) and, with odd number of rows and columns, put the signals in the same places as with a single pixel.

    Let's start with a single pixel, a 1×1 matrix, so to speak:

    The marked corner is where the ground pin is. Now, if you were to add more pixels like that, you would need a trace with VCC and another with GND going in parallel to get power to all of the pixels. And when you add another row, the traces simply have to cross somewhere. That's not good. But let's try to rotate the pixels so that the ground pins are all together for four of them, and the same for power. Here's a 3×3 matrix:

    Now you only need to provide power to those islands of four pins. The signals stay where they were. It's still a little hard to see the pattern, so let's look at a 5×5 matrix:

    Now you can see the pattern. The power is provided by two sets of "combs" that nicely fit into each other. The addresses go in a sort of S pattern, pretty much how you read Egyptian hieroglyphs:


    Since those matrices have the same pinout as individual pixels, you can repeat the trick with whole matrices, for instance, when you are making a cube out of them.

    Finally, if you don't want to make a PCB, or you want to connect the pixels with flexible wires, you can just solder them directly: