The Prop Dropper 2 allows you to drop scary Halloween props, such as bats and spiders onto unsuspecting trick-or-treaters and play scary sounds at the same! Built around the Parallax Propeller microcontroller this project is highly customizable and expandable.
In the October 2009 issue of Nuts and Volts magazine Vern Graner published his Prop Dropper project using the EFX-TEK Prop-1 controller, which is based on the Parallax BASIC Stamp 1 microcontroller. The project used a Parallax PIR sensor to detect motion which then triggered a pair of servos to drop the ‘critter’ onto the ‘victim’. If you haven’t seen this article, I highly recommend checking it out.
Here is a video of the original Halloween Prop Dropper. Inspired by the simplicity of this project, I discussed with Vern the possibility of making an upgraded version and the Prop Dropper 2 was born!
How It Works
The Prop Dropper 2 is very similar to the original in that it waits until a person is detected and drops a prop near them to scare them. In addition to dropping the prop, a sound (.WAV) file is played to add to the effect. But wait! There’s more! The Prop Dropper 2 also waits until the person moves again and then drops a second prop and plays a second sound file, giving them an almost immediate second scare! You’re not limited to just two props and sound files. The Propeller chip provides sufficient I/O and resources to realize many droppers and the flexibility to configure things the way you want. More about that later.
When powered up using the supplied code, the Prop Dropper 2 will drop both props, wait three seconds and then wind them up again while playing an evil laughing sound. This serves two purposes. First, it makes sure the props are both properly initialized in case the power was shut off in the middle of a wind up cycle. Second, it makes sure your sounds are playing properly. Once the props are back in position the PING))) Ultrasonic Range Finder is used to detect when a person enters the target area. Once they do, the first prop is dropped and an accompanying sound file is played. When the person starts to move forward again a second prop is dropped and the accompanying sound file is played. After the person leaves, the props reset and the system is ready to scare the next person.
While a PIR sensor can be shrouded to focus the detection area to be more limited I opted to use the Parallax PING))) Ultrasonic Sensor. This gives me the ability to see not only when someone is in range to drop the prop on, but I can detect their distance from the sensor. This means I can control which prop drops and when.
Like Vern’s original Prop Dropper, this unit uses two servos for each prop we’re going to drop. Each pair of servos consists of a tilt (standard) servo and a wind-up (continuous rotation) servo joined together. The tilt servo is responsible for tipping the wind-up servo which inherently tilts the spool that holds the string the prop dangles from. By tipping the spool vertically the string unravels all at once resulting in the prop dropping suddenly until it reaches the end of the string and stops. Figure 1 shows a completed dropper assembly installed on a board.
When we want to reset the prop, we simply move the tilt servo to set the wind-up servo (and therefore the spool) back to a horizontal position and then rotate the wind-up servo to raise the prop back up ready to drop again.
Below is the parts list for this project. You will need to copy the sound (.WAV) files to the microSD card from your computer. A card reader or adapter may be required to connect the microSD card to your computer. I have tested the WAV player object with 11 kHz and 22 kHz mono WAV files in both 8-bit and 16-bit format. I am unclear if other formats are supported by the object used. You can use a free audio utility such as Audacity to record, edit and modify sound files. I use Sound Forge Pro.
- (1) – Propeller Activity Board (#32910)
- (1) – 2 GB microSD Card (#32319)
- (1) – PING))) Ultrasonic Sensor (#28015)
- (2) – Parallax Standard Servo (#900-00005)
- (2) – Parallax Continuous Rotation Servo (#900-00008)
These are the main parts to the project and the first thing I did was set everything up on my desk as a prototype so I could do things like make sure I had the required objects for the hardware, and so I could center / calibrate the continuous rotation servos.
In Figure 2 you can see my prototype setup. Prototyping is essential for hashing out designs like this because you have software and hardware components mixed together. In this case I need to synchronize the motions of several servos, both standard and continuous. I also test each section independently before connecting everything together to make it easier to debug later. Servos are inherently slightly different from each other so you have to test to find the right pulse values to make each servo do what you want.
Building the Hardware
If I use this system in an actual haunted house capacity things will likely need to be set up much differently. Each dropper assembly will need to be where it can be positioned effectively. A suitable audio system would need to be installed, etc. In this article I will describe how I built the demo for the article and some ideas for customizing it and expanding it. Additional resources for some of the optional things will be available in the ZIP file download in the resources section.
The first thing to do is assemble the prop dropping assemblies which consist of one standard servo and one continuous rotation servo. In Vern’s original article he hot glued most of the parts together and that is always an option. I looked through my parts bins and found many miscellaneous brackets and decided to connect the servos in this manner for two reasons. One if a servo was damaged replacement would be easier. Also, I could handle heavier props without worrying about the servos coming apart and potentially falling on someone’s head.
Figure 3 shows some of the servos with the various brackets needed to connect everything. The standard servos horns were connected to the bracket that ties into the continuous rotation servo. The standard servos then mounted to my wooden platform via some right-angle brackets.
I chose to use wooden spools available at any craft store and screwed the horn from the continuous rotation servo into the wooden spool (Figure 4). It’s important to make sure the horn is centered before drilling into the spool. Otherwise it will wobble when winding up the prop. This might cause the prop to bounce and not wind up properly.
The hole in the spool allows you to screw the servo horn into the continuous rotation servo, and with the brackets attached that completes the wind-up stage of the servos. Figure 5 shows a completed wind-up stage and the other continuous rotation servo ready to have the spool attached to it.
Now we’ll attach the continuous rotation servo to the standard servo horn completing the entire drop assembly (Figure 6a and Figure 6b). This is duplicated so that there are two droppers in my system. Each pair of servos was coupled using the same pieces of hardware. I cut the longer brackets down so they connected to the right angle brackets mounted to the servos.
If you need some metal brackets and other hardware, Parallax does carry most of what I used here or some variation of it. Now it’s time to connect these completed dropper assemblies to the Activity Board. Take note of the I/O pin assignments in the code when connecting everything to the Activity Board.
My servo cables weren’t long enough, so I got an Assorted 3-Wire Extension Cable Pack (#751-00010) and used several 3-Pin Single Row Headers (#451-00303) to extend the servo cables to the board as well as the PING))) Sensor. I also used a Veho Speaker (#900-00018) and Mounting Bracket (#725-32905) for programming and testing (Figure 7).
All the servo connections and the PING))) sensor connect to the servo headers on the Activity Board. The microSD card is in the socket and the Veho speaker is plugged into the audio jack.
In order to realize a working demo in a reasonable space, I attached all my parts to a 3′ length of plywood to use as a demo platform. Figure 8 shows the demo completely assembled and ready for props to be attached.
The power supply for the demo is a Parallax Lithium Ion Power Pack Full Kit (#28989). I find these very useful for providing portable, rechargeable power for my projects (Figure 9).
Writing the Software
As is typical for many programs based on the Propeller chip, the top object was written completely by me, while several other objects from various sources were referenced to make use of some of the hardware. The Ping))) and Servo32 objects from the Propeller Library, as well as the KISS WAV Player V2 written by Kye on the Parallax Forums.
The program initializes the servo and WAV objects then starts a loop where the droppers go through a reset phase, then wait for a person to scare. While the wind-up servos were idle I adjusted the potentiometer on them so that they didn’t spin at all. This is the typical center calibration required for Parallax continuous rotation servos. It took several tries to get the exact pulse values to use for the tilt servos to get them to drop vertically and reset horizontally. These values were also different for each tilt servo. The same testing was required to get the wind-up directions and speeds. All these values get plugged into the correct constants at the beginning of the code. I can pretty much guarantee the default values won’t work for you.
Depending on the filenames of your sound files on the microSD card you will most likely need to edit the names in the code where the sounds are played. These are commented to make them easier to find.
Ready for Testing
The demo unit was placed on top of a ladder since that was the tallest platform I had available. I attached a bat and a spider that my wife picked up from a craft store. I also loaded the microSD card with a bat screech and scream WAV files, and adjusted the code accordingly. When the bat drops it makes a screech sound. When the spider drops it makes a female scream / shriek sound. Of course you can use any sounds you want or even record your own.
Modifications and Expansion
Typically when I create a new project I actually come up with different ideas for how things could be done while writing or testing code. This time was no exception. The ZIP file you can download from the resources section will contain not only the schematic and code used for what is covered in the article, but also two variants I experimented with. V1.0 provides a single sensor for detecting people and a simple timed rewind cycle similar to what was used in Vern’s original Prop Dropper. V1.1 adds an infrared encoder to the wind-up servo so that it will wind based on turns instead of time. V1.2 adds an extra PING))) sensor and allows each prop dropper to work independently rather than being synchronized with one sensor.
You can also add additional dropper assemblies and even more sensors. One Propeller Activity Board can control many sensors and servos allowing for a good amount of expansion. An XBee module could be added to synchronize this system to another dropper or related project.