Introduction: The Giving Pumpkin

About: A full-stack dev shop in LA that works with brands and agencies to build innovative web products and platforms.

The Wildebeest team made a smart jackolantern on a recent team day that gives away candy even when you're not home.

We used an Arduino Uno board as the brains along with a motion sensor and some delicious chocolate-covered malted milk balls. To get a piece of candy, just stick your hand in it's mouth and catch the Whopper® as it drops into your hand!

For this Instructable, you'll need:

  1. A medium to large pumpkin
  2. Round candies (we used Whoppers®)
  3. Cardboard
  4. Plastic can with lid (we used a small Folgers coffee can)
  5. Arduino Uno
  6. Motion sensor (ours is Radio Shack brand)
  7. Servo motor
  8. Scissors
  9. Superglue
  10. Pumpkin carving tools
  11. 4 AAA batteries
  12. Electric tape

If you like this Instructable, please vote for us in the Pumpkin Contest and the Halloween Decorations Contest.

Step 1: Carve Your Pumpkin

The design of the pumpkin isn't as importance as the size of the mouth hole. Be sure the mouth is big enough for any little pirate or Super Girl to reach in. It's also very important to keep the hole in the top as small as possible. The next step will show you why.

Step 2: Assemble the Candy Reservoir

We used an empty plastic Folgers container. Once you've selected a container, ensure the hole in the top of your pumpkin is slightly smaller than your coffee can opening--this will allow it to sit atop without falling into the pumpkin.

Next, we'll assemble the reservoir dispenser that ensures only one piece of candy falls at a time.

  1. Cut a hole in the center of the lid just big enough for a servo motor to fit in. Once it's snug and the shaft slips through unobstructed, superglue the motor in place (on the outside of the coffee can) so the shaft can freely rotate inside the can.
  2. Once your'e sure the motor is positioned at 0° on its rotation axis, cut a hole in the lid of the coffee can just big enough for your candy to fall through.
  3. Cut a circle out of cardboard that's slightly smaller than the coffee can lid and cut a small hole in the center of it big enough for the servo gear to stick through.
  4. Snap the servo arm onto the gear and then affix the cardboard circle to the servo arm using superglue. Ensure when the lid is placed on the can, the cardboard circle fits inside and can freely rotate.
  5. Cut a hole in the cardboard for the candy to fall through that aligns perfectly with the hole in the coffee can lid. Again, very important to ensure the servo is at 0°.

Step 3: Program the Arduino

This step can be accomplished in many different ways. The code written for the Arduino needs to have an input (we used a motion sensor) and an output (we activated a servo motor). Here's a link to our Arduino code.

Step 4: Position the Motion Sensor

This step took quite a bit of trial and error, but after finding the perfect sensor position, we thumbtacked it to the side of the pumpkin. Test the sensor by reaching into the pumpkin listening for the servo trigger.

Step 5: Assemble the Pieces

We encountered some issues with the motion sensor and the standard 9v battery (too much power!). Instead, we made our own 6v solution (noticed the four taped-together AAA batteries) and it worked like a charm.

Once your hand's motion is triggering the servo through the remote power, position all of the wires and Arduino board into the pumpkin. You may need to adjust the motion sensor position--be sure to get that right before putting candy into the reservoir.

Once everything's firing on all cylinders, put the malt balls in the reservoir and enjoy!

Pumpkin Challenge

Runner Up in the
Pumpkin Challenge

Halloween Decor Contest 2015

Participated in the
Halloween Decor Contest 2015