Magic Mirror

Hello there. You look nice 🙂

Yes, it’s always great to get compliments. Wouldn’t that be great if your own reflection greets you with compliments and notifications?  Now that’s what this project is about. It’s an ordinary mirror that shows a bunch of information every time you look at it.

The Concept

When a dark surface is placed along the back of a one-sided mirror, it acts just like a normal mirror.
So we put an LCD panel at the back of the mirror and everything would look normal. When the LCD panel is turned on, only a fraction of the light will be transmitted to the front(since One-sided mirror blocks around 50% of the light).
If we display a black and white image in the panel, just the white portions will be visible(Since the rest is blacked out, it just act a mirror)
This is what we are about to exploit.

We can use any kind of hardware and software combinations to support the display. I have used an old laptop screen and a raspberry pi.
For Display, we could use virtually any LCD panels, TVs, Monitors, etc.. and For the back end, an old PC/laptop/things like the raspberry pi or even android.

This concept is not new, this has been around since the 2000’s. There are various implementations.I’ll give the links below.

This particular implementation, though, that has a large user base and community support.- MagicMirror2.

Which Implementation should I choose?

It depends on what you want the mirror to do, say if you want to connect a lot of sensors to the system, then you would be better off with a system that supports GPIO pins like the raspberry pi.
If you just want the notifications[like calendar, weather forecast, ToDoLists, Alarms, news and much more, if you can imagine it, you can make that info available 🙂 ], then you could repurpose your old PC or laptop and use that as the backend.

You could never go wrong with the display panels. Go with the one you want/have. If you have a spare monitor. Go pry out the panel 🙂


Two terms. Electron. NodeJs

Heard of Electron? If not, it’s a framework that can create GUI based on a web page. Simply put, it’s more like the chrome browser is running fullscreen. Electron has a greater support for NodeJs(JavaScrit is Amazing! and NodeJs is even better!)

The idea is to create a server using NodeJs and display the output as an application using Electron. Since what runs on the server determines what’s on display, that’s our primary focus.

To get the basic GUI up and running in electron, there is a format. We also need to take care of some background process. Luckily, we wouldn’t have to do any of that. The MagicMirror2 framework does just that.
Say, you want to have your twitter feeds in the mirror. You just have to write an application that connects to twitter API to get your feeds and pass that to the framework. Done.
Like this, items are split into modules, each module has some functionality like displaying Instagram feeds, News etc. Remember to check the forum as, chances are, somebody might have already developed a module for your needs.

My Mirror

The way I went – in a nutshell.

  • I had a spare laptop LCD panel lying around. To make use of that like an external monitor, an LCD controller board was used.
  • Bought the raspberry pi and a few sensors. Like the SR04(Proximity) and DHT11(Temperature).
    Installed Jessie lite and a few dependencies like nodeJs and loaded the mirror code.
  • Tried building the mirror frame with MDF but couldn’t get the required finish. Hence got the frame cut out from a frame shop for my required dimensions.
  • Bought a cheap one-sided mirror with matching dimensions of LCD panel
    Connected all the components and DONE!

Though implementation was done on the raspberry pi, modules were developed in a windows machine. It’s much easier that way.

Cost Break Down

One sided Mirror – Rs 80 (1.2$)
LCD controller board –  Rs 1200 (19$)
Raspberry pi – Rs 2897 ($42.71)
Sensors – Rs 400 (5.90$)
Frame – Rs 200 (2.95$)
Small Breadboard – Rs 150(2.21$)

Total – Rs 4927 (72.63$)

Since the LCD controller required 12V and the pi required 5V, two adapters were needed. To eliminate the same, a backup UPS was modified accordingly. Read about the UPS Hack here.

References : 
Start Here – magicMirror

For Raspberry Pi based implementations – Installation(Jessie Lite)
Detailed Setup

The complete code base of my application is here.

Happy Tinkering 🙂


2 comments On Magic Mirror

  • Hi, first of all let me congratulate you for your work. I got the idea what you were explaining in the first or second para. But didn’t understand what actually your project was. I don’t know much about the electronics stuff. Can you explain me please?
    Regards, Rakesh, ’14 pass out, mech, mcet

    • Hi Rakesh,

      Briefly speaking, the project is a mirror that displays information and notification when you look into it.

      The Concept para explains how the mirror is able to display information in its technicality.

      There is more than one method of implementing the concept. Even with just an android device, you could implement the same. The Implementation part deals with the way I went with it i.e with a microcontroller and a display panel.

      It would be great if you could point out which section lacks clarity, I would be happy to get in depth.

      Thank you very much for dropping by. 🙂

      Cheers 😀


Leave a reply:

Your email address will not be published.

Site Footer