Haunted Jack in the Box




About: I'm a content creator. I make open source projects and videos for said projects. My goal is to create free and open knowledge for everyone.

This is a project I have wanted to do for a while, and Halloween is the perfect excuse to do it. I'm using a Raspberry Pi to make a Jack in the Box autonomous. It uses a Pi camera to detect when someone is looking at it. Go scare your friends.

Step 1: Watch the Video!

Step 2: Get the Parts!



  • Soldering Iron
  • Drill
  • Tin Snips

Step 3: Download the Files and 3D Print

You can get the files on Thingiverse.


3D Print Them.

Step 4: Cut Open the Jack in the Box Bottom.

Time to try and not ruin your brand new jack in the box. I decided to screw four larger holes in the corners. I took some tin snips and carefully snipped out the bottom. This was actually easier than expected. After the bottom comes out, I folded up the remaining metal to make sure it wouldn't cut me while I was working on it. Just just some pliers, but careful not to damage the paint on the outside.

Step 5: Wire the Components and Test.

I always test out my components before I install them. That way I don't need to debug when the thing is assembled, this is helpful.Run the python script I have made on the GitHub.

Step 6: Install Components in Base.

With the components tested, its time to mount the components to the 3D printed base, for the most part they're just loosely fit in. The motor is snug and doesn't require any tape. Use double sided tape where necessary. Camera is mounted with plastic threading screws.

Step 7: Install Pulleys to Drive Music Box.

This is a fun step(not). Getting the handle pulley is a pain. Take some doublesided tape and put it in the channel where the pulley mounts to the handle, this will make it easier. Then take your plastic threading screws and tighten it down. If done right it should be secured to the handle on the inside.

The motor pulley is just friction fit, and push on.

Step 8: Install Magnet, Hall Switch, and Servo.

Since we will be triggering the Jack in the Box with the servo instead of the little mechanical switch, you need to stick the servo inside of the box. You will need to make the servo arm longer, I used a second servo arm and screwed them together.

You need to attach the magnet on the opposite side of where the mechanical latch is. I used a small amount of super glue to mount it. Seems to be holding. This way the raspberry pi know when it is "supposed" trigger the jack, but doesn't have to. Then install the reed switch(I call it the hall effect sensor in the video) - I mount it to magnets(but not too close!) so I could move it around and find just the right spot. Used double sided tape to mount it to the magnets. Test the reed switch to make sure it triggers at the right point.

Step 9: Put It All Together.

This is the tricky part, you need to feed the elastic band through the hole around the arm. Then pull it tight and get it around the motor, careful not to break it. Make sure all of the wires are shoved neatly inside(this is a joke, just get them in there any way possible).

I drilled two small holes to secure it to the base because the jack coming out is a little violent.

Step 10: Connect to Your Pi and Program.

Now test everything again! Understand the program so you know how it works.


Step 11: Set It Up and Wait for a Victim.

The best part.

Step 12: Design Your Own Program!

There are many ways to add more character to this. I have created one(at the time of writing this) program, but there are many ways to create variations that could be scarier than this.

Step 13: Support My Open Source Projects!

If you would like to support my projects, Consider becoming a patron, subbing to my YouTube and following on Instagram. I would love to bsynce able to rely on the support of my viewers, so I can keep creating free open source projects like this one.

Subscribe to my YouTube!

Become a Patron!



Get notified the moment a new project comes out!

You can also send me bitcoins, here -


Make It Move Contest 2017

Second Prize in the
Make It Move Contest 2017



    • Trash to Treasure

      Trash to Treasure
    • Build a Tool Contest

      Build a Tool Contest
    • Pocket Sized Contest

      Pocket Sized Contest

    15 Discussions


    11 months ago

    I am glad someone else has a slightly twisted mind like me to come up with this! My variation would be to have the speed of the song dependent on the distance to the viewer; when it first senses you it's just a slow plinking of the notes, but speeds up as you get closer and opens a split second before you reach it!


    1 year ago

    That’s awesome!!!! Very clever, and the intro video was awesome :)

    1 reply

    Reply 1 year ago

    Thanks! I love when I get to put some time into my videos. I really like doing things like the intro.


    1 year ago

    Nicely done Sean. Depending on parts sourcing (price) Halloween products expect to hit 8-10 Billion dollars (in the US 2017). Granted most of that is in Halloween costumes. A small profit mark-up - could "fund your hobbies" for years & "cater" to your imagination. (maybe costumes w "moving features). Keep up the great work - nice video, as well,

    1 reply

    Reply 1 year ago

    That is quite the market. I like designing movie props, but for some reason I never have time to do it. Ill have to find a way to get into that market.


    1 year ago

    Put a creepy looking Jack in there to replace the original & "antique" the outside

    Have the music play backwards.

    Deaden the sound of the servo.

    Put in a vibrating motor to make it dance.

    Make Jack's head spin around.

    Make the camera lens part of the artwork & disguise the printed base.

    Have a tiny girl's voice cry 'mom-my' if someone touches it.

    Fix it so Jack doesn't pop till someone touches it.

    Great work! Just a few random ideas...

    1 reply

    Reply 1 year ago

    Just a few! haha All great ideas, get to it!


    1 year ago

    I'm missing the Github link for the script. Could be just me, but I'm not seeing it!

    1 reply

    1 year ago

    Nothing more creepy than a jack-in-the-box working on its own. This is great!

    1 reply

    Reply 1 year ago

    I agree. Why do children's toys bring out the creepiness?