Mirror Mirror On The Wall, Who’s The Smartest Of Them All?

My attempt at building a smart mirror.

Mansi Katarey
7 min readDec 24, 2021
This is what I ended up with :)

For the past few months, I’ve been looking for a new mirror. I’ve probably looked on hundreds of websites, looking at all the different styles, colours and sizes of mirrors, but none were really what I was looking for.

And sure, some would say a few months is a long time to spend looking for mirrors. A really long time. But when you’re as indecisive as me, you tend to get lost in the sea of options.

Anyway, as I was looking one day, I found a rather unique mirror. It had a touch screen and sensors. You could control your music from it, see the weather, time and even the latest news.

And that’s when I realized, this wasn’t your average mirror; it was a smart mirror!

Smart mirrors are, as the name suggests, a mirror. Except it’s more than just a mirror. Think of your ordinary mirror. It shows you the reflection of anything in front of it. A smart mirror does that too, but it also has the ability to show you anything from the current time to the number of calories you’ve burnt.

I was fascinated by these smart mirrors. And right at that moment, I thought my quest for a new mirror was complete.

The keyword here is ‘thought’. Because you see, from that moment on, my journey had just begun. Now I don’t know about you, but $700 for a mirror seems a little pricey to me, even if it is a smart mirror.

I’ve also learned more about IoT recently and really wanted to build an IoT project and the smart mirror would be the perfect project.

So, I decided to build it myself. I’d never done anything like this before and to be perfectly honest with you, I don’t consider myself much of a “hands-on” type of person either. Yet I decided to go on Google and search for DIY smart mirror tutorials. I found a few super helpful ones, like this one from Wicked Makers and this one from Break It Yourself.

At first, I thought building a smart mirror would be super complicated, but it’s actually quite simple.

There are only three main components:

  1. A two-way mirror.
  2. A display.
  3. A computer of some sort.

(You can always add more to it, but these are the essentials)

The Two-Way Mirror:

The smart mirror uses something called a 2-way mirror. It’s basically a piece of glass or acrylic that is very reflective (reflective enough to look like a mirror) on one side but you can still see through it on the other side. In my case, I used a piece of acrylic. If you’re having trouble visualizing it, think of one of those mirrors used in interrogation rooms. The ones where x can see y, but y can’t see x.

As I was in the process of writing this article, I kinda went down a rabbit hole of two-way mirrors. Weird…I know, but I was curious to learn about how they actually worked in terms of light and reflectiveness and all.

Turns out, they work because of a principle called light intensity. Simply put, light intensity is the measurement of how strong/bright a light is.

So, if both sides of the mirror have the same light intensity, then the mirror will look just like a normal piece of glass. You would be able to see right through it. However, if one side is brighter than the other, then it will look like a normal mirror for people looking at it from the brighter side.

The same goes for when you look out the window at night. When the lights are on, you see your reflection in the window. But when you turn the lights off, all of a sudden you’re able to see the trees outside.

The Display:

The display can be a screen of any size. In my case, I used an old Acer monitor. The display can also be a TV, an Ipad/tablet or anything else that can display the information, like the time and news and such.

The display sits behind the two-way mirror displaying all the information. You want to make sure that your display is either smaller or the same size as your two-way mirror. You don’t want it to be bigger. Trust me…you don’t wanna go there.

The Computer:

The computer is the heart of the mirror, it runs the code that is eventually displayed. You want to make sure the computer you use is reliable. I used a Raspberry Pi 4 which was relatively simple and easy to work with. All I had to do was snap a few pieces together and the computer was built!

After reading a ton of articles about Raspberry Pi’s, I can (not so proudly) say that most of the stuff I read about the storage and RAM component of it flew over my head. But through all that research, I’ve understood just enough to know that a Raspberry Pi has more than enough storage to power a smart mirror.

There wasn’t much coding involved in the building of this smart mirror. I used the open-source MagicMirror² software by Micheal Teeuw. It had all the code needed for a simple magic mirror. I did make some changes to the code, like changing the greetings and a few other things as well. I also added Spotify’s Web API to display the current song, because…well why not?

The Technology Behind it All: The Internet of Things

What is IoT?

Think of it this way: you walk into a huge library and there are rows and rows of shelves with hundreds of books stacked up neatly beside each other. You need to find this one book, what do you do? I’d go to the librarian, provide the title and likely be told exactly where the book is. The exact shelf, in the exact row on the exact floor. All that is possible because when a new book is added to the library, details about it are stored in the library’s Internet of Books.

Now zoom out — imagine the whole world is your library. Every TV, fridge, vehicle, basically everything are your books. Add some smart sensors to them and now they can talk back to the “librarian”, telling you exactly which “shelf” they’re on.

The system that allows them to do this is known as the Internet of Things.

It’s a huge network with connected devices that share information with each other. Almost every piece of technology or device you come across has sensors that are constantly gathering information. IoT allows these devices to share their gathered information. On an IoT platform, the data is analyzed and extracted for important information, then sent to the other devices via the internet.

In more complex smart mirrors, IoT is used to allow the sensors and display to “talk” to each other. The data collected by the sensors is sent to an Arduino microcontroller, which is then sent to the Raspberry Pi to display the collected information. All of this happens within a matter of seconds.

The circuit

The Process

Honestly, building this mirror was a process. It was an emotional rollercoaster, to say the least. One minute the code worked perfectly and the next minute the monitor wouldn’t turn on. But this process is better shown than told, so check out this video for a behind-the-scenes of this tumultuous journey.

Check out my smart mirror vlog!

Current & Potential Uses Cases: Fitness Mirrors, Interactive Fitting Rooms and Health Monitoring

Outside of being just hobby projects, smart mirrors are actually being used in the real world.

Exercise: Fitness Mirror

The pandemic brought rise to at-home workouts and fitness devices. And if you’re into that stuff, I’m sure you’ve heard of smart mirrors from Lululemon, Peloton and Tonal. Known as the “world’s first almost-invisible gyms,” they’re smart mirrors designed to help you burn calories and gain muscle!

They work thanks to the IoT network. See, the multiple ultrasonic and infrared sensors on the mirror allow for it to detect things like your height, weight, etc. Other Bluetooth-powered options are available if you really want to step up your game.

Retail: Polo Ralph Lauren Interactive Fitting Rooms

Polo Ralph Lauren also came out with their own mirror, designed to help people with the daunting task of buying clothes.

The Polo Ralph Lauren Interactive Mirror

Smart Mirrors for Health Monitoring:

The potential application of IoT-based smart mirrors to monitor patients’ health didn’t even cross my mind, but when I read about it in Science Direct, my mind was actually blown. It can do this by using multiple different sensors to collect biometric and physiological data. This data can be sent automatically to doctors to review and assess. The concept of it being in a mirror also makes it easier and more natural for patients, especially elders.

Building this mirror took me about 3 months. It definitely could have been done faster, but I decided to take my time with it. That and also the fact that I was just being lazy. But aside from my expert procrastination skills, this project was really fun! Sure, some days it had me questioning my life decisions, but once you get past the hurdles, it’s a pretty awesome project indeed.

This is just one potential lifestyle implication of IoT, but there are so many more that can completely change the way our world works! And I can’t wait to build them :)

Thanks for reading! If you have any questions or would like to chat further, contact me at: mansikatarey@gmail.com or contact me through LinkedIn.

To keep up with everything I’m doing, subscribe to my newsletter!

--

--

Mansi Katarey

Passionate about AI and how it can solve problems around the world!