Chapter 1: Introduction
Over the past several months, I engaged in a personal project to build and program a smart mirror. What is a smart mirror? A smart mirror is a one-way mirror with a screen behind it that can display helpful graphics, while also sharing the most crucial information to start your day: how your hair looks. Information (such as weather, news headlines, time, and date etc.) can be displayed from behind the mirror, while most of the screen remains black, preserving the mirror’s reflection.
It would be fair to ask why I would go through all this trouble simply to get information and a reflection that I could get from my smartphone easily. I took on this project because I was excited to tackle the physical challenge of constructing something that my client work — in the financial software field — never touches. This sort of tactile experience will only become more common as more of the world becomes computerized. I wanted not only the practice in a growing field, but also a respite from the purely virtual work I do in the office. Additionally, my apartment could be described as “criminally under-decorated” and I thought a fancy mirror could help make the place more aesthetically pleasing.
To begin, I had a starter set of materials that saved me money and I restricted the rest of the project to include additional parts that would mesh well with the ones I had on hand. I had an old flat panel TV my brother gave me that I had used as a computer monitor. I had recently upgraded my computer station with new monitors, thus freeing up my TV to be torn apart and repurposed. Additionally, I had a “Raspberry Pi 2 Model B” micro-computer that I planned to use to run the mirror software. As I had originally received the Raspberry Pi in college for a class, it was also free. Everything else I needed for the project, besides a basic set of tools I owned, would have to be acquired.
With my small set of components assembled, it was time to create a plan:
- Load the smart mirror software onto the Raspberry Pi and plug it into the TV. Ensure the TV and Raspberry Pi worked before moving forward.
- Break apart the TV into the smallest form factor that would still allow it to run the display.
- Ensure screen wouldn't have unnecessarily large borders/bezels and check depth of the screen's functional components.
- Build/Acquire frame matching the dimensions of the stripped-down TV screen, including depth. Extra depth of frame preferable to account for unknown thickness of mirror layer.
- Acquire mirror glass or equivalent reflective sheet and cut it to fit frame if necessary. May need to acquire cutting tools.
- Finalize stacked assembly of mirror, frame and screen. This could be completed with hardware, glue, or both.
- Attach hanging hardware to frame and attach Raspberry-Pi to assembly.
- Run it!
Chapter 2: Building the Dang Thing
The software portion of this project went quickly and cleanly. Before I even had replacement monitors ready, I was able to quickly load an operating system on my Raspberry Pi and make sure it worked. To do this, I used the directions found at https://www.raspberrypi.org/downloads/raspbian/ to download the OS for the pi and load it onto the SD card that acts as the pi’s hard drive. Once done, I plugged in a keyboard and mouse and set up basic functions of the pi like WiFi connectivity and enabled SSH connections so I could use the pi without it having its own screen, keyboard, and mouse. While I still had the pi set up on a screen, I went to https://github.com/MichMich/MagicMirror and used the pi’s git tool to clone down the MagicMirror repository. All that remained was customizing the software to display the modules I wanted, making those modules localized to Richmond VA (weather, time-zone), rotating the display so it was in portrait mode instead of landscape, and making the mirror software simpler to start. All of this was done before any physical work was completed on the TV or frame in about an afternoon’s time. Most issues encountered were solved with one or two quick Google searches.
Once I ensured the mirror was viable with the screen, computer, and software, I began the physical work of turning a TV into a smart mirror. The first step was to pull off the front bezel. To do this I used a flat tool on my Swiss-army knife and got the bezel off without much trouble. Under this bezel I found the speakers, a bare-bones control circuit that used capacitive touch, and some wires connecting these items to the circuit boards behind the screen. Once the bezel was removed, I re-tested the screen to make sure it still worked.
The ease at which I accomplished these tasks lifted my spirits and gave me confidence that the rest would also run smoothly. My confidence was swiftly crushed as I tried to see if the back was as easily separated from the screen as the bezel, with no luck. I unscrewed every screw I could find and still the back shell stayed put. Something was holding the back in place and I couldn’t figure it out. When I tried to pry the back shell away from the screen and its circuit boards, something near the bottom of the screen held tightly. No screws were visible, so I assumed it must be some kind of adhesive. I gave up for the day and came back another day to start fresh. I still had no luck in finding out what was keeping the thing together. Eventually I gave up on taking the back off in one piece and started ripping parts of it off with two pliers. This was very frustrating and stressful work, but slowly the back started to shrink as a piece. After a lot of pulling and twisting I found myself at the point on the back shell where the TV’s inputs were labeled and found out the labels were not printed directly onto the shell but onto a stick-on label. Removing this label, I found 4 hidden screws. These were the screws that haunted me. The screws that hid like cowards underneath a label while I sweated and cursed at this TV. I unscrewed them, and the back came right off. I felt like a fool for taking so long to find them. With the back shell removed and thrown into the garbage with considerable force, I was left with a beautiful screen/circuit board fit to measure and place inside of a frame.
After taking measurements of the screen’s width and height, and of the circuit board and screen’s combined depth, I set off to find a way to build a frame to fit it. My first instinct was to go to Home Depot and see if they could sell me some two-by-fours cut to the correct length to fit the screen and attach the mirror in front of the frame, with the screen on the opposite side. This would entail some fairly precise cutting of the mirror to fit the frame and an as of yet unknown way to attach the mirror to the wood frame. Fortunately, on the way to Home Depot, there was an AC Moore craft store, which I thought to stop by first. AC Moore had a 70% off sale on all custom frames and I realized this would save me a ton of trouble on a project I had already spent a lot of frustration on. I found a frame that fit the depth of the screen and circuit boards, along with a small inward bezel to hold everything in place and hide any imperfections around the edge of the mirror and screen. The frame’s inner dimensions were 1/16th of an inch larger than the screen itself, to accommodate any imperfect measurements I had taken. After placing my order, I waited about two weeks for it to be customized and ready for pick-up, during which time I started planning out the mirror surface itself.
After talking with a friend who had built a smart mirror already, employees at Loews and Home Depot, and browsing Amazon, I opted to purchase a one-way mirror a larger size than I needed and then cut it down to the correct size. I also added a glass cutter to my cart, thinking it couldn’t be too hard to score and break the glass into the size I needed. I was wrong.
Once I got the frame from A.C. Moore I sent the order for the glass and the cutter and got them two days later. Lacking a workshop or suitable outdoor location I opted to attempt modification of the mirror in my apartment. The mirror came in ½ an inch too wide and 9 inches too long for the frame, so I marked the proper dimensions on the mirror with a sharpie and brought my friend over to help me out. We read through all the instructions, watched a YouTube video on glass cutting, and did our best to make a clean score on the 9-inch-too-long side. As it turns out, scoring and breaking glass isn’t that easy, and glass shards tend to fly everywhere. After several tries with gloved hands and some touch up tries with pliers, I ended up with a very rough edge and no way to smooth it down and remove the excess height that remained. I also had an entire ½ inch wide length of the mirror that I didn’t feel at all comfortable trying to score and break.
I needed to pause and regroup to consider new ideas for cutting the mirror, so I talked to my friend Michael who owned a Dremel tool. Michael and I gave the Dremel the old college try, but none of the bits he had were suitable for cutting glass. After some research I made a trip to Loews to get a diamond coated wheel that could cut through the mirror. Surprisingly, this wheel cut through the mirror like a knife through cold butter. While it took a bit of force, it eventually worked. It also shot a cloud of mirror dust into the air, and I didn’t know if the t-shirt around my face was doing its job to protect me. This single wheel worked to cut down the uneven edge that I had failed to cleanly snap with the glass cutter. Unfortunately, it seemed like as I cut, the wheel grew less effective, so I knew I would need more cutting wheels to cut the ½ inch strip on the long side. Thus, it was back to Amazon to order 10 diamond coated cutting wheels for the same price I paid for one from Loews. I returned to Michael’s house to finish the job, this time with a proper face mask and some sandpaper for finishing purposes. I was worried about cracking the glass if I cut all the way down the 19 inches of the ½ inch wide strip, so I devised a plan of cutting into the mirror perpendicular to the edge at 2 to 3-inch intervals and cutting interval by interval. This gave me a chance to assess the wear on the cutting wheels and switch them out, as needed. I also noticed that the mirror side of the one-way mirror wasn’t coming off on as clean of a break as I wanted, but it wasn’t bad enough that it would show from behind the frame’s bezel. I worked my way down the entire length of the mirror and cut it down to the correct dimensions to fit in the frame. Well, it almost fit: it took about 20 minutes of sanding the edges to get the mirror to slide perfectly into the frame. But once done, I had a mirror that slid right into place and a frame that hid my mistakes on the mirror. I was at last ready for final assembly.
Before final assembly of the mirror I still had to purchase glue, a dedicated HDMI cable for the pi, a 90-degree angle HDMI adapter to stop the cord from poking against the wall, some picture hanging hardware. and a case for the pi. Final assembly of the mirror was planned as a simple stack of mirror in frame, screen behind mirror, and Raspberry Pi mounted on the back of the screen. I spent a couple days gluing the edges of the mirror to the inside of the frame — gluing and waiting for the glue to dry before adding more glue and repeating the process. Stacking these parts as described, I was able to assess the situation and make sure the screen behind the mirror produced the desired effect. I also thought to add some spacers between the screen and the mirror to prevent scratching, and some L-brackets behind the screen to hold the layers together against the frame. After picking the parts up from the store, along with some stick-on Velcro to secure the Raspberry Pi, I was able to assemble the mirror in a way that I could separate the layers later if needed with the Raspberry Pi held in place by Velcro. I then installed the picture hanging hardware on the top of the frame. Already hanging on the wall where I wanted the mirror was a rather heavy picture, though not as heavy as the assembled mirror. Gingerly I took the placeholder picture down and hung the mirror on its screw, and it held. After plugging in the TV and the Raspberry Pi into the wall, I used my computer to SSH into the pi and start the mirror software. Miraculously, it worked the first time. It was beautiful.