Introduction: Biting Jack-O-Lantern Candy Bowl

This project draws inspiration from the classic Halloween prop candy bowl where a rubber hand reaches down to grab a trick or treater's as he/she reaches down to grab a piece of candy. In this case, however, we will be using a biting jack-o-lantern to create a similar effect. When trick or treaters stick their hands into the mouth of the jack-o-lantern to pick up pieces of candy, they are met by a surprise. The mouth closes on their hand, the eyes light up, and there is an evil laugh played as if coming from the jack-o-lantern itself! This is all accomplished through the use of an Arduino with the Grove Shield, coordinating inputs from a ping sensor, to initiate all of those actions. More on that later, though! Let's get to it!

If you think this project is cool, please consider voting for me! The vote button can be found in the upper right hand corner when viewing this project.

Step 1: Materials

Materials for this project will be:

  1. Plastic pumpkin (with top)
    1. I bought mine from party city, but they are easy enough to find elsewhere.
  2. Arduino with grove shield
    1. The grove starter kit is a good purchase - it will not include all the components that you need, but does include some extras that can be used for other projects -
    2. Purchase Arduino:
  3. Grove ultrasonic ranger -
  4. Grove servo motors (2 - if you purchase the Grove starter kit, you will only have to purchase one additional servo) -
  5. Grove Red LEDs (2) -
  6. Grove cables - these may change in length depending on the size of your pumpkin -
  7. Grove Recorder V3 -
  8. Tape - packing tape works best but any strong tape is fine
  9. Saran rap
  10. Dental floss, fishing line, or any other thin, but strong string
  11. Paper plate - size depends on the scale of your pumpkin

Step 2: Cutting the Pumpkin!

    1. Trace, using pencil, eyes and a large mouth on your pumpkin. Do so until you are satisfied with the way it looks, because these will be your guidelines to cut along.
      1. It is a good idea to use a ruler to help draw straight lines, and ensure that the eyes are spaced evenly apart on the face
      2. Ensure that the shape you trace for the mouth is large enough to comfortable fit your hand
    2. Using a Dremel tool or X-acto knife, cut along your guidelines so that there are holes for the eyes, and mouth
      1. Be careful! Always remember to measure twice, and cut once. You can always cut more away, but adding back is much more difficult.
    3. After cutting, make sure to save the piece cut out for the mouth, because it will be reused for the part of the mouth that closes on an unsuspecting hand.

      (In the pictures, ignore what is inside the pumpkin - we'll get to that later!)

      Step 3: Covering the Eyes With Saran Wrap

      In order to give the pumpkin a slightly more realistic look, it is important to shield viewers from seeing the internal components as much as possible. This can be accomplished by covering the eyes with a few layers of saran wrap, and then going over that with packing tape to keep it in place.

      Step 4: Building the Circuit, Recording Sound and Uploading Code

      As I mentioned before, we will be using an Arduino with Grove Shield to control the lights, movement and sound of this prop.

      1. Using the grove shield, plug in the following components to their corresponding pins:
        1. Servo Motor to Pin 2
        2. Red LED to Pin 3
        3. Red LED to Pin 4
        4. Servo Motor to Pin 6
        5. Ultrasonic Sensor to Pin 7
        6. Grove Recorder V3 to Pin 8 (connect the speaker to the supplement circuit board that comes with the grove recorder)
      2. Connect the Arduino via a USB cable to your computer
      3. Before we can upload the code, we need to record a sound for the speaker to play. We can do this by pressing the push button on the supplement board of the grove recorder until the red LED illuminates - this indicates that it is recording. You can record the sound from a youtube video, as I did, or simply record yourself making scary sounds. When done recording, release the push button. The maximum length for recordings is around 80 seconds.
      4. Uploading the code
        1. Open the Arduino IDE (it can be downloaded here:
        2. Copy and paste the attached code into the IDE
        3. In the Arduino IDE, select the tools menu
          1. Board >> Arduino/Genuino Uno
          2. Port >> (select the second port listed)
        4. Save the sketch with a name that you can remember
        5. Select the right arrow in the blue menu bar to upload to your board
        6. Notes:
          1. You may need to change the distance measured by the ultrasonic sensor which triggers the servos, LEDs and sound to a lower or higher value depending on the size of your pumpkin.
          2. You may need to change the amount of rotation for each servo motor - the values in the code were tuned for my servos, which are old and cannot spin the full 180 degrees. After building the mouth mechanism (Step 6) you will need to play around with these values until they work with your hardware.

      Step 5: Containing Components Within the Pumpkin

      1. Now that your electronics are up and running, it is time to contain them within the pumpkin.
      2. It is best to place the heaviest components (the board, and a power supply if you have one) toward the bottom of the pumpkin to ensure that your prop does not tip over.
        1. In my case, since there was a bulge in the bottom of my pumpkin, I had to place the power supply on the back wall of the pumpkin, with the board on the bottom below it.
        2. If you want to make your prop permanent, you may glue components into place - if not, packing tape works quite well.
        3. If you do not have a power supply, you may drill a hole in the back of the pumpkin so that a USB cable can pass through to power the board.
        4. Of course, use packing tape to secure in place
      3. Position the LEDs so that the lights themselves are directly behind the eyes, and may be seen through the eyes when turned on - use packing tape to secure in place
      4. Position the the speaker toward the back of the pumpkin, using tape - all wires may be taped down in order to keep them as out of sight as possible
      5. Position the ultrasonic sensor on the back wall of the pumpkin - ensure that the sensor is not blocked by other components, and easily senses a hand when it enters the mouth (pointed in the right direction) - use packing tape to secure wires to the pumpkin
      6. Do not attach servo motors yet - they require further work before they can be incorporated into the pumpkin

      Step 6: Building the Mouth Closing Mechanism

      1. In order to build the part of the mouth that closes, you will be using the piece that you cut out of the pumpkin to form the whole for the mouth.
      2. You may want to draw teeth onto the mouth in order to make it more visible. if this is the case, use a sharpie or other permanent marker, and draw on the outside of the piece (side that is convex/would have been on the outside of the pumpkin)
        1. I chose not to do this in order to give my project a more realistic look, but drawing is a great way to add more detail or even a theme
      3. Building the mechanism: The mouth piece is hung between two servo motors - when the motors rotate, the string is tightened, bringing the mouth piece up with force. When the motors are rotated back in reverse, the mouth pieces is lowered back down by gravity
        1. Cut two small holes in the upper corners of the mouth piece (one on each side), using a nail, drill, knife, etc.
        2. Attach servo horns (plastic pieces that come with the servo motors) to the motors - use either the 4-pronged horn or the 2-pronged horn
        3. Loop string (separate pieces) through opposite prongs of the servo horns, and tie in a knot at one end
        4. Cut off excess string on knot side
        5. Loop string on non-knotted side through the hole cut in the mouth piece - one string per hole (each hole has its own servo motor), and tie a knot so that there is about 1 inch of slack in between the servo horn and the mouth piece.
        6. Cut off excess string.
        7. Test which direction the servo motors spin when activated by uploading the code and activating the ultrasonic sensor.
        8. Mount the servo motors with the horns against the wall of the pumpkin using packing tape (make sure that the tape does not get in the way of the spinning motor!)
          1. Take into account which prong on the servo horns the strings lead away toward the mouth piece.
          2. Ensure that when the servo motors are activated, that prong moves up, and away from the mouth opening (this will take some playing around with the orientation of the servo, as well as the orientation of the horns on the servo)
          3. When not in the up position, the mouth piece should be hidden inside the pumpkin, below the mouth - this will affect how high you choose to mount the motors.
          4. Be sure of the location of your motors before you tape them down!

      Step 7: Inserting the Candy Plate!

      This step is simple, but essential; it's time to insert the candy plate!

      1. Place packing tape on the bottom of the paper plate
      2. Stick the plate down in the center of your pumpkin - mine had a convenient little bulge in the middle, so I put the plate right on top of it, allowing the Arduino to be partially covered
        1. The location also allowed me to influence the movement of the mouthpiece slightly, allowing it to hang vertically when in the upright position, rather than on a diagonal (I simply pushed the plate slightly forward to put pressure on the bottom of the mouth piece when it was up)

      Step 8: Enjoy!

      The hard work is done. Now it's time for you to enjoy your new Halloween decoration and watch as young trick-or-treators are amazed by its cool factor.

      Have fun, and happy making!

      Halloween Contest 2017

      Participated in the
      Halloween Contest 2017

      Make It Move Contest 2017

      Participated in the
      Make It Move Contest 2017