Introduction: Make a Programmable RGB LED Infinity Mirror With Arduino

This Instructable explains how to make a framed one-way mirror that reflects individually programmable RGB LEDs onto a mirror. This creates the illusion of an infinite tunnel of pretty lights with an on/off power switch, which uplifted New Englanders' moods during the winter.

⚠️ Forewarning - If you plan to frequently transport or hang this on dry wall, do prioritize weight and volume as variables when choosing materials, e.g. solid wood vs. particle board.


This looks intimidating!

I started this project knowing nothing about electronics. I did have some simple coding experience but you can copy/paste code to get the effect shown above.

This isn't exactly what I'm looking for...

The LEDs are controlled with the Arduino. If you don't care about controllable LEDs, get "non-addressable" LEDs or control them with potentiometers on a breadboard. Instead of the one-way mirror, you could use plexiglass or acrylic with window tint instead.

This infinity mirror design and build includes:

  1. Arduino-controlled LEDS with customizable code
  2. External access to the Arduino's USB A-B port and power supply jack
  3. A one-way mirror
  4. Custom wooden frame

Note that this project scales with size. The bigger your desired infinity mirror, the more lights, the bigger power supply, the heavier, and likely more expensive it will be or need.

Supplies

Step 1: Tools, Materials, Electronics, Vendors

Tools

For the electronics

  1. Soldering iron
  2. Lead-free solder
  3. Electrical tape
  4. Scissors
  5. Measuring tape
  6. Wire strippers
  7. Rubber insulated clamp

For the frame

  1. Vice grips
  2. Hammer
  3. Black marker
  4. Mirror cleaner + microfiber towel
  5. Double sided tape
  6. Drill + drill bits
  7. 8 ankle brackets
  8. Rubber bumper
  9. Offset clip
  10. Screws
  11. Wood glue
  12. Chisel
  13. Wooden spacersº (about .45" x .45" x at most as long as the frame itself)
  14. Wood miter/trimmer
  15. 1 can of Rustoleum 2X Satin Black spray paint

Materials

The dimensions of the mirrors will define your LED strip length which impacts how many power supply amps (A) and capacitor farads (uF) you'll need. LEDs and power supplies can get pricey too. You can play around with dimensions here: http://framedandmatted.com/builder.

Mirror + One-way Mirror with Matching Dimensions

I got a 24x30" mirror from a local framing shop. A local glass shop priced it as $68.

I was blessed by the gods and found a one-way mirror sized at 25x35" in a thrift store for $14 after I was quoted $174 by a local glass shop for the same thing. A cheaper alternative is plexiglass with a one-way mirror tint.

Frame

I paid $140 for the build, materials, and assembly of the frame and $5 for the spray paint at the hardware store. The frame includes the moulding (4 sides), wooden spacers + vinyl taped flat ankle bracket to secure the mirrors, LED strip, and arduino + capacitor, plywood boards, screws, etc. If you want to hang the mirror, you'll need two steel plate hangers with a steel cable with end loops.

Electronics

  1. Neopixel RGB LED strip + tech support ($25/meter)
  2. For a 24x30" mirror, I needed 108" of strip or 2.75 meters.
  3. individually programmable or "digitally addressable"
  4. black colored backing or "PCB"
  5. 60 LEDs or pixels/meter
  6. weatherproof silicon casing or "IP67" not needed, but came with the ones I ordered from Adafruit
  7. Arduino Uno R3ª ($25)
  8. Standard A-B USB cableª ($4)
  9. Prong/Prong Wiresª ($6)
  10. In-line power switch ($2.50)º
  11. Terminal block adapter ($2)
  12. 4700 uF capacitor ($2)
  13. 2-pin JST SM plug + receptacle cable ($0.75)
  14. 5V 10A power supply ($25)

ª To get these, I purchased the Arduino Budget Pack ($35) so I could also spend some time experimenting and get a better understanding of circuits before moving onto the LED strips, have variable length wires with connectors, etc.

º This is optional – I wanted an on/off switch instead of removing/inserting the power supply plug from the wall.

Step 2: Wiring the Circuit

DON'T DAMAGE YOUR LEDS!

These articles helped me avoid that mistake:

  1. Basic Connections
  2. Best Practices
  3. Powering NeoPixels

1. Cut the LED strip to your desired length.

Because my mirrors are 24x30", I needed (2 x 24") + (2 x 30") =108" or 2.75 meters of strip. Along the strip, you can see solid straight white lines with a scissors symbol next to it–you can use the scissors to cut along any of these lines.

2. Connect the capacitor to the terminal block.

This step protects the LED strip from a sudden onrush of current (source). Connect the positive (longer) lead of the capacitor to the positive terminal of the green terminal block and the negative (shorter) lead of the capacitor to the negative side of the green terminal block. The negative lead is also indicated by the light blue strip on the side of the capacitor with large "–" symbols along it.

3. Connect ground between the Arduino, LED strip, and power.

This involves two connections. I used a jumper wire with connectors to connect Arduino's ground pin (next to Arduino's 5V pin) to the negative side of the terminal block. The other connection was made up of two pieces:

A) The tail wire of the socket JST SM In-line power wire connector soldered onto the LED strip's ground. A photo of my very DIY soldering set up is attached but also an example video is available here. Make sure that the LED strip's arrows are pointing AWAY from this wire.

B) A jumper wire's end in the corresponding head pin of the connector mentioned in 2A and the other end in the negative side of the green terminal block.

4. Connect +5V.

I soldered a jumper wire on the +5V part of the LED strip (again, LED strip's arrows should be pointing AWAY from this wire), connecting the other end to the positive part of the green terminal block.

5. Connect data.

I soldered the other tail wire of the socket JST SM In-line power wire connector to Din of the LED strip. Then, I put one end of a jumper wire into the corresponding head pin of the connector and the other end in the positive part of the green terminal block.

6. Add power.

Plug the USB cable into the Arduino and the USB port of a computer. Plug in the in-line power switch and power supply into the green terminal block DC adapter and into a wall outlet. The Arduino "ON" LED should light up.

Now if we want the LEDs to light up, we need to get some code onto the Arduino...

Step 3: Coding the Arduino

TEST YOUR LEDs

1. Install Arduino's Software.

Go to https://www.arduino.cc/en/Main/Software. This application is where you'll be making code, checking it for errors, and uploading it to the Arduino: https://www.arduino.cc/en/Main/Software.

2. Add Adafruit's NeoPixel Library.

Go to https://github.com/adafruit/Adafruit_NeoPixel. Click the green "Clone or download" button to the right. Click on "Download ZIP".

3. Follow instructions.

From this tutorial, I followed video instructions to test my circuit (neglect the one in the video) and strip: https://create.arduino.cc/projecthub/glowascii/ard... but try adjusting the NUMPIXELS value according to the number of pixels on your strip, change the color, and try to turn off the lights in the same way to get a handle of concepts like:

  1. Hex triplets
  2. for loops
  3. Verifying, compiling, and uploading Arduino code
  4. RGB additive coloring.

When the TX and RX LEDs light up on the board, TX means there's data transferring from the Arduino to the computer and RX means there's data being received by the Arduino from the computer. Rad!

4. Upload code

I decided to use the rainbow cycle code from here: http://www.tweaking4all.com/hardware/arduino/adru....

But how do I light up the LEDs without a computer?

  1. Make sure you've uploaded the code you want on the Arduino.
  2. Turn off the power from the power supply.
  3. Remove the USB cable.
  4. Put one end of a new jumper wire into the +5V power pin of the Arduino and the other end into the positive part of the green terminal block.
  5. Turn on your power supply. Your LED strip should be running the code without a computer. Voilà!

Step 4: Building the Frame

The frame is made of 2 major pieces of 24 x 30" wood, secured together with pocket screws. The rabbets wide enough for a 1" gap between 1/8" thick one-way mirror and 1/4" thick mirror + 12.5mm LED strip with weatherproof silicone casing.

1. Spray paint the frame and spacers

  • Two coats of Rust-oleum's 2X Satin Black spray paint
  • Let the frame dry overnight. Keep note of the minimum temperature needed to ensure drying and setting of the paint

2. Insert the one-way mirror. Wipe it down with window cleaner and a microfiber towel

4. Use wood glue to set wooden spacers on top of the one-way mirror.

Step 5: Planning and Testing the Fit

With the frame complete and the electronics connected, lay out everything to check overall fit and functionality. This is just a sanity check before making any irreversible changes to the materials.

Step 6: Assembling Everything Together

Double stick tape the LED strip along the frame.

  • The wires are kept in the corner of the frame.
  • Chisel a little divot in the frame to hide the wires. This allows the next row of spacers and the mirror (#6 and #7 below) to fit the frame.

Use wood glue again to set more spacers on top of the LED strip.

  • I used a black marker to make sure all exposed sides of the wooden spacers were black.

Place the mirror on top.

Place a piece of plywood on the mirror and secure with ankle brackets bent at 90º.

  • I marked the exact same position across 8 ankle brackets and used a vice grip and hammer to bend them.
  • Screw in 2 ankle brackets per side of the frame to keep the plywood in place.

Secure the arduino and capacitor with wooden spacers glued to the plywood board, a screwed in offset clip with a rubber bumper, and a screwed in black vinyl taped non-bent ankle bracket.

  • Photo attached.

Place the second piece of plywood board and screw it into the frame.

Step 7: Concluding Thoughts

Possible Improvements

Right now, the Arduino is just running the rainbow cycle. Some other cool options could be:

  • Have the code cycle through different modes
  • Having code and a mic that reacts to ambient sounds or touch