A 'Magic MIrror' is a project where a 2 way mirror is placed over a screen of some sort. Where the screen shows black pixels, the mirror is reflective. Where the screen shows white or lighter pixels, they shine through. This creates an effect of being able to have digital text, icons, or even images show through a mirror, while still maintaining the reflectivity. The third picture above should show what that can look like.
The youtube video shows the assembly end to end, and has a demo at the end showing what the finished project looks like. I wanted to take time to write down the steps here, as I enjoy the instructable community, and I wanted a place to make notes about things like the software configuration, and answer questions.
I've seen a ton of magic mirror projects and have always wanted to build one. I started to build one recently as a gift, and had no idea how much the 2 way mirror portions can cost! After spending $75.00 (USD) on a mirror alone, I realized that the project was going to go well out of our 'friend gift budget' and I had to rethink my strategy. After discovering N-O-D-E's channel on youtube, he had a concept of a small pyramid case. I immediately began to run with that concept, experimenting with what raspberry pi's I could fit in, how to easily create the case, and how to get the software running.
In the end I chose to 3D print the case. I designed the case in tinkercad. It's two simple pieces that easily snap together. The Mirror is a 4.5" mirror that is simply glued (glue gun) onto the frame. The main computer is a Raspberry pi zero with an 8 Gig micro SD card, and the screen is a 3.5" screen from Kuman that had an HDMI port already on it. Honestly 75% of this project was the tinkercad design for the case, and figuring out a screen that would fit, could be powered easily off a single USB cable, and customizing the software.
Here's the cost of the parts to give you a rundown. It's under 60 dollars if you have a 3D printer...otherwise you'll want to either hire out the 3D print, or possibly build a wooden pyramid frame (I ALMOST went that route, and may in a future instructable, as I think a stained oak case could look really cool for this :) )
Raspberry pi Zero W - $10.00 - Adafruit.com - Limit one per order
8Gig Micro SD Card - $4.00 - Amazon.com
Kuman 3.5" TFT Screen - $29.99 - Amazon.com - HDMI Version
SN-Riggor USB Cable (Optional, but adds some flair) - 4 for 16.00 ($4.00 each) Amazon.com
2 Way mirror - 115mm Square - $5.00 from Tap Plastics (I brought the 3D printed case into a store and had them cut it to match)
3D filament - About 2 bucks worth
Mini-HDMI -> HDMI adapter - 2 for $6.00 (Only need one): Amazon.com
In the end I had some of the adapters already, but you should be able to get these for the above prices or better, and in the end be under $60.00. Since this was about how much we'd spend if we got each other an Xbox or PS4 game, this fit into our 'friend budget'.
Ok, enough of an intro, let's learn how to build it!
The first pic shows all of the parts laid out. The second shows the compute portion assembly in progress. There's not a lot of magic at this point...here's the steps:
At this point you're already about halfway done with the assembly. Before closing it up, let's get the software image written in the next step.
There are a ton of tutorials on how to write an SD Card image for a raspberry pi onto a microSD card, and I don't want to retread that ground. But it is important, since this is a Pi Zero W we're using, to know some tricks to get this up and running. First, please visit Emmanuels site at:
http://emmanuelcontreras.com/how-to/how-to-create-...
He's done the work to document and create an image of the Magic Mirror software onto a Raspberry pi zero (as you can see by his steps, this can be quite difficult). Scroll down and you'll see, at the bottom after his steps, a ready made image you can use. (If you search for 'Image file' it should get you there).
Next up, you'll want to follow the steps he has listed for connecting to wifi and adding ssh. One REALLY important tip here: Do NOT use Notepad in windows to edit the supplicant_conf file. Notepad will mangle the line endings to not be Linux compatable, and you'll not connect. Notepad++ is a free replacement for notepad and can do proper line endings.
When you've written that image (I use Win32 disk imager on windows) and edited the supplicant_conf file and added SSH, you'll be ready to insert the card and boot the device.
At this point the Pi should connect to your wifi. The trick then is to find it :) There are a number of ip scanning apps out there for phones and PC. Advanced IP Scanner will work for windows. For an iPhone, I use iNet on my iPhone to scan for the pi zero. When you find it, you can use a telnet app like Putty to connect to it over SSH. This will be important for configuring the MagicMirror Software and installing addons!
Once you've gotten this far, connect the microUSB to power, and ensure you can boot up and connect over SSH. At that point you'll be ready to move on and button up the case.
Ensure that the screen boots and turns on when you plug power into the Pi. The boot time is 3-5 minutes, so please be patient..it has to boot the pi, then get the browser launched, and then launch the magic mirror software. Luckily you shouldn't be booting/powering this down often (it costs less than 7 cents a year to run with about a 100ma power draw). Next we'll finish assembly:
You should start getting excited now, as you should start seeing the fruits of your labors show...the time or date should be showing through the mirror. Next up is configuration!
At this point your essentially assembled and should be running the software and able to SSH in. The modules are probably a mess however, and you're wondering how to fix them.
First up, you'll want to read a bit about how the Magic MIrror software works. That can be found here:
This wouldn't be a good instructable though without giving you a quickstart/cheat sheet to get started. Here's some tips and an explanation of how this works:
https://github.com/MichMich/MagicMirror/wiki/3rd-p... Each should have instructions on configuring them.
one Module you'll immediately want is MMM-Carousel. This module cycles through all other modules that are installed. (https://github.com/barnabycolby/MMM-Carousel)
To configure the whole thing, you'll want to go to the MagicMirror/config folder, and edit the config.js file
In Config.js, you'll want to add the name of the modules that you've added via Git clone above. You'll want to position them (I positioned all of mine into: middle_center. Then the carousel takes care of showing one at a time, and switching between them It does so after a configurable amount of seconds (I used 45 seconds for mine)
Note that you'll want to resize the fonts. Sometimes you can do this in config.js, but others you'll have to find the .css file that comes down with the module, look for something that ends with .px, and change the values to up the font size. I found that this varied by module.
I found that the time/date, weather, stock, and traffic modules worked really really well with this project. Media modules such as animated gifs or youtube do not work well on the Pi Zero W, so please be aware of that.
Next up are final thoughts and future plans...
This project was a lot of fun. It was a lot of hours of editing config files, 3D printing, and design work to get the case where it ended up. But in the end, it came together well I think and my wife enjoys the mirror (I'd built the first for a friend and she immediately wanted one too!). I'll likely build one more, and change some things up for style reasons, and some for performance reasons:
In the end, there's something about simplicity and being inexpensive. This project was just that for me, and assembling the second for my wife took me less than 15 minutes (outside of the 9 hours of 3D printer time :) ).
If you build one, please let me know, and if you have questions please leave them below or on the youtube channel and I'll work to answer them. The youtube video has a demo of the mirror at the start and end...it's hard to describe it in pics. It looks super clean next to a computer, on a bathroom counter, or on a bedside table. Also there are probably over 100 modules available...everything from computer stats to bitcoin prices. This really can become a heck of a data display, and because it has the computer in it, it runs separate of anything else (well except wifi :) )
Thanks for reading and hope you enjoyed this build!