WiC Projects Committee 2017-2018 Project.
Table of Contents
- Table of Contents
This year's project is a magic mirror or smart mirror. It functions as a mirror as it has a reflective surface but also includes helpful information as you get ready for your day. As for the technical setup of how it works, the basic setup includes a monitor powered by a raspberry pi with the Magic Mirror software installed on it. The software puts a full screen window of white text on a black background on the display so when a one way mirror is place over it, the white text shines through. Usually this mirror is actually acrylic where one side is see through and the other side is a reflective surface. The open source Magic Mirror software we used has built in and open source third party modules that do different things like show the weather, WiC's calendar, as well as the time and date. We also added sensors to the project which include voice command, audio response, a distance sensor, and a gesture sensor. These sensors interact with the modules or other code included on the pi.
This is a complete list of parts we used to create this project.
- Monitor: We used the Sceptre E series E205W 20" monitor. This model has the HDMI/VGA ports on the back but not along the side of the monitor making it easier to put in the frame and hook up to the pi. You can get this off of amazon or elsewhere. Note that if you change the monitor you will have to change the a lot of the other materials accordingly, as much of the measurements are based on that shape and size.
- Acrylic one way mirror. One side is reflective and one side is see-through. This is the one we used, it is 18" x 24" and 1mm thick, you want it to be pretty thin to make it easier for the light to shine through.
- Raspberry pi; we used a 3B, you will also need a micro SD card with a converter to go with it. You will need a micro-usb to usb and a usb power block for powering the pi. You will also need an HDMI to HDMI to connect the pi to the monitor.
- You have the monitor but you will also need a usb mouse and keyboard to setup the pi, which you might have lying around anyway.
- Optionally you can also get a case for the pi.
- Plywood 2x4s for the frame, we needed approximately 7ft with our plans which are later in this document
- Plywood sheets for the front part of the frame to make it look nice, and also for the back panel. You want to ask for the project board section in your local hardware store.
- Screws for putting the 2x4s together.
- Nails for nailing the plywood sheets to the front of the frame.
- Stain; the kind is up to you but we laser engraved part of our frame so to keep the engraving showing we used a lighter stain. You might want to just use a polyurethane coat to protect it.
- You also need brushes to apply the stain/polyurethane.
Sensor Related parts:
Our sensor work was based off of Thomas Bachmann's work and uses his module for the Magic Mirror software. We also used the exact parts that are listed in the hardware section of the readme for the project. We have reproduced this list below.
- Distance sensor: GP2Y0A21YK, incl. connector cable
- Gesture sensor: APDS-9960 on breakout board with gesture sensor on one side, but no other electronic component on the same side for easier assembly (can be found on Aliexpress)
- Micro-controller: Arduino (Uno), incl. USB cable - male to male
- Jumper cable to connect APDS-9960 with Arduino
- Pin headers to solder to connector cable of GP2Y0A21YK
Audio Sensor Parts:
We are able to control the mirror using voice and get a response using audio so we needed a mic and speaker.
- USB Microphone
- Bluetooth Speaker NOTE: We used a Raspberry Pi 3B which has Bluetooth capability, if using an older version you will probably need a wired speaker.
We used a Raspberry Pi 3B, running raspbian. We used the open source Magic Mirror software and it's modules to drive our interface.
Setting up the Pi
First you need to get raspbian onto the SD card if it isn't already. Raspbian's site has a great tutorial on how to do this that we followed. Plug the SD card into the pi, also hook up the monitor, keyboard and mouse to the pi. Power the pi on and make sure that raspbian boots properly; then you can move on to installing the Magic Mirror software, using their helplful docuementation. Try to start up the Magic Mirror to make sure it works, de-bugging as necessary. Once you get that done you need to start to install the modules.
Setting up Magic Mirror Modules
After setting up the Magic Mirror main software and getting the default setup to run, it's time to customize. We have the modules listed below, follow each link to the module's main page and follow their installation instructions. Any customizations to those modules will be listed below the list.
List of Modules and Configurations
The config.js file in the repo also has the list of modules and configurations for them. That file also indicated where the module is on the screen.
- Default/Core Magic Mirror software and modules
- We changed the compliments in compliments.js to mirror related puns
- Default clock module changed to our Eastern timezone
- Default calendar has been altered to point to WiC's Google Calendar as displayed on our website
- We commented out the default current weather module as we didn't want it
- We updated the Weather Forecast module for our location
- The gesture sensors has it's own README in the MMM-Gesures folder which is essentially copied over from the original repo
Customizations/Settings for Modules
Customizations for each module should be located in that module's files here in the repo. Look to the link to each module as listed above for more documentation information.
While researching this process we used many references including people who have done this kind of project before. We do this in the hopes that this may help future adventurers down this path.
- Magic Mirror Central
- MagPi Magazine - Issue 54
- Dylan Pierce blogpost Building MirrorMirror
- Xonay Labs Michael Teeuw blog post
All of the people who worked on this project to make it happen.