Crafting a Smart Mirror with my Dad andÂ Daughter
Tags: iot, raspberrypi, tech, smarthome
Published: 2017-09-04 19:41:12

---
title: Crafting a Smart Mirror with my Dad andÂ Daughter
published: true
description: 
tags: IoT, RaspberryPi, Tech, Smart Home
---
<span class="hardreadability"><span data-offset-key="c58ve-0-0">This month I built a smart mirror with my dad and daughter, making this a project that spanned across 3 generations</span></span><span data-offset-key="c58ve-1-0">. The idea started a few years ago with the novelty of a smart mirror. But before I was going invest the time and money to make one, I needed a practical reason to build one. Recently that reason presented itself. In our kitchen we have a whiteboard where we list out our dinner plans for the week and I wanted to upgrade it. </span><span class="hardreadability"><span data-offset-key="c58ve-2-0">On top of that, I submitted a presentation idea for the smart mirror at local tech conferences and my smart mirror presentation <a href="https://seattle.codecamp.us/Session/Details/217">was selected</a></span><span data-offset-key="c58ve-4-0">. (Thus accelerating my timeline.)</span>

<img class="alignnone size-full wp-image-1393" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5604-1.png" alt="" width="1334" height="750" />

<span class="hardreadability"><span data-offset-key="cqr0d-0-0">I knew I needed help with the design of the smart mirror frame since I live in the digital world designing software that lives in the cloud</span></span><span data-offset-key="cqr0d-1-0">. </span><span class="hardreadability"><span data-offset-key="cqr0d-2-0">But my dad is a Mechanical Engineer who lives in the physical world designing the planes we </span></span><span class="adverb"><span data-offset-key="cqr0d-3-0">fly</span></span><span class="hardreadability"><span data-offset-key="cqr0d-4-0"> though the clouds everyday</span></span><span data-offset-key="cqr0d-5-0">. While talking with my dad one evening, he suggested to create some initial sketches of the mirror.</span>

<img class="alignnone size-full wp-image-1263" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5255-e1503120308978.jpg" alt="" width="3024" height="4032" />

<span class="hardreadability"><span data-offset-key="b17lf-0-0">After a few more conversations with my dad and several design revisions, we settled on a simple box design for the frame</span></span><span data-offset-key="b17lf-1-0">. With my dad knowing more about woodworking than I did, he had a few suggestions for me. Like using cabinet draw sides for the sides of the frame as they already came with a groove to hold the glass. </span><span class="hardreadability"><span data-offset-key="b17lf-2-0">And using <a href="https://en.wikipedia.org/wiki/French_cleat">french cleats</a> to secure the mirror to the wall, which also allowed it to be </span></span><span class="adverb"><span data-offset-key="b17lf-3-0">easily</span></span><span class="hardreadability"><span data-offset-key="b17lf-4-0"> removed for transport</span></span><span data-offset-key="b17lf-5-0">.</span>

<img class="alignnone size-full wp-image-1403" src="https://codingwithcookie.com/wp-content/uploads/2017/08/Box-Design.jpg" alt="" width="4032" height="3024" />

<span data-offset-key="fs25f-0-0">My wife was a huge support in this </span><span class="complexword"><span data-offset-key="fs25f-1-0">endeavor</span></span><span data-offset-key="fs25f-2-0">. </span><span class="hardreadability"><span data-offset-key="fs25f-3-0">She helped by sorting though dozens of TVs looking for the right price, features, and size that was large enough for our kitchen</span></span><span data-offset-key="fs25f-4-0">. But not too large to make transporting a hassle. Finally she was able to get a TV from Best Buy that had everything I was looking for. And the best part was that it was on sale.</span>

<span data-offset-key="7pnpn-0-0">The most noticeable part of the smart mirror is the reflective mirror. </span><span class="hardreadability"><span data-offset-key="7pnpn-1-0">Most household mirrors </span></span><span class="passivevoice"><span data-offset-key="7pnpn-2-0">are made</span></span><span class="hardreadability"><span data-offset-key="7pnpn-3-0"> from glass, but the biggest downside to using glass, is that it's fragile and doesn't transport well</span></span><span data-offset-key="7pnpn-4-0">. I chose plastic as it's lighter, more transparent, and more durable. It's nice to talk to experts and I live in Seattle which has a great local <a href="https://www.tapplastics.com/">plastic supplier</a>. They were excellent and able to help me select the correct plastic. They suggested acrylic and we even tested the mirror film I had acquired on a sample they had. </span><span class="hardreadability"><span data-offset-key="7pnpn-5-0">On top of all their help, this was not the first smart mirror they had supplied the plastic for so I knew I was on the right track</span></span><span data-offset-key="7pnpn-6-0">.</span>

<span data-offset-key="ar2ng-0-0">The choice was simple when it came to deciding where to assemble the frame. My dad has a new workshop and all the tools we needed and I have a garage and a single toolbox. Once I had acquired the wood, acrylic, and mirror film, I went over to my dad's workshop to assemble the frame. What I thought would take 4-5 hours, took around 15 hours to assemble the mirror. But that may be due to refining the design as we were making the mirror. It may also be due to me asking a lot of questions, like why glue this vs. screw that. Or it was due to having a good time with my dad. Looking back it was a combination of all the above. </span><span class="hardreadability"><span data-offset-key="ar2ng-1-0">Over 3 separate days, we cut, glued, nailed, and screwed the frame together to hold the TV, acrylic mirror, and Raspberry Pi</span></span><span data-offset-key="ar2ng-2-0">.</span>

<span class="hardreadability"><span data-offset-key="fld9p-0-0">Since several power tools </span></span><span class="passivevoice"><span data-offset-key="fld9p-1-0">were used</span></span><span class="hardreadability"><span data-offset-key="fld9p-2-0">, including a table saw, chop saw, and nail gun, my daughter didn't help with that part</span></span><span data-offset-key="fld9p-3-0">. But she was able to help with the final assembly when the acrylic mirror </span><span class="passivevoice"><span data-offset-key="fld9p-4-0">was inserted</span></span><span data-offset-key="fld9p-5-0">. She was even able to use the power drill to screw in the top during the final assembly.</span>

<img class="alignnone size-full wp-image-1273" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5416-e1503121444596.jpg" alt="" width="4032" height="3024" />

<span data-offset-key="eh4fb-0-0">With all the woodworking completed, my daughter and I started wiring everything together. As pink is her favorite color, it was obvious that the only choice was to 3D print the Raspberry Pi case in pink. We put the Raspberry Pi into the pink case and attached it to the back of the TV via adhesive Velcro. By using Velcro, the Raspberry Pi can </span><span class="passivevoice"><span data-offset-key="eh4fb-1-0">be disconnected</span></span><span data-offset-key="eh4fb-2-0">. Thus I can show the size of the computer transforming the mirror into a smart mirror. </span>

<img class="alignnone size-full wp-image-1283" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5344.jpg" alt="" width="1502" height="1127" />

Modern TVs usually include a USB port, and the one my wife found did indeed have one. I tested it out the USP Port on the TV and it was able to supply enough power to the Raspberry Pi. This meant that the TV Power cord was the only cable I needed to plug into the wall outlet. Then we plugged the USB and HDMI cables into both the Raspberry Pi and TV and we were ready to go. With the on board WiFi I connected the smart mirror to the internet without any other wires. And when the power is out it will still work as a traditional non-smart mirror.

<img class="alignnone size-full wp-image-1303" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5529.jpg" alt="" width="4032" height="3024" />

<span data-offset-key="a5t0t-0-0">When you are 4, typing on a keyboard and coding are cool. (We'll see how she feels when she's 14.) My daughter got to help a lot on the software part of the smart mirror. </span><span class="hardreadability"><span data-offset-key="a5t0t-1-0">Since her spelling abilities end with her name, she was able to type that and was very excited when she saw it on the smart mirror</span></span><span data-offset-key="a5t0t-2-0">.</span>

<span data-offset-key="cahh7-0-0">To get her name to appear, we used html. To keep it simple, a static html page with inline styling via Chrome (fullscreen F11) was all we had to do to get it working. </span><span class="hardreadability"><span data-offset-key="cahh7-1-0">When styling the html, the background needs to be as dark as possible to </span></span><span class="complexword"><span data-offset-key="cahh7-2-0">minimize</span></span><span class="hardreadability"><span data-offset-key="cahh7-3-0"> the light coming though the mirror</span></span><span data-offset-key="cahh7-4-0">. When the screen is off or completely black it appears as a common mirror. The text and graphics need to be as bright as possible to show through, transforming it into a smart mirror. On my mirror I was able to find a film with 5% transparency.</span>

<img class="alignnone size-full wp-image-1333" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5463-e1503122234543.jpg" alt="" width="3024" height="4032" />

<span data-offset-key="122p7-0-0">In reviewing my mirror thus far, I would do a few things </span><span class="adverb"><span data-offset-key="122p7-1-0">differently</span></span><span data-offset-key="122p7-2-0"> next time. First, I would get a slimmer TV. Right now the mirror frame is 4.5 inches deep, which is deep enough that you notice, but not so deep that it's obtrusive.</span>

<span data-offset-key="e61v6-0-0">Next, I would order acrylic with the mirror film already installed. My dad and I were able to install the film in 20 min, but this resulted in several small bubbles. Most likely due to a few small pieces of dust that </span><span class="passivevoice"><span data-offset-key="e61v6-1-0">were trapped</span></span><span data-offset-key="e61v6-2-0"> between the film and acrylic.</span>

<span data-offset-key="25qta-0-0">Also, I would add a more stylized front. If you take a look at the corners of my smart mirror, you will see all the layers of plywood. This could </span><span class="passivevoice"><span data-offset-key="25qta-1-0">be hidden</span></span><span data-offset-key="25qta-2-0"> with some nice wood to more resemble a picture frame.</span>

<span data-offset-key="16h08-0-0">Finally, I would add a small gap between the TV and acrylic. Currently, the acrylic is helping to support the TV. This is putting pressure on the acrylic causing it to bend </span><span class="adverb"><span data-offset-key="16h08-1-0">slightly</span></span><span data-offset-key="16h08-2-0">. This results in a slight distortion of the mirror.</span>

<span class="complexword"><span data-offset-key="fglik-0-0">Overall</span></span><span class="hardreadability"><span data-offset-key="fglik-1-0">, building the Smart Mirror has been a great experience and if you have any questions please reach out</span></span><span data-offset-key="fglik-2-0">.</span>

<span class="veryhardreadability"><span data-offset-key="djrqe-0-0">Our next project, that my daughter and I are working on, is wiring up some sensors in the kitchen to track the temperature in the refrigerator and freezer</span></span><span data-offset-key="djrqe-1-0">. </span><span class="hardreadability"><span data-offset-key="djrqe-2-0">I'm hoping to get her more involved with this and future projects as she is excited to help and wire the sensors on a breadboard</span></span><span data-offset-key="djrqe-3-0">. I look forward to sharing that story with you once she and I have completed it.</span>

<img class="alignnone size-full wp-image-1323" src="https://codingwithcookie.com/wp-content/uploads/2017/08/IMG_5601-e1503122167826.jpg" alt="" width="3024" height="4032" />