Leo Goldschmidt's profile

Personal Assistant Mirror

Personal Assistance Mirror [P.A.M]
Background
The Personal Assistance Mirror was my high school senior project and marks my entrance into project design, coding, an in a sense the engineering process as a whole.

So, what is it?
The Personal Assistance Mirror (or P.A.M for short) is essentially a smart mirror that can display various pieces of information such as weather, calendar events, and time and date among other things. It is based around the open source platform MagicMirror2, which is made specifically for this project and is built for customization and modification.
How Does it Work?
The core concept has to do with how a 2 way mirror works. the non mirror side of 2 way mirror can let light through to the other side. Therefore by putting a computer monitor behind the mirror you can pass light from the monitor to the other side of the mirror. Some form of computer (usually a Raspberry Pi or similar) host a black and white screen displayed on the monitor where the black pixels doesn't show through but the white pixels do.
Image taken from MagicMirror2 website, Link provided above.
Goals and Features
Although this project is open source I didn't want to make it a standard digital mirror project. the reason I picked the project in the first place was to teach myself how to design and code but also have a safety net of open source software if I something wasn't feasible. Therefore I had a few goals for what I wanted to implement in this project.
Goals:
- Have a functioning digital mirror
- Implement some form of voice control assistant
- Have a control panel for manual operations
- Use a motion sensor to wake and sleep screen to save power.
Design features:
- Raspberry Pi 3 as host for software and display
- Custom control panel with speakers and microphone
- dedicated power button
- switch for toggling cooling fan power
- LED indicators for cooling fan power, powering down, and motion detection
- Passive infrared sensor for waking the monitor
- Ventilation fans for monitor and Raspberry Pi
- Voice control


Building Process
General Build:
As shown above, the process took a significant amount of woodworking, wiring, soldering, and management. The simple wooden frame holds the monitor in and has a routing hole in the back for power, and connection to the control panel. The Panel itself has a custom styrene plate to house buttons and switches.
Coding:
Most of the Coding I had to build from the ground up was done in Python. However a lot of work was also done in JavaScript as that is what the MagicMirror2 software is coded in. There was also a significant amount of using Linux Shell via a terminal and SSH which meant a lot of manual Compiling (and I mean A LOT of compiling).

Here is just a bit of the custom code I made that went into the motion detection and screen activation.
The code is clunky. This is some of the first code I had ever written and is therefore a mess of logic gates, conditionals, and global variables. Despite it being a little rough it actually worked perfectly as intended and was able to wake and sleep the monitor with a motion sensor.

Dealing with voice control portion:
This is actually where most of the failing and learning happened. It turns out having a voice controlled assistant is very difficult, especially for how novice I was at the time. The goal wasn't to build a custom speech library, simply to implement one and get it working. In short I wasn't able to do it the way I wanted despite spending a few months on it. In the end I ended up using an Amazon Alexa API and used some open source software to interact with it. The major issue with this was it wasn't able to use a wake word and required a manual input to listen.
Conclusion
In short, this is easily one of the most important projects I ever decided to take on as it ended up teaching me the groundwork for a lot of important skills. It essentially is the reason I am a capable coder today as it forced me to sit down and learn and think about how to program. It also helped me bridge the gap between, electrical components, software, and building a design.
Personal Assistant Mirror
Published:

Personal Assistant Mirror

Published: