Halloween Skeleton Arduino

by gperezb in Circuits > Arduino

314 Views, 3 Favorites, 0 Comments

Halloween Skeleton Arduino

F6UUAL6KVJY0AEE.jpeg
3807B14C-87B0-4577-A76D-3CE51D766932.JPG
BB2AA2FE-4B35-466F-BDD2-D4D72190488A.JPG

In this project we are building an interactive and very interesting Halloween prop. A coffin that when is approached a scary skeleton comes out with bright red eyes and moving its jaw.

Supplies

Arduino

Distance Sensor

MicroServo Motor

Servo Motor 20kg

2 Red LEDs

Wire

Cardboard

Small Wood Plank

Skull

Hinges

Screws

Nuts

Spray Paint

Old Fabric

Duct Tape

Wire Up the Motion Sensor

step.2.png

First you need to build the sensor into the circuit, for this you need to follow the diagram above. As you can see the sensor needs to be connected to 4 different spots. The + line which is where we will later on connect our power source to, the 13 and 12 digital pins and the - line which will later on be connected to the ground. The Motion Sensor will be attached to the coffin so it can sense someone's movement and start the circuit if it gets close enough.

Wire Up LED's

step.3.png

Next on we will build both LED's in, these will act as the eyes of the skull. Each LED needs a resistance of 220Ω, they are connected to the digital pins 4 and 5 and to the ground. They will be fed 5V from the Arduino and need to be connected to the - line (our ground).

Wire Up the MicroServo

step.4.png

The MicroServer has three different wires, one that is connected to the + line (Power source), one that is connected to the digital pin 9 and finally one connected to the - line (Ground). This will be attached to the skull's jaw so it can open and close.

Wire Up the Servo

step.5.png

The Servo has also three wires like the MicroServo. Two that connect to the + and - lines (Power source and Ground) and then one that connects to the digital pin number 6. The Servo needs to be attached to a wood stick that will act as the body of the skeleton, and also to the coffin.

Give It Enough Power

step.final.png

Final part of the circuit, where it gets a bit tricky. The Arduino on its own doesn't provide enough power for all of our servos, LED's and sensor to work at the same time. So what we do here is we get an old USB cable we don't use anymore, we cut the other end of and peel both black and red wires, we connect them to the - and + line in this order and then, when we plug it thanks to an adapter, it will power up our circuit.

Get the Coffin Ready

WhatsApp Image 2021-11-04 at 10.55.49 AM (1).jpeg
A2286DD9-5F48-4A17-9A1F-C52A77F5176B.JPG
BCCB80C2-1875-4F96-80C3-98D1E6D18573.JPG
4398809B-C554-466F-989D-368450239086.JPG
EAB61400-FC9E-446C-A349-4FDB5177232D.JPG

To achieve this, we will use cardboard, we will look up a coffin pattern and cut it and then stick the bottom part and the "walls" with silicone. The door of the coffin needs to be cut in half and attached to the walls with a door hinge. Once its done we will apply spray paint and decorate it however we want it.

Get the Skeleton Ready

7B45A4B3-5504-4ECC-9FC5-5DEC0B7C2231.JPG
A25F7C33-86FA-46D4-B797-7CAFAAAB7063.JPG
57DDC660-37F5-46FD-B042-3FCB098212C7.JPG
25DE2A4C-0911-46EE-B008-57C31FFEA4A9.JPG

The skull's head is very important since everything will be hidden inside of it. We need to make two holes in the skull's eyes so we can insert the LED's, we also need to attach the wooden stick to the top of the skull's head (from inside) so it can be lifted. Once that is ready we will decorate it however we want it, with blood, old fabrics, a wig...

Final Touches

543DC2DC-AAB9-4162-A22E-50EC13238509.JPG
726D15BE-9410-4B83-B27B-845620FE4568.JPG
IMG-2537.jpg
BBA2A7E9-8E1A-4906-A8D3-3FDB513ABD3F.JPG
IMG-2547.PNG
726D15BE-9410-4B83-B27B-845620FE4568.JPG

In this part we will put everything together, connect the MicroServo to the jaw so it can be moved simulating a "bite". Attach the Servo to the coffin and to the wood stick using screws and bolts as well as silicone since it's a really powerful motor, and to even the force we also put a heavy weigh on the floor of the coffin. The Motion Sensor needs to be attached to the front part of the coffin so it can sense the movement, for this we made two holes the size of the sensors and stuck it in there.

Get the Code Right

flowdiagram.png

#include

#include

Servo servoMotor1;

Servo servoMotor2;

UltraSonicDistanceSensor distanceSensor(13, 12);

void setup() {

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

Serial.begin(9600);

servoMotor1.attach(9);

servoMotor2.attach(6);

}

void loop() {

int distance = distanceSensor.measureDistanceCm();

Serial.println(distance);

if (distance < 50 && distance > 0) {

servoMotor2.write(70);

delay(600);

for (int i = 0; i < 7; i++) {

servoMotor1.write(0);

delay(250);

servoMotor1.write(100);

delay(250);

digitalWrite(3, HIGH);

digitalWrite(4, HIGH);

}

}

else {

servoMotor2.write(0);

servoMotor1.write(0);

digitalWrite(3, LOW);

digitalWrite(4, LOW);

}

delay(200);

}

Test It

4 de noviembre de 2021

Final step, plug it and scare off your friends!