Introduction: Haunted Jack in the Box
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!
- Jack in the Box
- Raspberry Pi (I used a Model B 3 for the Wifi)
- Pi Camera (maybe the NOIR Version)
- 5V power supply
- Micro 9g Servo
- 100:1 Micro Gear Motor
- Hall Effect switch (I actually used a reed switch)
- Small Magnet
- Lots of Jumper cables! youll need an assortment
- Plastic screws
- Double Sided tape
- Elastic Band
- Soldering Iron
- 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.
Get notified the moment a new project comes out!
You can also send me bitcoins, here -
Second Prize in the
Make It Move Contest 2017
Participated in the
Halloween Contest 2017
Participated in the