$100 Smart Mirror Pi

By Carl Gordon Media

I saw one of these mirrors online and instantly set out to make one in the cheapest, thriftiest and easiest way I could find and now you can too! This mirror is my second iteration, I used a Laptop first to write the code and eased my way into using the Raspberry Pi. The total cost of the build was 146 NZD, roughly 100 USD.

I am using Raspberry Pi 3 model B for the brains of the project as it has built in WiFi which is perfect for this. Building this mirror was my first taste of the Pi, and it was delicious... If you like this please vote for me in the Beyond the Comfort Zone or Internet of Things contests thaaank yoooou.

You'll Need

Tools

Fortunately I have cheap access to some powerful tools through Victoria University where I study Media Design which allowed me to do all the manufacturing myself. I have never laser cut anything before this project and have minimal experience with a 3D printer so if I can do it I am confident you can too! If you don't have access to this equipment there may be some local Maker facilities in your area such as: Techshop, MakerSpace, FabLab or somebody who will do it for a small fee.

Specifications

So, before I began building my mirror I decided to jot down some project goals detailing exactly what attributes the mirror will have in its final form.

It must display:

The design of the mirror itself must aim to be:

Start Building

I started by tidying up an old picture frame I picked up from an op-shop for $20, I tried to explain to the old man who worked there that I was turning it into a Smart Mirror and I have never seen anybody look so confused. I was looking to buy one that had a glass surface larger than the 19" Monitor I planned to mount it to. I also wanted the wooden frame itself to be large and strong enough to support 6 small screws. Try get one with thick glass to avoid cracking it in the building process as I did with my first concept.

Once I had the perfect frame I sanded it back to its natural wood grain and tinted the glass with my one way mirror tint film. If you have never tinted anything with film I highly recommend watching a few youtube videos on How to install reflective window film, as there is a few tricks to doing it with no bubbles at the end. You will also need to pay attention to the VTL (Visual light Transmittance) level of the tint. The VTL of these films ranges from around 5% = Very Dark. 15% = Dark. 35% = Lightly Dark. 50% = Light. 65% = Very Light. For this specific project we are aiming to tint the glass in a way that provides surface reflection on the external side but also allows the graphical output of the Mirror to Transmit through the glass. I used 20% for mine but I believe there could be a more suitable VTL for achieving this effect.

Mounting the Mirror to the Monitor

This is the part where I laser cut two rectangles out of 1 piece of acrylic sheet. The first rectangle cut out of the acrylic sheet was to the size of my wooden frame and the second one was to the size of my monitor 19".

I did this by making a very basic file in Illustrator and sending it to the laser cutter. I would attach the file but your dimensions will likely be different to mine.

Once this piece is cut out to the perfect size it is superglued to the front of my monitor. I took the front of the monitor off for this step to avoid getting glue on the screen.

They bonded together extremely well and I then lined up the acrylic with the back of the wooden frame and started drilling small holes through the plastic and softly into the wood. Drilling holes is very important to allow the screws to go into the wood and plastic without causing cracks or splits. I did this with 3 screws running down each side, 6 in total to secure the frame to the acrylic / monitor.

Lets get nerdy with the coding

If you are new to Raspberry Pi like me and you are completely unsure how to get started, also like me you should head over to this tutorial to learn how to download and set up NOOBS the operating system for the Pi.

The Pi contains all the brains for the mirror and allows it to run a Processing sketch.

Once your Raspberry Pi is up and running with NOOBS installed you will need to install Processing.

Processing is an IDE (integrated development environment) used by Designer's for writing Java applications. Processing has only recently become supported by Raspberry Pi and you can create applications directly on your Pi without the need for another Laptop or PC. To install Processing on your Pi take the 'processing-linux-arm' file attached to this step, put it on a USB and transfer it to the Pi. Now just open it on the Raspberry desktop and Processing should begin to install.

I have attached the processing sketch (it is in the Mirror_Pi.zip file along with the weather icons and reminders.txt) I used to create the Application for the mirror. Go ahead and open it on your Pi and hit 'Run'. You will need to change the width and height values in the setup() loop to match the resolution of your screen.

This sketch pulls weather data from the internet for Wellington City and retrieves the current date and time from the Pi's default timezone settings. It also retrieves my upcoming hand-ins from a .txt file in the root folder called reminders.txt that can easily be edited to your needs. It has a calendar and week planner hard-coded into it so it knows what week it is in the year and displays your events for that week.

You will need a bit of coding skill to make the sketch pull weather data for your city. I took this data straight off accuweather.com by using firefox's developer tools to find where in the sites code it shows today's conditions and temp and displaying that in the Application. You can do this with your weather website of choice or use an API like Yahoo Weather.

When you are happy with the sketch and how it looks on your screen hit the Export Sketch button at the top of the Processing window and export it as an application.

Housing the Pi

I decided to 3D Print a case for my PI so I could mount it to the back of the monitor. I found this case on thingiverse courtesy of a maker named Normand: http://www.thingiverse.com/thing:410003 I 3D Printed it in about 2 hours on an UP Mini. This case is ideal for this project as it protects the GPIO pins but allows access to the USB, HDMI, SD and Micro USB (power) ports. I attached the bottom piece of the case to the back of my monitor with more superglue to avoid putting screws into the internal organs of the monitor.

Power up and Admire

Now all you need to do is power up your monitor and your Raspberry Pi and open the exported Application from Processing.

There you go!

If you followed along you should now own your very own smart mirror, congratz! I would love to see your projects and I'll be right here to answer any questions to help you along. If there is any advice you have for me I'd be glad to hear it. I plan on developing this Prototype further so if you want to see where it goes from here make sure to follow me for future updates :-) There are so many potential developments for this project and I hope this is a useful blueprint for the Maker Community.

Happy Making peeps!

This content was created entirely by Carl Gordon Media. Used under Creative Commons 2.5 BY-NC-SA Licence. Changes were made to the original content.