This project is a Raspberry Pi based two-way mirror with an electronic (in oure case: LED) display behind semi reflecting glass. The smart mirror allows you to swipe between various pages that display information like the latest news, the weatherforcast, your calender, live footage of the ISS, daily jokes, broadcasting.... and so much more!
In terms of software, we have chosen for the open-source ’MagicMirror²’ software that runs on an Raspberry Pi 2, 3B+ or 4B with Raspbian installed. This makes it very easy to customize the layout of your mirror (add, create, change different modules).
The custom designed backplate allows you to: easily mount all the electronics, hang the mirror on the wall (landscape or portrait), and customize the sides of your mirror in any material like wood, metal, plastic.
Below, you can find the specs/features that you need to know before building this project!
-
24" LED monitor
We used a 24 inch LED monitor from LVC. But any monitor with a HDMI input will work! -
Two way mirror glass
The glass is custom made and has a translucency of about 35%. The borders of the mirror are opaque. The Technical drawing for this glass can be downloaded here Two-way mirror.pdf. A very nice and easy way to get some 2 way mirror glass is here: https://www.pyrasied.nl/en/product/spy-mirror/. You just have fill in your dimensions, and it will be shipped within a day.
PAY ATTENTION: the dimensions of the glass are based on the LED monitor we use! Be sure to adjust them to your monitor. -
Aluminium backplate
The backplate is custom made, the technical drawing and production files can be downloaded Here: Aluminium backplate files. It has multiple purposes as mentioned before, here is a detailed list:
- Concealment for the wires and electronics like the Raspberry Pi, infrared sensors, motion sensor, power supply, connector board
- Easy wall mounting in landscape or portrait orientation
- Brackets with threaded holes, so you can customize the sides of your mirror in any material like wood, metal, plastic….. Max. thickness of the material should be: 10mm. Check out the picture below for an example with lasercut plywood of 6mm thick with a side finish. The lasercut files are also available for download above.
-
Raspberry Pi 3B/B+ or 4B set, which can be found in the Whadda PI4SET
- Raspberry Pi (3B/B+ or 4B)
- >= 8 GB MicroSD Card
-
Connector PCB
This is a custom designed PCB that extends some of the GPIO pins of the Raspberry Pi. The production files and schematic can be downloaded here: Connector PCB Files (If you search on google for a PCB manufacturer, upload the production files we provided, you will get an instant quote and in most cases it only takes a few days to make the actual PCB.) This board allows you to easily connect the infrared sensors, motion sensor and safely power LED strips without the need of soldering, and blowing up your Raspberry Pi. -
IR sensor (VMA330)
The IR sensors are used to swipe between pages, these are also mounted onto the backplate -
PIR motion sensor (WPSE314)
The motion sensor or PIR sensor detects if there is any movement within its range. If so, the mirror will turn on. This is also mountable on the backplate. -
Aukey Power adaptor
We've used an power supply from AUKEY. It has 5X USB 3.0 ports with quick charge function, to power up the Raspberry Pi and the LED strips (optional). There are 3 spare USB ports. This Power supply is also integrated in the back plate, but any decent power supply will work. -
USB A - USB C cable (min. 50cm long)
-
USB A - Micro USB cable (min. 50cm long)
-
Sensor Cables 650mm (x3)
These cables are used to connect the IR and PIR sensor to the Connector board. You can easily make them yourselfs! technical drawing can be downloaded here: Sensor cables.pdf -
Power cord to C13
-
40-PIN ribbon cable Female- Female
-
Splitter cord C14 TO C5 & C7
-
HDMI - HDMI cable (short as possible, we used 30cm long one)
-
Bolts
- M2X14 (x2)
- M2.5x8 (x10)
- M2.5x5.5 (x2)
- M4x10 (x4)
-
Plastic spacer 5mm height M3 (x12)
-
Strong double sided tape
-
Cable ties (x20)
-
open source-software "MagicMirror²"
More information about this software can be found here: (MagicMirrorsoftware) -
[OPTIONAL] LED strip assembly.
The technical drawing can also be downloaded here:LED strip assembly -
[OPTIONAL] Side Finishes.
You van customize the sides of your mirror with any material you like that has a maximum thickness of 10 mm. We did it with 6mm thick lasercutted OKOUMÉ wood. The Lasercut files can be downloaded here: Side Finishes.pdf
- USB Keyboardz
- USB Mouse
- Internet connection (WiFi or wired ethernet)
- Hex keys
- .....
To install the software onto your Raspberry Pi easily, we've made an image file that contains Raspbian (the standard Raspberry Pi OS) and the MagicMirror software with a variety of fun modules already installed. See the pictures below to discover how we designed the interface.
The front Page It Shows the Date/time, daily news from over the world, Belgium holidays( can be changed to any country), different time zones.... When powering up the PI, u should see this.
Page 2 The "SPACE" page. It shows various information about past en future space travels, LIVE ISS footage, current moonphase....
Page 3 Displays Reddit gaming topics, featured games, A qoute of the day and a new coctail every day!
Page 4 Connect your phone/tablet using screen mirroring
If you like our interface, you can follow the steps below to install it on your Raspberry Pi. Otherwise you can download a standard version of the magicMirror software and design your own interface! This is also very fun and easy to do! Just follow this guide.
- Installing Raspberry Pi Imager
To burn the image on an SD card, we wil need a software to do this. Download the Raspberry Pi Imager here. Then run the installer and follow the prompts to complete the setup.
- Downloading the Image
Download the SmartMirror.img file here file here (5.6GB). As mentioned before, you will need an SD card with a minimum storage of 8GB.
- Formating your SD card
Before we can burn the image file, We will have to format the SD card. ATTENTION, this will delete all the files on the SD card.
- Plug your SD card in a computer.
- On Windows, open File Explorer and right click on the drive, then choose format.
- Under file System, choose NTFS. the rest should be good by default. (you can give the SD-card a name in the
Volume label
textbox
- Burning the Image
- Open the Raspberry Pi Imager
- Click CHOOSE OS and then select USE CUSTOM
- Navigate and select the SmartMirror.img file you just downloaded
- Now click storage and choose the SD card we formatted earlier.
- Its time to WRITE the image, this will take several minutes.....
If everything went good in the steps above... you can mount the SD card into the pi and connect all of your peripherals (mouse, keyboard, monitor). Also plug in a network cable if you're planning to use a wired ethernet connection. Power up the pi by connecting it to the USB power supply adapter.
Now wait for it to boot up, this will take couple of minutes depending on what Pi you use. The MagicMirror software should also start automatically and you should see THE FRONT PAGE.
For now we will just put some settings right, Follow the steps below:
- Close the MagicMirror software (For Now)
- Press
F11
on your keyboard (this will make the MagicMirror window smaller) - then open the terminal with
CTRL + ALT + T
- Type
pm2 stop mm
this is the command to stop the MagicMirror Software- other usefull commands are
pm2 restart mm
restarts the softwarepm2 logs mm
shows log filespm2 show mm
Shows proces information
- If the keyboardlayout is wrong go to
Application menu (RPI logo top left corner) > Preferences > Keyboard and mouse
- Then click
Keyboard layout
and select you country under the drop down menu.
- other usefull commands are
- Connecting with WiFi
If you are going use an ehternet (UTP) cable you can skip this step. otherwise you can connect to a Wifi acces point by Clicking on the 'connection icon' in the top right corner...
- Horizontal or Vertical display
As mentioned before you can choose to hang the Mirror horizontally or vertically. If you are going to hang it horizontally you can skip this. if you plan to hang it vertically, we will have to change the display orientation:
- open the terminal with
CTRL + ALT + T
and typesudo nano /boot/config.txt
- change the line
display_rotate=0
todisplay_rotate=1
- Close and save the file wit
CTRL+X
thenY
and pressENTER
- The changes only take effect after a reboot. In the terminal type
sudo reboot
and pressENTER
The config file controls some important features of your mirror, as well as the various modules. It is written in JavaScript, this language is very sensitive to syntax errors. for example a misplaced {
or }
and the software will not work...
The config file also contains a modules
section that controls which modules are loaded and where they’re placed.
- The congif.js file is located in the file manager under
/home/pi/MagicMirror/Config
- at the top of the config.js file U can change the unit system:
metric or imperial
, languageen
(uses the official abbreviations) and the timeformat12 or 24
. - We have divided the config file with the modules per page using brackets
- In the example below u can see the configuration of the REDDIT module.
- Each module has its own github page with all the explanation about it here 3rd party modules GitHub for example the Reddit module settings can u find here: Reddit module
Now that you have the software installed, and know all the necessary information about the parts, it is time to start making the smart mirror. This will probably take up to 2 hours (when you have all parts already).
WE WILL ASSEMBLE A HORIZONTAL VERSION OF THE SMART MIRROR. As metioned before, the backplate is designed to hang horizontal or vertical.
The only difference between the horizontal and vertical way, is the location of the IR and PIR sensor on the backplate. Below and illustrarion.
Landscape orientation sensors
Portrait orientation sensors
- Place the ALUMINIUM BACK PLATE on its flat side.
-
The first things we will mount are the IR SENSORS. Collect them, together with 2x SPACERS and 2x M2.5x8 BOLTS.
-
Place the SPACER over the hole in the bottom left of the BACK PLATE.
-
Place the IR SENSOR on the SPACER as shown in the picture below. Allign the hole from the IR SENSOR with the hole from the SPACER and the BACK PLATE.
-
Repeat the last 3 steps for the IR sensor at the bottom right of the BACK PLATE.
-
Place the PIR sensor on the bottom "lip" of the BACK PLATE and screw it into place. ATTETTION: IF YOU WANT TO MOUNT IT VERTICAL, PLACE THE PIR SENSOR ON THE LEFT "LIP".
-
Take the aukey POWER SUPPLY (any decent power supply will work, but the BACK PLATE is designed with this one).
-
Place the POWER SUPPLY in the slot of the BACK PLATE as shown in the pictures below. NOTE THE ORIENTATION!
-
Take the cable assemblies. As mentioned earlier, you can make these yourself easily.
-
Connect the cables to the 2 IR SENSORS and PIR sensor as shown in the picture below (see connection diagram for connections).
-
Place a zip tie around the cable of the left IR SENSOR. Then cut off the excess with cut pliers.
-
Place the SPACERS onto the 4 holes (sligtly on the left of the bottom middle) of the BACKPLATE.
-
Place the RPI on the SPACERS, allign the holes from the RPI with the holes from the SPACERS and the BACK PLATE.
-
Place a zip tie around the cable of the PIR SENSOR. Don't forget to cut off the excess material.
-
Now place zip ties around the PIR and IR SENSOR CABBLES as shown in the picture below.
-
Place the SPACERS onto the 4 holes (sligtly on the right of the bottom middle) of the BACKPLATE.
-
Place the CONNECTOR BOARD on the SPACERS. Again, allign the holes from the CONNECTOR BOARD with the holes from the SPACERS and the BACK PLATE.
-
Connect the LEFT IR SENSOR and PIR SENSOR to the connector board. (Check out the connection diagram)
-
Secure the CABLES from the RIGHT IR SENSOR with 2 ZIP TIES on the BACK PLATE, as shown in the picture below.
-
Take the UBS A - MICRO USB CABLE (USB A - USB C if u use a RPI4).
-
Secure the USB A - MICRO USB CABLE and the cable from the LEFT IR sensor with a zip tie.
-
Then secure the rest of the USB A - MICRO USB cable with 2 zip ties as shown in the picture below.
-
Take your USB A- USB C CABLE and connect it to the CONNECTOR BOARD.
-
Secure the USB A - USB C CABLE with 2 zip ties as shown in the picture below. Do not secure the others yet!
-
Connect the USB A - USB C CABLE to the power supply. Roll up the excess of the cable (CABLE MANAGEMENT is important!).
36 Now connect the USB A - MICRO USB CABLE to the power supply. Again, roll up the excess of the cable.
37 Secure the 2 USB cables with zip ties.
40 Connect the POWER CORDS C13 to the C14 of the SPLITTER CORD.
-
Place the cable assembly on the backplate as shown in the picture below. Pay attention to the orrientatien (the SPLITTER CORD needs to be upwards).
-
Secure the C5 cable end from the splitter cord with a zip tie like in the picture below.
-
Connect the C7 CABLE end from the splitter cord to the power supply.
46.Secure the C7 CABLE end with zip ties.
-
Take your 40PIN RIBBON CABLE, and connect it to the CONNECTOR BOARD. Note the orientation of the RIBBON CABLE!
-
Connect the other end of the RIBBON CABLE tot the RPi. Fold the RIBBON CABLE like in the picture below!
-
Take your HDMI - HDMI CABLE. (If you are using a RPi 4 this wil be MICRO HDMI - HDMI).
-
All the electronics are now mounted on the BACK PLATE. Everything should look like this:
- Place the MONITOR WITH MIRRORGLASS in front of you, faced down. BE CAREFUL TO NOT SCRATCH THE MIRROR GLASS: Put something underneath it like a blanket or some foam!
2.(OPTIONAL) stick the LED STRIP ASSEMBLY on the back of the glass. PAY ATTENTION TO WHERE THE CONNECTOR IS LOCATED!
-
Place the BACKPLATE under the MONITOR/MIRRORGLASS ASSEMBLY, note the orientation!
-
(OPTIONAL) Plug in the LED STRIP ASSEMBLY to the CONNECTOR BOARD.
-
Carefully turn the BACK PLATE on the monitor, make sure the C5 CONNECTOR is still accessible.
-
Now align the holes of the BACK PLATE with the mounting holes of the MONITOR.
As metioned earlier, u can customize the sides of your mirror with any material you like that has a maximum thickness of 10 mm. We did it with 6mm thick lasercutted OKOUMÉ wood. The Lasercut files can be downloaded in the main brach of this project.
The 8 brackets (2 on each sdie) on the BACKPLATE that will hold the side plates are threaded with M4 thread. so you will need 8 M4 bolts. The length of these bolts depends on the thickness from the material you are going to use.
HORIZONTAL/VERTICAL side plates: depending on which orientation you have chosen to hang up the mirror, there are different side plates.
RED RECTANGLE: VERTICAL MOUNT
BLUE RECTANGLE: HORIZONTAL MOUNT