Scary Clown: Arduino Halloween Decoration

by Miregac in Circuits > Arduino

473 Views, 2 Favorites, 0 Comments

Scary Clown: Arduino Halloween Decoration

Captura de pantalla 2021-11-01 a las 21.04.56.png
FAKSMQAKVGOBN4A.png
Halloween Scary Clown Arduino

Scary Clown is an Arduino-controlled interactive halloween decoration. It's been designed and created as part of the UATEA midcourse halloween project.

Using LEDS, servomotors and ultrasonic distance sensors, we've designed a product that when the sensor detects movement at a certain distance, the servos move and the LEDS turn on. They have different functions; the servos have two fake plastic eyes attached to them that are placed on a scary clown's face. The LEDS are placed on the clowns mouth. When a person approaches this mask, the eyes will move sideways and its mouth will have red light coming out, provoking a scary reaction on the person close to it.

All of these electronic parts have been programmed with Arduino through its software. In the following instructions you can find the steps to create this Halloween decoration from scratch.


Supplies

Captura de pantalla 2021-11-01 a las 19.43.55.png

The electronic parts and materials you will need to create this Halloween decoration are the ones shown in the picture above and listed below, you can buy each one on the links attached.

A1: 1 Arduino board

A2: 1 830 Tie-points Breadboard

A3: 2 Servo motors SG90

B1: 1 Ultrasonic sensor

B2: 17 Breadboard jumper wire

B3: 6 Female-to-male Dupont wire

C1: 3 red LEDS

C2: 3 1K resistors

C3: Cardboard base

D1: Plastic scary Halloween mask

D2: Black cloth (100x100cm)

D3: Red cellophane (10x10cm)


Other tools used for this project are:

Connect Ultrasonic Sensor

beec7b17-7393-436c-8c48-3a71b0a3896a.JPG

The first step is to connect the ultrasonic sensor to the breadboard. The ground pin is connected to the Arduino ground through a wire. The Echo pin is connected to the Arduino 8 pin. The trig pin is connected to the 9 pin. Finally, the VCC is connected to the 5V.

Connect ServoMotors

9712b3ba-66fd-434d-816e-187dea5a2018.JPG

The second step is to connect the ServoMotors. The first servomotor is connected to the 4 pin through the yellow wire, the red wire is connected to 5V and the brown wire is connected to the ground thought breadboard jumper wires. Repeat step for the second servomotor, connecting it to the 7 pin.

Connect LEDS

dc5588e6-a0bc-4038-8654-4da22c62d033.JPG

Connect the three LEDS connecting 1 female-to-male Dupont wire on each leg. Connect the short leg to the ground and the long leg to the resistor. Connect the resistors to the breadboard and to the pins: 2, 10 and 12 trough breadboard jumper wires.

Arduino Wiring Diagram

7317d795-0efe-49e8-9363-866685df7e53.JPG
213f4de6-46c3-4a49-94d9-6d3678437447.JPG

The Arduino connections to the breadboard should look like the diagrams shown above.

Attach Servos to Mask Interior

Captura de pantalla 2021-11-01 a las 20.40.32.png

Attach the servos to the interior of the mask with a small amount of silicone glue on the servo's case. The servo horn should be going through the eye's hole so that the eyes can be attached to them from the other side. Add black cardboard on the back of the eye holes with a hole for the horn to go through, so the servomotor can't be seen from the other side.

Attach LEDS to Mask

Captura de pantalla 2021-11-01 a las 20.46.45.png
Captura de pantalla 2021-11-01 a las 20.46.59.png

Cut a small piece of cardboard for the LEDS to be placed. Cut a piece of red cellophane (10x10cm) on the mouth hole on the interior of the mask. Glue one side of the cardboard below the mouth hole on the interior and place the three LEDS with a piece of cello tape so they stay in place.

Build the Base

Captura de pantalla 2021-11-01 a las 20.54.05.png
Captura de pantalla 2021-11-01 a las 21.01.29.png

For the mask to be held and the breadboard and Arduino to be placed, we are going to have to build a base with cardboard. Cut 4 pieces of cardboard (8x5x2cm) and glue them together, one on top of each other, and glue the to the center of the base cardboard (20x20x2cm). This is where the breadboard will be placed. On the sides of this cardboard glue two pieces of cardboard (15x3x2cm), this is where the mask will be placed with the help of an elastic band. It should look like the second picture.

Place Cloth

Captura de pantalla 2021-11-01 a las 21.04.56.png

The final step is to cut a 20cm diameter hole on the center of the 100x100cm cloth. Fit the face in the hole so that the cloth covers the cardboard base behind.

Upload Code to Arduino

Captura de pantalla 2021-11-01 a las 21.08.14.png
Captura de pantalla 2021-11-01 a las 21.08.28.png
Captura de pantalla 2021-11-01 a las 21.08.41.png
Captura de pantalla 2021-11-01 a las 21.08.51.png

In the following link you can find a zip folder with the complete code.

https://drive.google.com/file/d/1rP2jy5ygNw2GoYCNkdDcwWCgToMmJcxQ/view?usp=sharing


Code Flow Diagram

Captura de pantalla 2021-11-02 a las 12.20.10.png

The following diagram shows the code flow of the project. When the program starts, the ultrasonic sensor reads the distance of moving bodies around it. If the distance between the sensor and a moving body is lower than 50, the servo1 and the servo 2 will start moving, at the same time, the LEDS will turn on. They continue to move on a loop while the distance is lower than 50. Once this distance becomes higher than 50, the servomotors will stop moving and the LEDS will turn off. The cicle will begin again by the sensor reading the distance.

Connect Arduino to Battery or Computer

The final step is to upload to code to the Arduino and connect the Arduino to a power source (9V battery or computer). To connect it to the computer you will need a USB cable compatible with Arduino. To connect it to a battery you will need a DC Cable PPBAT Battery Clip and a 9V battery.

Enjoy Your Scary Clown Halloween Decoration!

Your are now ready to enjoy your Scary Clown Halloween decoration! With this project we've been able to put in practice the learning acquired in the first half of the course. We've done this by designing a product for Halloween that had to have at least some elements learnt in the course (LEDS, potentiometers, sensors, pushbuttons, motors...) We've been able to carry out this project successfully by combining our Arduino skills, our imagination and creativity, and the theory and practice acquired during the course. We've been able to develop a product that works through an Arduino integrating motors and other electrical parts. This skills that we've acquired will be of great use for upcoming projects, Arduino is easy to use and useful for advanced projects, it is also a great way to start programming. Although this projects reflects a big amount of theory and practice acquired, there is also a lot of room for improvement and eagerness to learn new things and learn about more electrical parts and how to use them. This project has been a great start as an introduction to Arduino, and a great way to lead us to the next upcoming project.