loading
Picture of Scariest Pumpkin Ever!
I made the scariest pumpkin ever! Nothing gory or disgusting, just something that will scare the kiddies and hopefully score me some candy. How? Well, I am glad you asked. I rummaged through my parts bins and came up with an idea. What if I connected a horn to an Arduino and let out a nice blast when someone came around trick-or-treating. Hopefully they are so scared they drop their bag-o-candy and run away, leaving me with plenty of treats.

Note: The key to this project is the delay. You could just wire the horn to the button and I am sure you would get a lot of people to jump. Add a delay to the horn and when they turn their back, the real fun begins! Honk!

You can find this build on the MAKE blog, along with other really cool Halloween projects and contests.


 
Remove these adsRemove these ads by Signing Up

Step 1: What you need

Picture of What you need
Parts Needed:
  • Aduino
  • ProtoShield
  • Servo
  • Wire
  • Pumpkin - Real, plastic or foam
  • 12Volt battery
  • Car horn - $7 at local car shop or junkyard
  • Buttons and/or switches
  • LEDs - Any color, but I like orange
  • Heat shrink tubing

Tools you need:
  • Soldering Iron
  • Pliers
  • Pumpkin cutting/carving supplies
  • Glue gun

Step 2: Cut/Carve up the pumpkin

Picture of Cut/Carve up the pumpkin
IMG_5078.JPG.jpeg
The foam pumpkins are really easy to carve. It looks like a classic, smiling, jack-o-lantern. The kids will never suspect anything.

You can use a real pumpkin, but I picked this one up for $5 at a local craft store. Using a real one is fine, but photographing it over a few days can get messy so I decided to use a foam version.

Step 3: Selecting a nose button

Picture of Selecting a nose button
I had an arcade game button lying around, so I used it for the nose. Also, I had an old doorbell button I used to trigger the horn. You can use almost any button that you have in your scrap bin. 

Step 4: Soldering the nose button

Picture of Soldering the nose button
Solder 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) (see schematic). Also, you need an additional wire with a 10K resistor to ground. Speaking of Halloween, that is some scary soldering! Yuck. 

Step 5: Prep the LEDs to the eyes

Picture of Prep the LEDs to the eyes
IMG_5082.JPG.jpeg
I added a couple of LEDs to the pumpkin's eyes. First, solder some extra wire to the LEDs so you can reach the Arduino once they are glued in place. A little heat shrink makes it look nice, and avoids short circuits. (Don't forget to add a 220 Ohm resistor in-between...see diagram in next step)

Step 6: Test the LEDs

Picture of Test the LEDs
pumpkindiagram.jpg
Plug 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. I am using a ProtoShield, so there are plenty of ground pins. If you want, go ahead and upload the code (see later step) and test the LEDs.

Step 7: Add the LEDs to the pumpkin

Picture of Add the LEDs to the pumpkin
Now you can glue them to the inside of the pumpkin. I used hot glue and just held them in place until it cooled. Simple!

Step 8: Adding the truck horn

Picture of Adding the truck horn
I had a 12V rechargeable battery that I pulled from a home alarm system. It didn't work for the alarm any more, but it will hold enough of a charge to blast the horn a few hundred times.

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. (again, see schematic, it's easy!) Press the button for a sample blast!

Attention Electronics people:

Yes, I know I could have uses a TIP120 and a relay to trigger the horn! But this project is meant to be easy, and easily configured based on what parts are available. I had a servo and an old doorbell button, so that's what I used. (OK, I have a TIP120 and a relay too, but some people might not!)

Note:

Want to make a simple project? Just add a few Throwies for the eyes! Done!

Step 9: Attach the servo to the button

Picture of Attach the servo to the button
IMG_5100.JPG.jpeg
IMG_5102a.JPG.jpeg
I had this servo from an old remote control car. Now 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. Yes, I know there are a lot of easy ways to do this with electronics, but remember this is mostly junk, and anyone can easy see how this works. Besides, I kind of like the idea of using a servo to press a button...it seems so silly.

Picture 2 - I used a scrap piece of wood to mount the button and servo. Drill a hole about the size of the button.

Picture 3 - Attach the servo to the board so it can turn and press the button. (upload the code and test it out a few times. If necessary, remove the servo horn and adjust until it works)

Step 10: Add another LED

Picture of Add another LED
 When the button is pressed, I wanted 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 #5. The (+) of the LED goes to pin (6) with a 220 Ohm resistor, and the (-) goes to ground.

Step 11: Program the Arduino

Upload this code to your Arduino: 

/* MAKE Magazine
Ardumpkin or Pumpuino, your call?
By Marc de Vinck
*/

#include "<"Servo.h">"  //  REMOVE the "quote" symbols from this line code!! I had to add them so instructables does not strip them out.

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
trick();
}
else {
treat();
}
}

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
delay(10);

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

delay(200);

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
}
}

Step 12: Final thoughts

Picture of Final thoughts
The Arduino is programmed to pulse the eye LEDs until the victim, I mean 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. With any luck the trick-or-treater will drop their bag of candy and run....Mmmmm candy.

Looks like the kids are in for a shock at my house this year. I'll let you know what the neighbors think after the first few hundred blasts.

Note: Do not leave this pumpkin unattended. You don't want anyone getting too close, since the horn is really loud and could damage you hearing. Don't put your ear right up against the pumpkin, and you should be fine. However, you never know what a kid might do. Besides, you want to be there when they scream and drop their loot! Have fun, and watch out for any blinking pumpkins!

This build can be found on MAKE too!

Happy Halloween!


bsnob3 years ago
if your are going to go through the trouble of using a servo ,then why not make it similar to the silly string shooting aduino pumpkin, only instead of having the servo hit a button or a can of silly string , use an airhorn, ive even seen them at the dollar stores now, a little cheaper i think and it may be louder too
Screamo4 years ago
Did u get any candys?
miniclipper4 years ago
I wet my pants looking at this
mattccc5 years ago
looks like this can also be done with the basic stamp too
nitrox0275 years ago
in your diagram you have 2 left eye leds and no right eye
and you could have just used a relay instead of a servo and a button, but i guess you just used what you had
wurx (author)  nitrox0275 years ago
 Exactly! And I thought it was a bit amusing to use a servo to press an old doorbell button!
nitrox027 wurx5 years ago
lol yah, i actually like that idea though lol
p.s. i watch all your videos on youtube for the maker shed lol
wurx (author)  nitrox0275 years ago
 Haha! Actually the pumpkin has 2 left eyes, makes him extra spooky. OK, not really....I'll have to fix that. Thanks!
WyoJustin5 years ago
That's funny, I love that!  Next project, here we come.

wurx (author)  WyoJustin5 years ago
 Thanks! If you make one, please send me some pictures. I would love to check it out.
WyoJustin wurx5 years ago
We posted our Jack-o-duino at http://wyoinnovation.blogspot.com.

Justin and Elizabeth
WyoJustin5 years ago
Don't forget to mention the servo in your parts list.
wurx (author)  WyoJustin5 years ago
 Oooops! Thanks! Adding it right now.
this seems like alot of work to make a pumpkin honk... Couldn't you just wire and old 1157 bulb to a 12 volt source on the dim side, Then the bright side and the horn to a switch. Then you get an instant burst of bright light and a honk... Great build though. maybe I am missing the point or something... thanks for posting!
The key is the delay!  The delay is the most important part!

When you push the button you EXPECT something scary to happen.   The horn can't go off until you're sure that the button doesn't do anything scary.

-Andy
wurx (author)  VRAndy5 years ago
 Exactly!
nolte9195 years ago
I have two questions.  I have to admit that although I program microprocessors in C for a living I've never used an arduino.  I don't see a function "main" in your code or any function that calls the routines setup() and loop().  It seems you'd need something like:
main(){
   setup();
   while(1){
      loop();
   }
}

Also, is there a chance you could press the button so fast that the code doesn't realize it was pressed.  In other words the button was pressed and released while the treat() function was running?  Or in practice is that not a problem?
wurx (author)  nolte9195 years ago
You do not need a "main ()" function when using the Arduino IDE.

You do need a "void setup()" which is run 1 time at startup. Also, you need a "void loop()" which is run over and over after setup. That's the basics, there is a lot more, but it's all really easy.

I made an intro to Arduino video here. And another one, and another, and another, and more ! :)

As far as pressing the button and it not registering because of the program running a function. Yeah, I it can happen, but it was not an issue. It's a honkin' pumpkin, not an autopilot! Haha!
buttersnake5 years ago
Its perfect, simple and I can see it would be very effective seeing how it delays a bit. +1
wurx (author)  buttersnake5 years ago
 Thanks! I did test it, and it worked....and worked well! :)
comodore5 years ago
Hahaha!
That is so simple, yet very very cool!
I really like your project!
And yea, I got a bit shaked when I was watching the video for the first time!  xD
I might make one for my self!
Thanks!
rate: *****
wurx (author)  comodore5 years ago
 Thanks! If you make one, please take some pictures and send them my way!
comodore wurx5 years ago
Will do!  :)
Why don't you use a solid state relay to trigger the horn instead of a servo?  It seems a lot simpler and a bit cheaper (unless you already have a servo).  I like the idea of the project though :D
wurx (author)  Radioactive_Legos5 years ago
I made it with "stuff" I had laying around. The best route would be to use a 555 (or 556 for the LEDs)  for the delay and a relay for the horn. I had an Arduino, and I thought it was kind of funny to press a doorbell with a servo. Yes, your method would be a lot cheaper. Thanks for the feedback!

Salsa7665 years ago
 u could also probably enter this is the ardunio contest 
wurx (author)  Salsa7665 years ago
 Haha! Thanks....I did! :)
knexfan91825 years ago
Nice but i would try to hide the LEDS a little bit more.
wurx (author)  knexfan91825 years ago
 I thought about that. Maybe adding some vellum in the eyes. However, the LEDs actually look like the pupils of the eyes at night. Personal preference I guess. Thanks for the feedback!