Introduction: Halloween Magic Mirror
BIGGER! LOUDER! SCARIER!
Last year I made my first Halloween prop and although I was quite satisfied, it did not really scare kids. This prop will scare kids (and adults alike) even more when you turn up the volume. When I first saw the magic mirror from Michael Teeuw I wanted to build one in Halloween style. So here it is. It will take quite some money (depending on what you already have at your disposal). It will take some time to build (depending on your woodworking / computer skills more or less time).
The magic mirror has a IR sensor which will detect if someone is in front of the mirror. When they are, a video will play through the victims own reflection! Pumping the sound up will add to the scare factor. When they take to long, the mirror will call out "Mirror, mirror on the wall, who it the scariest of them all?". In the video, the mirror speaks in Dutch.
Do not worry about the time or money. If you like Halloween, it will be worth it!
Step 1: Requirements
- An old frame or some wood to build your own frame
- A two way mirror (I ordered mine at Mirror glass it seems to be out of stock there, you could also try http://plexiglasstunter.nl/plexiglas-spionage-spi...
- An old lcd monitor (the larger the better, 17" will make a small mirror, I used 24” which seems fine)
- Raspberry Pi (I used version 3, but version 2 should be OK as well)
- Your own copy of Atmos FX Ghostly apparitions
- Amplifier and speakers
- Cabling; power cords, hdmi cable, audio cabling
- Additional wood to create a stand if you need one
- Power tools; miter saw (one with a rotating blade), drill, etc.
- Sharp GP 2 Y0A 02 YK distance sensor (20-150cm, 1 - 5 feet), MCP3008-I/P chip and some wiring
Step 2: The Electronics Parts
Soldering the distance sensor
You can use the following fritzing schedule to connect the distance sensor to the Raspberry Pi (this was borrowed from Tutorials Raspberry Pi)
Wiring scheme:
Pin 1 (Pi) Pin 16 (MCP)
Pin 1 (Pi) Pin 15 (MCP)
Pin 4 (Pi) VCC (Sensor)
Pin 6 (Pi) GND (Sensor)
Pin 6 (Pi) Pin 14 (MCP)
Pin 6 (Pi) Pin 9 (MCP)
Pin19 (Pi) Pin 11 (MCP)
Pin 21 (Pi) Pin 12 (MCP)
Pin 23 (Pi) Pin 13 (MCP)
Pin 24 (Pi) Pin 10 (MCP)
Pin 1 (MCP) Data (Sensor)
I used quite long wiring to the sensor (and short cables to the chip). This will enable you to place the sensor anywhere you want later. You need the chip as the Raspberry Pi cannot read the analog data from the sensor directly, it needs a conversion by the chip first.
Step 3: Configuring the Pi
Installation of Raspbian
The Raspberry Pi will need a power supply and a SD card (use 8GB or larger). First you need to install Raspbian Jessie on the Pi (https://www.raspberrypi.org/documentation/installation/installing-images/), I used the desktop version. Follow the instructions on the website to install Jessie on the SD card. Hook up a keyboard and mouse to the Raspberry and start your Raspberry Pi with the SD card inserted and connected to the monitor. The installation will start and after a while you will be in the desktop of Jessie.
Copying the required files
I used the hard-core way of setting up stuff, but it's probably easier for most to use the GUI. Convert the following files from the Atmos FX DVD (in VIDEO_TS) to .mp4: VTS_10_1.VOB, VTS_26_1.VOB, VTS_42_1.VOB and VTS_58_1.VOB (use your favorite tool and check google for instructions or use an online conversion website, e.g. VOB to MP4 converter).
You will also need a .mp3 file to call (un)willing victims. You can rename one of the supplied .mp3 files or you could ask your mother in law to record your own .mp3 when she comes back from the flight on her broom... Add MagicMirror.py, all .mp4 files and mirror.mp3 to an USB stick on your computer and insert it into the Pi. Use the file explorer of Jessie and copy the file "MagicMirror.py" to the homefolder of the pi user (/home/pi). Place the .mp4 files and the .mp3 file in the same folder.
Setting up Raspbian
Launch the LXTerminal (or another terminal) and type the following command to check required software:
omxplayer
If the program isn’t available, you can install it with the following commands:
sudo apt-get update
sudo apt-get install omxplayer
Type sudo nano /etc/kbd/config
Then change the BLANK_TIME to 0
Insert the SD card in a laptop and modify the file /boot/cmdline.txt (make a copy of this file!). Add the text consoleblank=0 to the end of the line.
Now it's time to get access to the pins of the Raspberry Pi
Enter the following command in LXTerminal (or another terminal): sudo raspi-config
Choose option 8 (Advanced Options), choose “A6 SPI” and choose “Yes”. This will enable the pins after a reboot of the Pi (Edit: In Raspbian Stretch this seems to have moved to option 5 (Interfacing options), thanks to brackenb5 for the info).
In the same LXterminal (after exiting raspi-config) type: sudo nano /etc/modules
At the end of the file add: spi-bcm2807
Save the file and exit the nano editor.
In the LXterminal enter the following commands:
sudo apt-get install git python-dev
git clone git://github.com/doceme/py-spidev
cd py-spidev/
sudo python setup.py install
Now restart the Raspberry Pi to enable access to the sensor, after the reboot launch a new LXTerminal and type:
python /home/pi/MagicMirror.py
The Magic Mirror should start and when the sensor detects an object within specified range, the first movie will play. When you are satisfied with the results you can make the program start automatically at startup. Press CTRL + C to end the program and type in the terminal application:
sudo nano /home/pi/.profile
Add the line:
python /home/pi/MagicMirror.py
at the end of the file and save the file.
Final details
sudo raspi-config
Here you can change the default password (option 2, not necessary if the Raspberry Pi will not be available from the internet) and you will be able to make it boot to a text console. Choose option 3 (Enable Boot to Desktop/Scratch), select Console Text console, press to move to Finish and quit the tool. When prompted to reboot, choose Yes. After a reboot the Raspberry Pi should start in console mode and run the program automatically.
Please note that the audio jack on the Pi has a low volume. I used the HDMI audio to the monitor and the headphone out on the monitor to get the sound to the amplifier. The audio will be a few times louder this way. Alternatively, you can increase the volume of the .mp4 and .mp3 files using MP4 louder and / or MP3 louder
If you setup the Raspberry Pi for remote access, you can ssh to the Pi and watch the status of the mirror:
tail -f /home/pi/Logging.txt
I made sure that all this worked before moving on to the next steps!
Edit: There are multiple options to the mirror which can be modified in the MagicMirror.py file. You can set a delaytime so that the movie will play after a few seconds, you can modify the distance to the sensor (currently at 120 cm, about 4 feet) and for example change the sound output from hdmi to the 3,5mm audio jack by changing omxplayer -o hdmi to omxplayer -o local. Also a thanks to brackenb5.
Attachments
- Mirror, mirror on the wall. Who is the scariest of them all - female.mp3
- Mirror, mirror on the wall. Who is the scariest of them all.mp3
- Mirror_mirror_on_the_wall,_who_is_the_ugliest_of_them_all-.mp3
- Spiegeltje,_spiegeltje_aan_de_wand,_wie_is_de_engste_van_het_land-.mp3
- Spiegeltje,_spiegeltje_aan_de_wand,_wie_is_de_lelijkste_van_het_land-.mp3
- Spiegeltje,_spiegeltje_aan_de_wand._Wie_is_de_engste_van_het_land-.mp3
- Spiegeltje_spiegeltje_aan_de_wand,_wie_is_de_lelijkste_van_het_land-.mp3
- MagicMirror.py
Step 4: Building a Frame
Ripping apart the monitor
Carefully take apart the monitor (make sure the power cord is unplugged). If you're lucky, you will find an instructable on YouTube for your type of monitor. Otherwise, be careful and start by taking of the front. You can safely crack the housing of the monitor, but take care not to wreck the delicate controls of the monitor. You may need the controls of the monitor later. Once the housing is off, make a note of the functions of the controls of the monitor and of the make and model of the monitor.
Now it's time to measure the inside part of the monitor and build a custom frame (if you have an old frame which fits, you're in luck and can proceed to the next step). I used the miter saw to cut four pieces of wood and screwed (and glued) them together. After a quick fit I sawed another four pieces of wood to form the front of the frame. The frame is a bit crooked, but nobody will notice my bad woodworking skills (nor the bad finish of the front) in the dark of Halloween night.
Drill a few holes in the top of the frame to let the heat from the monitor out. After painting the frame I applied some glitter (make-up glitters) on the frame in the hope that it will "magically" light up a little when it's dark.
Putting it all together
When you're satisfied with your frame, turn it upside down. First place the two way mirror in the frame, then place the monitor in the frame. Now take a few pieces of scrap wood and screw to the inside of the frame. This will secure the monitor. To keep the monitor from moving in the frame I used some felt to make it fit.
Now place the other parts in the frame, place some cardboard between components and the monitor to prevent short circuits.