This Halloween my son Max, came up with the idea to drop a spider on anyone who tries to ring our doorbell… I immediately jumped on the idea and we started to work on it. Using a simple ultrasonic distance sensor (HC-SR04) and a servo connected to an arduino we made this project in about an hour. Hidden in a box that we hotglued to the wall above the doorbell is the whole mechanics hidden.
This is a fast and easy project that you can do with your children, to get them interested in mechatronics and programming 🙂
Step 1: Connect the Harware Parts.
Begin by following this simple schematics to connect all the parts together.
If you need parts you can easily find them on ebay:
HC-SR04 Ultrasonic Distance sensor: https://rover.ebay.com/rover/1/711-53200-19255-0/1…
Arduino Uno: https://rover.ebay.com/rover/1/711-53200-19255-0/1…
Step 2: Upload the Code
Upload the code to the arduino using the Arduino IDE. I will not go through how to do that, as there are way to many instructions online for there to be one more 😉 If you havent worked with Arduino before, then do a search for how to program an arduino and you will find many good Instructables for this.
Depending on how you choose to do your installation you might have to tweak the code a bit. Examples on things to tweak are the delays for dropping the spider, letting it dangle and to retract it. Aswell as angles for the servo to stop at. IT all depends on how you build your box. See the video for a walkthrough of the code.
Step 3: Build the Box and Hotglue Everything Together.
Hotglue is awesome, it makes quick projects like this possible. Just glue together the parts as you see fit, and when you are done, just rip them apart again (or let it stay for next year, hotglue works either way) 🙂
In this image you can see the HC-SR04 connected at the bottom, with a wide hole cut in a cardboard box, for the sensor and for the spider to drop through. The Arduino is also glued to the left wall of the box. On top of the Arduino is the servo glued to the wall with a spacer of some spare styrofoam, to get out from the wall so the lever that the spider hangs in wont hit the wall.
On the servo a stiff metal wire has been hotglued, and then some fake spiderweb attached to the top, where the spider then hangs in. Kind of like a fishingrod.
Step 4: Attach It to the Wall on Top of Your Doorbell and Make It “pretty”
I attached the box to the wall with even more hotglue. But first make sure that the hotglue wont make a stain on the wall or get stuck more than you can take it away after Halloween is over. Make a sign that dares people to ring the bell, and maybe add some spiderweb to give a hint of whaat might come… >:)
Enjoy and have a really wonderfully spoooky Halloween!