
As I posted previously I wanted to put together a Halloween display emulating my favorite Disneyland/world ride of all time. Originally this was just going to be four heads on a table with the Haunted Mansion’s “Grim Grinning Ghosts” playing on a loop.
After I started learning to program my Ardunio this evolved into a photocell actuated video on demand Halloween display. I used an example I found on Arkadian.eu to control a Dell Mini 9 laptop using AutoHotKey. When the photocell switch it tripped the Arduino sends a serial signal to the Dell laptop which is converted to a keystroke by AAC Keys which in turn triggers the below AutoHotKey Script and finally plays back using VLC.
I had access to a industrial photocell switch (just like at Disneyworld!) which required an additional 12v power supply but I imagine this could be modified to work with a cheap ultrasonic or IR range finder.
This AutoHotKey script is running on the PC waiting for the “a” key to be pressed. When the key is pressed VLC launches full screen and ignores input for the duration of the video (60 seconds). It then closes VLC and waits to be triggered again.
1 2 3 4 5 6 | a:: Run, c:Program FilesVideoLANVLCvlc.exe -I rc "VIDEO_FILE_NAME" Sleep, 61000 ; Pause for video to play, prevents triggering multiple times. Process, close, vlc.exe ; Kill vlc and make sure it stays dead. Return |
This Arduino sketch waits until the Photocell switch on pin 2 is tripped, then sends a serial character to the Dell laptop it’s connected to. It also ignores any input during video playback to avoid confusing the computer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | /*
Serial Keyboard
Used to send keystrokes to a Windows PC running AACKeys.exe which
turns serial data into keystrokes. Best used in conjunction with
AutoHotKey.
Examples and idea based on the work of http://www.arkadian.eu and
information from http://wwww.ladyada.net
TheNewHobbyist 2010 <http://www.thenewhobbyist.com>
*/
// Initialize variables
const int buttonPin = 2;
const int ledPin = 13;
int buttonState = 0;
// Set inpout/output and start serial
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
}
// Main code loop
void loop(){
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH);
Serial.print("a"); // send key to PC to start video playback
delay(61000); // ignore input until video ends
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
} |
Here are the installation photos and video compilation (note: the audio is a little out of sync after uploading to youtube).
- Hooking the photocell into my Arduino UNO
- Can't even see the sensors!
- Photocell Ziptied in place
- Reflector for the photocell
- Hooking up laptop and karake machine for audio
- Laptop stowed away and heads attached to table
- Projection test before dark
While we didn’t get too many trick-or-treaters this year the ones that stopped by after dark really enjoyed it. I’m really happy with the way this turned out and I recommend anyone new to Arduino give it a shot. It really wasn’t hard to put together and they payoff was great.







My name is Chris. I'm a Chicago area maker and 3D printing enthusiast. This blog is a home for my DIY projects, 3D designs and other miscellany.







Halloween hangover: talking heads - Hack a Day
January 10, 2011 at 10:01 pm
[...] a Halloween prop leftover; [Chris] built his own version of singing heads from Disney’s Haunted Mansion on his porch for last year’s ghoulish decor. A projected [...]
[WORDPRESS HASHCASH] The comment’s server IP (72.233.2.72) doesn’t match the comment’s URL host IP (74.200.247.61) and so is spam.
bbsux
January 11, 2011 at 12:48 am
What about the main rooms and ballroom? Don’t they use some kind of projected image onto a clear woven fabric or something?
chris
January 11, 2011 at 1:43 pm
@bbsux That illusion is called “Pepper’s Ghost” and it actually quite old. It’s really not too hard to pull off but it helps if the viewer is in a stationary location. You can see a better explanation on Wikipedia.
http://en.wikipedia.org/wiki/Pepper%27s_ghost
Nathan Byrer
January 11, 2011 at 12:41 pm
This is really cool. I’m thinking of building this for our Halloween display this year. I think my son, daughter, and I would have a great time putting all of this together. It would be a great project to introduce them to programming. Thanks for sharing.
Ben Center
January 12, 2011 at 1:00 am
How were the heads projected?
chris
January 12, 2011 at 1:03 am
I pushed some rocking chairs across the porch to keep kids from messing with them. Beyond that they were just duct taped to a folding table.
John
January 12, 2011 at 4:31 pm
What type of projector are you using? Mine takes too long to turn on/off for something like this.
Also, lol @ hackaday being marked as spam. Nubs
chris
January 12, 2011 at 4:42 pm
I believe it’s the Hitachi EDPJ32 LCD Entertainment Projector. As for boot up/shut down I just left it running for the ~6 hours it was setup. It’s not great for the bulb life but I figure if it’s only once a year it wont do too much damage. When the video wasn’t playing it returned to the Windows desktop which was all black with icons and start menu hidden. So it appears to turn off but it’s really just displaying a black image.
John
January 12, 2011 at 5:49 pm
Ah, black screensaver. Makes sense. I wonder if sanding the mouths down would yield a better result. Next year you should make a single giant head and then record yourself saying something.
Adam Swant
April 12, 2011 at 2:20 am
So…. what did you use for projecting the faces? I really want to do this for Halloween this year and I think I understand all the other parts to this project. An “Instructable” would be awesome!
Adam Swant
April 12, 2011 at 2:22 am
I guess I understand you used a projector but where did you get the video?
chris
April 12, 2011 at 9:47 am
Adam,
I found all of the videos on youtube. Here is the video I used in the Halloween display.
I’ll make sure I transfer this post, plus a little more detail to Instructables when I get a chance!
cody
September 30, 2011 at 10:36 pm
Hi. I tried everything I could think of, but I can’t get AutoHotKeys to work right. I just coppied and pasted it into a new script. Then reloaded the script and nothing. Arduino is hooked up to a switch and has the right script on it too. Can you help? Thanks!
chris
October 3, 2011 at 2:13 pm
No kidding? I would insert some Serial.print lines after each step of the Arduino code to make sure everything is working right. You can verify it by watching the Serial monitor in the Arduino IDE and making sure it’s going through the motions like you think it should. When it doubt, print it out!