Introduction: Interactive Graveyard
Project description
This project consists of an interactive graveyard. Inside the pumpkin there are two buttons that allow, on the one hand, to turn on the lights of the pathway that leads to the terrifying skeleton and, on the other hand, to move one of the bones scattered throughout the cemetery. The more unexpected part is that when the lights of the room are turned off, a white light inside the pumpkin turns on so that the big skeleton inside it gets visible, making the scenario more frightening.
Reflection as conclusion
Thanks to this project we have been able to apply all the knowledge acquired in the class exercises, in which we work on different elements (LEDs, buttons, potentiometer, …), in a real case: a Halloween decoration. Not only we developed the creative and artistic part, but also the engineering branch, and we mixed them all together on one single project.
We also put in practise the electrical knowledge when creating the electrical circuit on the protoboard and transferring it to the Bakelite plate soldering the components.
.
Supplies
Pushbuttons (Digital Input)
A pushbutton works by sensing movement or pressure from its surroundings. When it’s “on” a small metal spring inside makes contact with two wires, allowing electricity to flow. When it’s “off”, the contact is interrupted and current won’t flow.
In the project two buttons are used. The first one controls the red and yellow LEDs inside the pumpkin that light on the pathway and, the second one, controls the servo motor which is used to move an arm.
LEDs (Digital Output)
A light-emitting diode (LED) is a semiconductor light source that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing energy in the form of photons.
Eleven LEDs are used inside the pumpkin. The pathway is constituted by six yellow LEDs and four red LEDs. The left led, which is white, is the one placed at the end of this pathway and illuminates the skeleton.
Photoresistor (Analog Input)
A photoresistor is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity.
This element is used to illuminate the big skeleton inside the pumping when the lights of the room are turned off.
Servos (Libraries)
A servomotor is a rotary actuator that allows precise control of angular or linear position, velocity and acceleration. It consists of a regular motor with a sensor for position feedback. Servos are controlled by sending an electrical pulse through the control wire.
In the project one servo is used to move an arm of a skeleton coming out of a tombstone on the graveyard.
Battery
A battery is a device consisting of one or more electrochemical cells with external connections provided to power electrical devices.
For this project we used a battery of 9V.
Arduino Uno
Arduino Uno is an open-source microcontroller and developed board by Arduino.cc. The board is equipped with sets of digital and analog input/output (I/O) pins. It also has 14 Digital pins, 6 Analog pins and is programmable with the Arduino IDE (Integrated Development Environment) via a type B USB cable.
Electrical wire
Electrical wires are conductors that transmit electricity from one place to another one.
In the project we used them to connect the electrical circuit welded on the Bakelite plate to the Arduino pins.
Other material:
- Porexpan pumpkin
- Porexpan surface (40cmx60cm)
- Black paint
- Wood sheet
- Black tissue paper
- Black cardboard
- Black thread
- White glue
- Plastic skelletons
- Plastic spiders
- Fake cobweb
Tools:
- Welder
- Scissors
- Pencil
- Brush
- Laser cutter
Step 1:
First, we did the electric circuit using a protoboard so that we could define how we wanted the circuit as to which components we wanted to use.
Step 2:
Then, we did the final circuit on a Bakelite plate soldering the components using a tin solder. The circuit should look like the photo.
Each cable has to be connected to the correspondent port in the Arduino Uno and also the servo motor and the battery have to be connected to the electrical circuit.
Step 3:
We programmed the code using the Arduino software and charged it to the Arduino Uno using a USB cable.
<p>int sensorPin = A0; //Define the photoresistor</p><p>int buto1; //Define the button that controls the servo int buto2; //Define the button that controls the LEDS</p><p>#include //Declare the servo library Servo motoret; //Define the servo motor</p><p>int ledPin = 9; //Define the leds controlled by button 2 int ledPin2 = 8; int ledPin3 = 7; int ledPin4 = 6; int ledPin5 = 5;</p><p>int ledPin6 = 3; //Define the led controlled by the photoresistor int estatleds = 0; //Define a variable to know if leds are on (1) or off (0)</p><p>void setup() {</p><p> pinMode(sensorPin, INPUT); //Initialize the photoresistor as input</p><p> //Initialize digital pin BUTTONS as an input pinMode(12, INPUT); //button 1 (servo) pinMode(11, INPUT); //button 2 (leds)</p><p> motoret.attach(13); //Asign a pin to the servo motor</p><p> pinMode(ledPin, OUTPUT); //Initialize LEDS as outup pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); pinMode(ledPin4, OUTPUT); pinMode(ledPin5, OUTPUT);</p><p> pinMode(ledPin6, OUTPUT);</p><p>}</p><p>void loop() {</p><p>//PHOTORESISTOR THAT CONTROL A LED</p><p> int sensorValue = analogRead(sensorPin);</p><p> if (sensorValue <= 14) { //If the value of the phoresistor is lower than 14 or 14... digitalWrite(ledPin6, HIGH); //...the led turns on }</p><p> else { //if not... digitalWrite(ledPin6, LOW);//the led turns off</p><p> }</p><p>//BUTTON 1 THAT CONTROLS THE SERVO</p><p> buto1 = digitalRead(12);</p><p> if (buto1 == LOW) { //If button 1 is pressed... motoret.write(90); //...the servo moves to the 90 angle position (in degrees) delay(500); //Delay time to avoid blocking the servo mechanism }</p><p> else { //If button 1 is not pressed... motoret.write(0); //... the servo moves to the 0 angle position (in degrees) delay(500); //Delay time to avoid blocking the servo mechanism }</p><p>//BUTTON 2 THAT CONTROLS THE LEDS</p><p> buto2 = digitalRead(11);</p><p> if (buto2 == LOW && estatleds == 0) { //If button 2 is pressed and the leds are off... digitalWrite(ledPin, HIGH); //...turn the leds on one by one delay (500); digitalWrite(ledPin2, HIGH); delay (500); digitalWrite(ledPin3, HIGH); delay (500); digitalWrite(ledPin4, HIGH); delay (500); digitalWrite(ledPin5, HIGH);</p><p> estatleds = 1; //Define that the leds are on delay (500); //wait }</p><p> else if (buto2 == LOW && estatleds == 1) { //If button 2 is pressed and the leds are on... digitalWrite(ledPin, LOW); //...turn the leds off one by one delay (500); digitalWrite(ledPin2, LOW); delay (500); digitalWrite(ledPin3, LOW); delay (500); digitalWrite(ledPin4, LOW); delay (500); digitalWrite(ledPin5, LOW);</p><p> estatleds = 0; //define that the leds are off delay (500); //wait } }</p>
Step 4:
The next part of the process is to paint the porexpan pumpkin and to make a hole on the front, and paint it, big enough to fit inside the Bakelite plate, the Arduino Uno and the battery.
Step 5:
The Bakelite plate, the Arduino Uno and the battery are lined with black tissue paper, making the corresponding holes for each LED, buttons and photoresistor, so that the electrical part is hidden. A skeleton is placed putting the white LED inside it, and cobweb, similar to cotton, is put above this ensemble.
Step 6:
Once all of this has been set up, we put it inside the pumpkin. To give the final touch to the interior of the pumpkin, we drew and cut several bats on a black cardboard, and then we hanged them inside it using thread and glue. We also stuck several spiders on the pumpkin’s surface.
Step 7:
To do the graveyard, we used a porexpan surface (40cmx60cm) and we painted it. We glued the pumpkin on it, and then we decorated the rest of it. Using the laser print we cut several tombstones, religious crosses and fences, painted them and, finally, stuck them. We made a hole on one of the tombstones to put the servo motor and pasted one bone on this engine. To disguise the motor, we covered it with the black tissue paper.
Step 8:
We also put some wood rests embedded on the porexpan and, using a paintbrush and black paint, we dirtied the decorations to give a more funereal appearance. To end the decoration, we put more skeletons on the cemetery, spiders and more cobweb over the entire recreation.
Step 9: Now It's Time for You to Try It!
You can download a high quality video here:
Attachments

Participated in the
Halloween Contest 2019
Comments
3 years ago
Great details! : )