When I was given this assignment for my Interactive Design class, which involved the use of an Arduino uno, a combination of events led to the creation of my touch infinity mirror table. Searching through a variety of Instructables, while simultaneously renovating my childhood playroom for a holiday surprise for my mother, I created a table that was the perfect fit for my vision that would also complement the décor of the room. I used this table as a frame for my touch-capacitive infinity mirror because I wanted to create a piece of art that is both interactive and satisfying to the eye and mind of the observer.

Materials:

arduino uno
wires
transistors
resistors
soldering iron and solder
regular mirror
2-way mirror
aluminum frame
12 V power supply
jigsaw
sander with sand paper
drill
screws
wooden planks
electrical tape

Step 1: Table, Mirrors, and Getting Started

I found a local glass shop that sold one-way and two-way mirrors and they assisted in cutting one of each to the size and specifications that I wanted for my table. (I created my own table, but any sturdy table will do for this project)

Step 2: Measuring the Mirrors and Cutting the Table

I took the pre-cut mirrors and laid them on the table and measured out the desired space on the table that would eventually house the mirrors. I proceeded to drill holes in the four corners of the area that was to be cut prior to using a jigsaw to finish cutting out the hole. After cutting the table, I sanded down the edges of the newly hollowed-out area.

Step 3: Under-the-table-framework

I created a framework out of a piece of wood that would be placed on the underside of the table in order to support the future mirror inserts.

Step 4: Code, Changing Colors, and Touch Capacitive

I used a non-addressable LED strip for my table.

With the help of my teacher and TA, I was able to combine a few different resources to make a code that worked specifically for my table's needs.

CODE

// Pin for the LED

int LEDPin = 13;

int trigger = 0;

int r, g, b;

// Pin to connect to your drawing

int capSensePin = 2;

// This is how high the sensor needs to read in order

// to trigger a touch. You'll find this number

// by trial and error, or you could take readings at

// the start of the program to dynamically calculate this.

int touchedCutoff = 20;

#define REDPIN 5

#define GREENPIN 6

#define BLUEPIN 3

void setup(){

Serial.begin(9600);

// Set up the LED

pinMode(LEDPin, OUTPUT);

digitalWrite(LEDPin, LOW);

pinMode(REDPIN, OUTPUT);

pinMode(GREENPIN, OUTPUT);

pinMode(BLUEPIN, OUTPUT);

}

void loop(){

// If the capacitive sensor reads above a certain threshold,

// turn on the LED

digitalWrite(LEDPin, HIGH);

}

else {

digitalWrite(LEDPin, LOW);

}

// Every 500 ms, print the value of the capacitive sensor

if ( (millis() % 500) == 0){

Serial.print("Capacitive Sensor on Pin 2 reads: ");

Serial.println(trigger);

}

trigger++;

if (trigger >5){

trigger =0;

}

switch(trigger){ //these are the lighting schemes

case 0:

digitalWrite(REDPIN,255);

digitalWrite(GREENPIN,255);

digitalWrite(BLUEPIN,255);

break;

case 1:

digitalWrite(REDPIN,0);

digitalWrite(GREENPIN,255);

digitalWrite(BLUEPIN,0);

break;

case 2:

digitalWrite(REDPIN,0);

digitalWrite(GREENPIN,255);

digitalWrite(BLUEPIN,255);

break;

case 3:

digitalWrite(REDPIN,255);

digitalWrite(GREENPIN,0);

digitalWrite(BLUEPIN,255);

break;

case 4:

digitalWrite(REDPIN,0);

digitalWrite(GREENPIN,0);

digitalWrite(BLUEPIN,0);

break;

}

}

}

// Input: Arduino pin number

// Output: A number, from 0 to 17 expressing

// how much capacitance is on the pin

// When you touch the pin, or whatever you have

// attached to it, the number will get higher

// In order for this to work now,

// The pin should have a 1+Megaohm resistor pulling

// it up to +5v.

// This is how you declare a variable which

// will hold the PORT, PIN, and DDR registers

// on an AVR

volatile uint8_t* port;

volatile uint8_t* ddr;

volatile uint8_t* pin;

// Here we translate the input pin number from

// Arduino pin number to the AVR PORT, PIN, DDR,

// and which bit of those registers we care about.

if ((pinToMeasure >= 0) && (pinToMeasure <= 7)){

port = &PORTD;

ddr = &DDRD;

pin = &PIND;

}

if ((pinToMeasure > 7) && (pinToMeasure <= 13)){

port = &PORTB;

ddr = &DDRB;

bitmask = 1 << (pinToMeasure - 8);

pin = &PINB;

}

if ((pinToMeasure > 13) && (pinToMeasure <= 19)){

port = &PORTC;

ddr = &DDRC;

bitmask = 1 << (pinToMeasure - 13);

pin = &PINC;

}

// Discharge the pin first by setting it low and output

delay(1);

// Make the pin an input WITHOUT the internal pull-up on

// Now see how long the pin to get pulled up

int cycles = 16000;

for(int i = 0; i < cycles; i++){

cycles = i;

break;

}

}

// Discharge the pin again by setting it low and output

// It's important to leave the pins low if you want to

// be able to touch more than 1 sensor at a time - if

// the sensor is left pulled high, when you touch

// two sensors, your body will transfer the charge between

// sensors.

return cycles;

}

Step 5: Framing the Mirror

I took the two-way mirror portion of my infinity mirror to a custom frame shop to get an aluminum frame. (The mirror is facing down in the frame, with the “see-through” side facing up)

Step 6: Putting It All Together

Using the remaining half-inch of the frame under the mirror, I wrapped a strip of LED lights around the inner perimeter of the mirror, leaving space for the connecting wires to stick out to connect to my arduino uno.

I placed the one-way mirror portion of the infinity mirror facing upwards in the table, then I placed the framed two-way mirror portion with the attached LED strip on top of the one-way mirror in the hole in the table, making sure that the wires used to connect the mirrors to the arduino uno stuck out on the underside of the table and out of plain sight.

Step 7: Finishing Up

I secured the protoboard and ardunio to the underside of the table, then I connected the wires from the LED strip to the Arduino and soldered the wire of the Arduino to the aluminum frame underneath in order to make it touch-capacitive.

I connected a plugged-in 12-V power source to the ardunio, and was able to change the color of the lights within the infinity mirror by touching the frame.

<p>Great optical effect and nice design</p>
<p>Very good but I think that <a href="https://www.instructables.com/member/chris.antonopoulos.5/" rel="nofollow">chris.antonopoulos.5</a> table was a little better executed and for that I vote for him</p>
<p>this is a project I really want to try it it looks amazing.</p>
Thank you so much!
No problem I would keep it in my living room and when people come over they get a futuristic feeling
<p>Wouldn't it be easier to use an RGB LED strip light instead? Amazon &amp; Ebay sell them for around \$15.</p>
<p>I think infinity are 'neat' and this one is really nice. I've not gotten into Arduino or Pi but one day. . . Don't know if joy could incorporate it or not but there are, on eBay, \$2-5 controllers that change color, speed and intensity of the led strips. If you could incorporate one of those into your table it would elevate it to awesom </p>
<p>It was for a class project and we were required to use an arduino. It is definitely possible to just buy a kit, but like I said, I had rules to follow for the project. Thanks for the suggestion. :)</p>
Haven't programmed since I was a kid so I'm lost with Arduino and Pi. Totally understand parameters for a project. It's got me thinking and devising. Saw, online, how to DIY a mirror so might give it a try with convex and concave mirror and a flat two way mirror. Won't use Arduino since I don't know how but will use one of those \$5 controllers. Used one of those controllers with rgb LEDs on an internally laser etched sculpture - turned out great, cycling thru different colors, intensities, and pulsations. Too bad the sculpture wasn't mine, sigh.
<p>was this one string layer of lights? What would happen if you used two, side by side or one on top of the first. As in two (or more) rows side by side or stacked. I just might have to do some experimenting. I wonder if you could make a circular one with a concave (or convex) mirror(s) to make the illusion focus to a cone? I'm thinking. . . </p>
<p>I honestly have no clue. I found the infinity mirror concept on here and just kind of ran with it. Let me know if you figure it out... I'm sure it would be awesome!</p>
looks amazing..want to try asap<br>
<p>Thanks! :)</p>
<p>Awesome idea! Thanks for sharing. It's a gotta-make-someday for me</p>
<p>Thank you! :)</p>
<p>This is awesome and I need to make this. </p>