Introduction: C.Q : a DIY Smart Mirror

We are Katrina Concepcion and Adil Qaiser, both sophomores at WBASD STEM Academy. This is the project that we would've collaborated and done for this year's best award.

When we decided to do this project, we had in mind "what would be the most efficient way for a person to get ready and look at what they have planned for the day?" We came up with C.Q. It uses a regular two way mirror for your own usage and a monitor to display the different information segments. Combined with MagicMirror,you can customize what information segments you want to be displayed, such as the time, weather and many more! The application uses Raspberry Pi and it requires the use of WiFi and LCD output display. This is also Google enabled, which can customize the different segments of the display. This is an instructable on how to make and set up C.Q.

Supplies

Materials
  • Pieces of wood
  • Wood Glue
  • Screws
  • Two way mirror
  • Raspberry Pi 3b+
  • Monitor
  • Blackout cloth
  • 5V power supply
  • 12V power supply
  • HDMI cable
  • Extension chord
  • SD Card Adapter
  • MicroSD
  • Microphone

Raspberry Pi links

Step 1: Making the Frame

The Outer Frame:

Cut 4 pieces of wood for the outer frame. Cut a 45 degree angle at the corners of the pieces. Connect these pieces with glue and put nails in to give it more support. (pic 1)

The Inner Frame:

Cut 4 pieces of wood fit to the size of the mirror.

Connect these pieces with glue and nails for support. (pic 2)

Putting the two frames together:

Lay the outer frame flat on the ground.

Then, measure a half inch from each side of the outer frame and mark it. This is to ensure the mirror has a enough space to be placed on without falling off.

Glue down the inner frame within the lines that were drawn. Put some weight on it and leave it to dry overnight. (pic 3)

Both Katrina and Adil would've worked together in making the frame.

Step 2: Steps of Setting Up the Raspberry Pi 3

Step One (The Setup)

The first step is to download the Voice Kit SD Image from https://aiyprojects.withgoogle.com/voice-v1/

Then use Etcher from https://etcher.io/

Select the newly downloaded Voice Kit SD Image and the Micro SD Card and then press flash.

Plug in your Raspberry Pi and use the VNC Viewer to view the Raspberry Pi.

Next step is to connect your Raspberry Pi to Wifi and make sure the time and date are correct.

Then update your Raspberry Pi using these commands:

sudo apt-get update

sudo apt-get dist-upgrade

Reboot your Raspberry Pi

Step Two

Go to the top left preferences and make sure your speakers and microphone are set up correctly and check the audio.

Open Chromium and login, go to GoogleAPIs and create a project, enable APIs and enable google assistant, click create credentials and create Client Id, then click "Configure consent screen" and set the product name (it is preferable to keep everything consistent) after that press save, press other and put in a name.

After doing that you can download your file, right-click on the newly-downloaded file and press "show in folder" and rename it to Assistant and drag it to the "pi" folder

Go to https://myaccount.google.com/activitycontrols?pli=... and ensure the "Web & App Activity" is enabled, "Device Information" is enabled, "Voice and Audio Activity" is enabled.

Go to your folder and go to /home/pi/AIY-projects-python/src/examples/voice, then execute asistant_library_demo.py and then chromium should popup and you will have to log into chrome and press allow.

Step Three

Go into Raspberry Pi Configuration, go to Localisation, set your location to your country, set your timezone (Area: US, Location: Eastern for me) now you will have to reboot.

Install MagicMirrors 2 into your Raspberry Pi

You can easily install it by using the bash command:

bash -c "$(curl -sL https://raw.githubusercontent.com/ MichMich/ MagicMirror/ master/ installers/ raspberry.sh)"

(remove all spaces past the github link as this was the only way to make the whole command )

When the prompt shows up press y and enter and it will set up auto-start of the MagicMirror

Step Four

Open your developer terminal and write pm2 stop MagicMirror

Then open up your folder and go to /home/pi/MagicMirror/config and open config.js

Here you will change the timescale to "12" and the units to "imperial" if those apply to you.

Remove from the "{" above "module: "alert"," to the }, below "Position: "top_bar"" and save now open the developer terminal and go to the internet and go to https://openweathermap.org/api and sign up.

Then go to home then API keys copy the API key then go back to the config.js file and paste the API key where it says "YOUR_OPENWEATHER_API_KEY" in the "currentweather" module and the "weatherforecast" module, and save.

Step Five

Now you will open up MagicMirror by writing "cd MagicMirror" press enter and then write "npm start"

Copy the link above where you pasted the API key and paste it in chromium and find your location id by pressing "CTRL+F" also rename the the "Location". Now reopen the developer terminal and write "npm MagicMirror" and you should be ready!

Adil would've done a majority of this part.

Step 3: Assembling Components Inside

Cut out a piece of blackout material to the size of the mirror.

Have the monitor fit on one half of the mirror and put the blackout material on the other half. Make sure the cloth does not cover the monitor.

Cut out smaller pieces of wood to keep everything place in the back. Assemble those pieces together. Then screw this smaller frame into the inner frame.

Drill a few holes on where the monitor is situated for ventilation. The attached image is a diagram of what it would look like.

Katrina would've worked on a majority of this part.

Step 4: Wiring Everything Together

Stick the Raspberry Pi on to the back of the monitor, near the monitor control board.

Connect the two with the HDMI cable.

Place the microphone outside of the frame and connect it to the Raspberry Pi.

Plug the 5V power supply to the Raspberry Pi and the other end to the extension chord.

Plug the 12V power supply to the monitor control board and the other end to the extension chord.

Screw everything in place.

The attached picture shows a diagram on how the wiring would look like from the back side.

Katrina and Adil would've done the wiring together.

Step 5: The Final Product

This is the mock up of what the final product would look like. You can see that the monitor display is showing through the mirror, indicating the day, time, weather and calendar. The other half will be mainly just a mirror for use. You can connect this to Google for more customization and easy use. C.Q. can be placed anywhere in your house or office.