Beheaded Bear Halloween Box

by GorkaV in Circuits > Arduino

98 Views, 0 Favorites, 0 Comments

Beheaded Bear Halloween Box

Captura de pantalla 2021-11-01 092531.png
Captura de pantalla 2021-11-01 092822.png
Captura de pantalla 2021-11-01 093104.png
Captura de pantalla 2021-11-01 093138.png

A clownbox is an object made with the purpose of scare de youngest people of your houses. It's one of the oldest toys in history. The first ones were made in XVI th century. They were made by german watchmakers reason of their high price.

On this Instructables we're going explain you how to make your very own clownbox with Arduino, but firstly, I'm gonna show the electronic components that we used for that project.

Our first comonent is the Arduino that we used for the project:

https://www.amazon.com/ELEGOO-Board-ATmega328P-ATM...

Followed by the servo motor:

https://www.banggood.com/1PC-or-4PCS-or-5PCS-or-10...

Then the Ultrasonic sensor:

https://www.banggood.com/5Pcs-HC-SR04-Ultrasonic-M...

And finally a normal PCB:

https://www.amazon.es/Protoboard-contactos-Breadbo...

The Code

Captura de pantalla 2021-11-01 094754.png
Captura de pantalla 2021-11-02 150201.png
Captura de pantalla 2021-11-02 150938.png

On this part of the project we're gonna show you the code that we created to make the clownbox work. Explaining it line by line to let everything clear.

On the first and the second line we introduce in the code the libraries from teh servo and the sensor.

In the third line we introduce the servo as "myservo" .

Then on the 5th and 6th line we declare on which PIN are going to be the Trigger and the Echo of the Ultrasonic sensor.

Entering into the void setup, what we do here is to declare the PIN of the servo and introduce the data of the sensor.

Finally on the void loop, we introduce the conditions between the servo and the sensor to make it work. Those are that if the sensor detect something between 40 cm and 0 the servo moves 90 degrees. If it doesent it moves back to 0 degrees.

Step 2: the Box

Captura de pantalla 2021-11-01 102655.png
Captura de pantalla 2021-11-01 102753.png

For the outside part what we made is to buy a fullmade box. Then we disassemble the lid to craft a new one with boat wood. With the purpose of making it lighter to make it easier to the servo at the moment of move it.

The wood box:

https://serveiestacio.com/ca/bricolaje/embalaje-ca...

The Boat wood:

https://serveiestacio.com/ca/chapa-de-haya-natural...

Final Result

1635854520570.jpg
1635854668934.jpg
UATEA Halloween project