Ultrasonic Distance Sensor Activated Scarebox for in a Haunted House
by Lowkie_555 in Circuits > Arduino
168 Views, 1 Favorites, 0 Comments
Ultrasonic Distance Sensor Activated Scarebox for in a Haunted House
A distance activated scarebox for during Halloween, or for in a haunted house. In this Instructable, I explain how to make it step by step.
Supplies
Below you can find all the Arduino (electro) supplies:
- Arduino Uno
- 4 Arduino Male 2 Male Connectors
- 4 Arduino Male 2 Female Connectors
- Standard Servo Motor
- Ultrasonic Distance Sensor
- Breadboard
- Powerbank (to power the Arduino)
You can find all the other supplies below:
- Cardboard box (preferably with a flat top that is not too heavy)
- Wood (To decorate the box)
- Black Spray Paint (To make the box black, so it won't stand out in the dark)
- Double sided tape*
- Led light*
- Decorations**
*Optional
** This can be filled in as you wish
Itterations
During this project, I had two itterations.
My first itteration was the use of too heavy a box, therefore the servo cannot open the top. I had to switch boxes, this did make the design a bit bigger. In the end, this did result in a working product.
My second itteration was that I had an enclosure that actually didn't look like one at all. In addition that I had my 5V distributed in a breadboard, instead of a solder board.
Connection of All Components
Connect everything as per the attached diagram (If you solder like me, you can solder it like the breadboard scheme), then nothing can go wrong. Make sure everything is as connected, then nothing can go wrong. Connection everything is not the hardest part, make sure to do it carefully.
Coding
Note: Make sure the Servo and Ultra Sone Distance Sensor libraries have been downloaded.
- Write the code in Arduino IDE, make sure everything works as desired.
- If the code works, copy the code to the Arduino Uno.
I have attached my code as attachments, you can also use these for the project.
Downloads
Preparing the Box
- Glue all the wood to the box, you can do this however you like.
- Spray paint the inside and outside of the box completely black.
- Glue the moss where you want it (I only have it on the sides).
- Make a hole for the sensor in the front, and a small hole for the kabel to power the arduino.
Preparing Electronics in the Box
- Solder 3 cables with female plug as the end in the same row to the solder plate.
- Place the sensor through the hole, and make sure it is secured (this can be done through the lid of the box, or through a piece of tape and cardboard)
- Mount the Servo in the box with tape where it should lift the lid
- Tape the other things to the bottom of the box (you can do this neatly, but it won't be visible later because of the top layer).
- Attach a string to the Servo, and tighten it at the bottom of the flap (this will make sure the flap falls back).
* The battery powered lightstrip is optional
Finishing the Project
- Place a piece of black paper the size of the inside of the box over the electronics.
- Place the decorations as desired on top.
Reflection
During this project, I looked solution-focused for a solution to my Servo problem. And taught me how to work with an Arduino Uno. I enjoyed completing this project.