Make the Scariest Pumpkin Ever

Arduino Home Technology
Make the Scariest Pumpkin Ever
YouTube player

This classic project from MAKE alum Marc de Vinck is a great last minute project that will scare the candy out of any unsuspecting trick-or-treater. It’s a relatively simple build that can probably be pieced together with items you have laying in your junk pile or be picked up with a quick trip to RadioShack and the auto parts store.

What you need:

    • Aduino – Available in the Maker SHED
    • MakerShield – Available in the Maker SHED
    • Wire
    • Pumpkin – Real, plastic or foam
    • 12Volt battery
    • Car horn – $7 at local auto parts store or junkyard
    • Buttons and/or switches
    • LEDs – Any color (orange is fitting.)
    • Heat shrink tubing

Tools you need:

  • Soldering Iron
  • Pliers
  • Pumpkin cutting/carving supplies
  • Glue gun

Step 1: Cut up the pumpkin

IMG_5075.JPGYou can use a real pumpkin, but this one was picked up for $5 at a local craft store. Using a real one is fine, but the foam version is less messy and doesn’t rot.

IMG_5078.JPGThe foam pumpkins are really easy to carve. So far it looks like a classic, smiling, jack-o-lantern. The kids won’t expect a thing.

Step 2: Add the nose button

IMG_5074.JPGA big, enticing red arcade button is used for the nose, and an old door-bell button is used to trigger the horn. You can use nearly any button that you have in your scrap bin.

IMG_5093.JPGSolder some wires to the “nose button” so you can assemble the electronics outside the pumpkin. Attach one wire to the ground of the Arduino and the other wire to pin (7). Also, you need an additional wire with a 10K resistor to ground. (See step 3 for a simple diagram).
Step 3: Add some LEDs to the eyes

IMG_5080.JPGI added a couple of LEDs to the pumpkin’s eyes. First, solder some extra wire to the LEDs so you reach the Arduino once they are glued in place.

IMG_5082.JPGA little heat shrink makes it look nice and avoids short circuits.

IMG_5090.JPGNow you can glue them to the inside of the pumpkin.Hot glue works well for this.

IMG_5088.JPGPlug the positive (long lead) of one LED into pin 10 and the other into pin 11. Don’t forget to add a 220 Ohm resistor in-between. The other lead (-) goes to the ground of the Arduino. A MakerShield makes this a snap.

pumpkindiagram.jpgHere is a simple diagram that shows how things are hooked up. Yes, a relay could have been used but the button / servo combo is very simple.

Also, you could just wire up the horn to the button and put a couple of Throwies in the eyes. However, I really like the pulsing eyes, and the delay before the horn blasts. Using an Arduino makes this really easy…and fun.

Step 4: Wire up the horn

combinedshot.jpgThis build uses a 12V rechargeable battery that was pulled from a home alarm system. It didn’t work for the alarm any more, but it holds enough of a charge to blast the horn. Since we’re using a servo to actuate the circuit, you could probably rig up compressed air horn like people take to football games to make things a little easier and more portable.

The positive (+) terminal from the battery connects to one terminal of the button. The other terminal of the button connects directly to the horn. The negative (-) terminal of the battery connects directly to the horn. Press the button for a sample blast!

Step 5: Attach the servo

IMG_5072.JPGThis servo is from an old remote control car. It’s going to be used to push the button that blasts the horn. The servo has 3 wires. The red goes to (+) the black to (-) and the white goes to pin (9). Cut the servo horn so it only has 1 “arm”. This arm will end up pressing the button.

IMG_5100.JPGA scrap piece of wood is used to mount the button and servo. Drill a hole about the size of the button.

IMG_5102a.JPGHot glue the servo to the scrap wood. Adjust the code, or the servo horn, to make it press the button when the Arduino sketch calls the “trick” function.

Step 6: Add another LED

IMG_5097.JPGWhen the button is pressed, an additional LED to light up the inside of the pumpkin. You can use any color LED, mine is a 10mm White LED. Solder some extra wires to the LED as you did in step #2. The (+) of the LED goes to pin (6) with a 220 Ohm resistor, and the (-) goes to ground.

Step 7: Program the Arduino

Upload this code to your Arduino:

MAKE Magazine 2008

Ardumpkin or Pumpuino, your call?
By Marc de Vinck

#include <Servo.h> // loads the library for controlling a servo

Servo myservo; // create servo object to control a servo

int inputPin = 7; // choose the input pin (for a pushbutton)
int val1 = 0; // variable for keeping track of the button status
int val2 = 0; // variable used for PWM of LEDs
int ledrt = 10; //right eye led
int ledlt = 11; //left eye led
int ledmain = 6; //White LED in center of Pumpkin
int pos = 0; // variable to store the servo position

void setup() {

myservo.attach(9); // attaches the servo to pin 9 to the servo object
myservo.write(90); // tell servo to go to position “90” or “off” position

pinMode(ledrt, OUTPUT); // declare LED as output
pinMode(ledlt, OUTPUT); // declare LED as output
pinMode(ledmain, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input

void loop(){
val1 = digitalRead(inputPin); // read input value
if (val1 == HIGH) { // check if the input is HIGH
else {

void trick(){

digitalWrite(ledmain,HIGH); //turn on main LED
digitalWrite(ledrt,HIGH); //turn on right eye LED
digitalWrite(ledlt,HIGH); //turn on left eye LED

for(val2 = 0 ; val2 <= 255; val2+=2) // fade in (from min to max)
analogWrite(ledlt, val2); //write left led at power of “val”
analogWrite(ledrt, val2); //write right led at power of “val”
analogWrite(ledmain, val2); //write main led at power of “val”
delay(30); // waits for 30 milliseconds for dimming effect

myservo.write(90); //set servo to “off” position

myservo.write(45); //set servo to “on” position
delay(500); // stay “on for 1/2 second

myservo.write(90); //set servo back to “off” position


digitalWrite(ledmain, LOW); // turn main pumpkin LED off
digitalWrite(ledrt,LOW); // turn right LED off
digitalWrite(ledlt,LOW); // turn left LED off

void treat(){ // this fades the LEDs on/off until button press

for(val2 = 0 ; val2 <= 255; val2+=50) // fade in (from min to max) { analogWrite(ledrt, val2); analogWrite(ledlt, val2); delay(30); // waits for 30 milliseconds for dimming effect } for(val2 = 255; val2 >=0; val2-=50) // fade out (from max to min)
analogWrite(ledrt, val2); //write left led at power of “val”
analogWrite(ledlt, val2); //write right led at power of “val”
delay(30); // waits for 30 milliseconds for dimming effect

The Arduino is programmed to pulse the eye LEDs until the victim, (aka. trick-or-treater) presses the big red button. At that point the bright white LED will glow, there will be a slight delay, and the servo will trigger a blast from the horn.

Looks like the kids are in for a shock this year. Hopefully the neighbors won’t mind after a few hundred blasts from that horn..

Note: Do not leave this pumpkin unattended. You don’t want anyone getting too close, since the horn is really loud and could cause hearing damage. You should be fine as long as you don’t put your ear right up to the pumpkin, however, you never know what a kid might do. Besides, you’ll want to be around to watch the fun!

5 thoughts on “Make the Scariest Pumpkin Ever

  1. Infosec Weekly Round-up October 22-28, 2012 | SecTechno says:
  2. Make the Scariest Pumpkin Ever using Arduino / Cooking Hacks Blog says:

    […] Via and Source: Make […]

  3. Make the Scariest Pumpkin Ever | A Maker's Dream Factory says:

    […] project that will scare the candy out of any unsuspecting trick-or-treater. The tutorial was given on MAKE’s Blog, it’s a relatively simple build that can probably be pieced together with items you have laying […]

  4. alex says:

    How will the kids see the button in the dark?

  5. 200+ Arduino Projects List for Final Year Students- Engineering Solutions says:

    […] Blinking Eyes Arduino Pumpkin: The blinking eyes Arduino pumpkin is a funny and scary idea. In this project we make the pumpkin to move with the help of servos with blinking leds in its eyes. The pumpkin and its motion is controlled by a button, and an Arduino. […]

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

I am the Evangelist for the Maker Shed. It seems that there is no limit to my making interests. I'm a tinkerer at heart and have a passion for solving problems and figuring out how things work. When not working for Make I can be found falling off my unicycle, running in adverse weather conditions, skiing down the nearest hill, restoring vintage motorcycles, or working on my car.

View more articles by Michael Castor


Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).