Introduction: Interactive Jack-o'-lantern

Pumpkins are usually seen as Halloween decoration, but in this project,
we took it one step further away, this jack-o'-lantern responds to various external stimuli.

When the lights of the room are switched off, the pumpkin rotates 90 degrees, facing the user. If the sound sensor registers loud noises, it turns the pumpkin eyes red, using three LEDs on each eye.

This is a better version of a classic Halloween decoration.

Step 1: Get the Components


- (x6) red LEDs

- (x1) Servo motor

- (x1) photoresistor

- (x1) sound sensor

- (x20) jumpers

- (x1) Arduino One

- (x2) resistors of 330 Ohms

- (x1) resistor of 220 Ohms

- (x1) battery (9V)

- (x1) porexpan pumpkin

- wood ribbon (16cm x 26 cm)

- (x1) bakelite plate

- tin wire

- welder

- silicone

-black spray


- Arduino IDE

Step 2: Programming

In order to get the Jack-o'-lantern to be interactive, we must write a code with the Arduino program, and later on it must be uploaded to our Arduino One.

Here is our code for this project:


Servo myservo;

boolean LED1Status = false;

boolean LED2Status = false;

void setup() {

pinMode (A1, INPUT); // This code line defines the photoresistor (connected to the A1 pin) as an input.

myservo.attach (9); // The servo motor is attached to the pin 9.

pinMode (A2, INPUT); // This code line defines the sound sensor (connected to the A2 pin) as an input.

pinMode (2, OUTPUT); // This code lines define both LEDs (connected to the 2 and 4 pins) as an input.

pinMode (4, OUTPUT);

Serial.begin (9600); // The serial.begin stablishes a channel to comunicate with the serial monitor of the program, and we use it to check the lecures of the sensors.


void loop() {

int sound = analogRead(A2); //"Sound" refers to the information provided by the sound sensor. Serial.println(sound); // The information collected by the sound sensor will be shown on the serial monitor.

if (sound > 52) { // When the value of "sound" is bigger than 52, both LEDs turn on, while it isn't, they are both off. Serial.println (sound);

digitalWrite(2, HIGH); // Both LEDs turn on.

digitalWrite(4, HIGH);


else {

digitalWrite(2, LOW); // Both LEDs turn off.

digitalWrite(4, LOW);


int light = analogRead(A1); //"Light" refers to the information provided by the photoresistor.

light = map(light, 0, 1023, 0, 255);

if (light > 18) { // When the lights are off, the servo turns the pumpkin 90 degrees, when the lights of the room are on, the jack-o'-lantern goes back to it's original position.

myservo.write (0); // Servo motor stays in 0 degree position.


Serial.println (light); // The information collected by the photoresistor will be shown on the serial monitor.

} else {

myservo.write (90); // Servo motor turns to 90 degrees position.


} }

Step 3: Mounting the Circuit

First of all, the bakelite must be cut in 4 parts (B1, B2, B3, B4); two of them are for the LEDs on the eyes (B1 and B2), the other one is for the photoresistor (B3), and the last one is used to unite all the positive and negative (ground) pins (B4).

In B1 and B2, three LEDs and one 330 Ohm resistor must be serial connected. Then, we connect them to the corresponding pins. As we used a serial connection, only one pin is enough for all three LEDs. We must connect them to the unifying bakelite piece (B4).

Then, the photoresistor is connected to a 220 Ohm resistor in B3, and to the A1 pin, and to the unifying bakelite piece (B4).

The sound sensor must be connected to the A2 pin, and to the unifying bakelilte (B4).

Finally, we take the B4 piece, and unite all the positive pins to connect them to the 5V pin in our Arduino One, and the same must be done with the negative pins, but they must be connected to the ground of our Arduino One.

The last step is to connect the 9V battery to the Arduino One to give power to the project.

The circuit is already finished!

Step 4: Mounting the Product

Finally, we must now assembly all the circuit components to the final product.

First of all, we have to cut the top of the pumpkin, so we can hide all the components inside the pumpkin, and drill a hole on its bottom.

The bakelite pieces with LEDs (1 and 2), are attached to the inside of the pumpkin eyes using silicone, the photoresistor is nailed to the top part, and connected later to the A1 pin using a resistor of 220 ohms, and to the unifying bakelite (4).

The sound sensor is fixed to the mouth of the pumpkin using silicone, facing outside and it's connected to the unifying bakelite (4), and to the A2 pin.

The unifying bakelite (4), is placed inside of the jack-o'-lantern, so are the Arduino One and the battery.

To create a support for the product, the wood is cut in a square of 16x16 cm, and in two pieces of 16x2.5 cm, and in two of 11x2.5 cm.

First of all, we must drill a big hole in the square, to hide the servo motor under it. Then, we paint all pieces using the black spry. Finally, we must assembly them as seen in the pictures.

Once the support is done, the servo motor will be placed under it, and it will be attached to the pumpkin, so that it turns with the servo motor.

Finally, we close the pumpkin using the top part and silicone.

Step 5: Enjoy It!

Place the Jack-o'-lantern facing sideways and make sure the photoresistor is reciving light.

Once the product is placed, turn the lights off to make it face someone near it, and wait for their scream to see the red lights turn on and frighten them even more!