Building An Arduino-Powered Infinity Table

  • Posted on: 7 July 2015
  • By: davis

Matt Ibarra and I wanted a fun project. My girlfriend Amanda wanted a table.

Thus, we decided on an Infinity table. We accomplished this project in one night!

We wanted a coffee table to play around with, and the infinity effect seemed pretty cool. We've tried building an LED hoop before, with moderate success. This time, we wouldn't have to deal with the downsides of stuffing LEDs in a hoop.

  • Hoops take a lot of abuse.
  • Not much room to fit components in the hoop.
  • Requires battery power and controller.
  • General pain in the ass to properly balance the weight of the batteries, controller, and LEDs.

I eventually caved and ordered a Hyperion Hoop for Amanda. Leave the hoop-making to the pros, people.

Materials:

The Build:

Matt and I got started by loading the Adafruit Neopixel Library + some test code onto our Arduino. We attached the Arduino to the LED strip and checked that everything worked.

We headed to Home Depot to pick up materials. It took a couple trips to get everything just right (and our original table design mutated into a new beast).

Original Plan (end result is a little different)Original Plan (end result is a little different)

Our mirror before installation

Table + Base (table is 2ft tall)

Stained

LEDs are mounted along this strip of wood with tape

Plexiglass added (mirrored side down)

Bonus Pics

Fred smoothing air bubbles out of the privacy film

The basic frame assembled.

Checking the mirror fit. All good!

LED wiring is routed under a notched piece of wood

Double-sided tape makes laying the LEDs down easy.

Power on - worked on the first try!

Bonus Pics

The code:

GitHub Project

Here's my version of the table code: Github

Here's a sample Rainbow Chaser:

void setup() {
  strip.begin();
  strip.setBrightness(60);  // Lower brightness
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {  
  rainbowFull(15);
}

void offsetChaser(uint16_t i, uint16_t j, uint16_t offset) {
  uint16_t baseNum = i - offset;
  strip.setPixelColor(baseNum, Wheel(((i * 256 / strip.numPixels()) + j) & 255));    //fuckin' rainbows
  strip.setPixelColor(baseNum - 1, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); 
  strip.setPixelColor(baseNum - 2, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); 
  strip.setPixelColor(baseNum - 3, Wheel(((i * 256 / strip.numPixels()) + j) & 255)); 
}

void rainbowFull(uint8_t wait) {
  uint16_t i, j, c;

  for (j = 0; j < 256 * 5; j++) {

    for (i = 0; i < strip.numPixels() * 2; i++) {

      if (j % strip.numPixels() == i) {
        offsetChaser(i, j, 0);
        offsetChaser(i, j, 36);
        offsetChaser(i, j, 72);
        offsetChaser(i, j, 108);
        offsetChaser(i, j, 144);
        offsetChaser(i, j, 180);
        offsetChaser(i, j, 216);

      }
      else {
        //do nothing. this leaves the previous filled color
      }
    }
    strip.show();
    delay(wait);
  }
}

Here's Matt's version: Github

If you're looking for fun programming challenges, why not tackle automatic fading in between RGB values? Amanda gave me ~50 RGb values that she wanted to slowly fade back and forth - quite a novel challenge to auto-interpolate brightness values. I learned a bit about pointers.

I also played around with the FastLED3.1 library, which is quite fun and rewarding to work with.

Many thanks to Mark Kriegsman for his work on the FastLED library. I've thrown together some of his gists in one demo file, which you can download here.

(FastLED3.1 library is required)