Introduction: The Giving Pumpkin
Runner Up in the
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:
- A medium to large pumpkin
- Round candies (we used Whoppers®)
- Plastic can with lid (we used a small Folgers coffee can)
- Arduino Uno
- Motion sensor (ours is Radio Shack brand)
- Servo motor
- Pumpkin carving tools
- 4 AAA batteries
- Electric tape
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.
- 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.
- 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.
- 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.
- 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.
- 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!
We have a be nice policy.
Please be positive and constructive.