Halloween Magic Mirror




Introduction: Halloween Magic Mirror


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:


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.

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.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest

    31 Discussions

    Where do I find the program, MagicMirror.py? I've done many Google searches, but I can't find a version that seems to match your requirements. This is my first instructables, so if I overlooked an instruction, I apologize in advance. Thank You.

    2 more answers

    staylor the link is on this page - i did not see it at first when i looked at it from my phone but it is at the end of step 3


    Question 5 days ago

    Trying to get this working right now everything seems to work except the ir sensor - the log never reads anything other than 301 cm - i also copied the range finder from the pi tutorial and it always reads the same I've also checked the wiring and connections many times - any ideas? also on start up it has failed to load kernel modules?

    3 more answers

    Hello RickT80,
    I do not have access to my equipment right now. Did you enable the spi interface?

    Best regards,
    Kapitein Haak.

    Hi Kapitein Haak,

    seems like i cannot get the spi kernel to load, after some research it looks like it might be spidev instead of spi-bcm2807 but i really have no clue as i am very new to this, please let me know if you have any idea - Thanks

    Hi! I did. Also if I look into the sensor the internal led is on too so I know it’s getting power. It seems like it’s not reading return data

    Hello Jaap,

    You also made a remark on the doorkijkspiegel. The website seems to supply the correct item. I used a similar product from another website.

    Best regards, Kapitein Haak.

    I got it but it doesnt look good way to much shines trough maybe 3mm just isnt thick enough?

    Hello JaapT,

    When the display is off (or entirely black), the mirror should reflect almost perfectly. When the image shines through too much, there are a few options you can try. First; turn down the backlight / brightness of the monitor. The darker the image, the less it will shine through. The darker the environment the mirror is placed in, the more it will shine through. You might be able to place the mirror in a brighter spot. The mirror glass will let the side with the most light shine through. Omxplayer does not seem to support brightness, but any decent video editing software should be able to make the video darker.

    Hope this helps.

    Hello JaapT,

    I used the hollusion / wall videos. You could use the window / tv versions as well, but then the hallway would also be visible in the mirror (what I did not want).

    Best regards, Danny.

    Damn then i bought the wrong one, it also has a black version tough that should be ok right?

    Great project. I finally got around to setting it up. Here is some info that may help others out.

    1. Raspbian Stretch moved the SPI Interface configuration from Option 8 (Advanced Options) to Option 5 (Interfacing Options).

    2. The audio output is set to hdmi. If you plan on using analog audio change the output to local in MagicMirror.py

    1 reply

    Hello brackenb5,
    Good to hear that the instructable is clear enough so others can build a mirror as well ;-).
    Thanks for your input, I have added your comments to the instructable.
    Best regards,
    Kapitein Haak.

    This is awesome. I am going to make this and was reading the instructions. It says to copy MagicMirror.py. Do you have a link to this script?

    1 reply

    Hello Brackenb5,
    Sorry about that. I was making last minute changes to the script when I created the instructable. I have now added MagicMirror.py to the instructable (step 3).
    Best regards,
    Kapitein Haak.