May 04, 2024, 08:59:40 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


"Psycho Pumpkin" for Company Pumpkin Carving Contest

Started by aalegado, October 28, 2009, 05:48:59 PM

Previous topic - Next topic

aalegado

My company held a pumpkin carving contest and my department entry won first place with the help of a Basic Stamp driven light and sound show. It's not anywhere near the quality of a commercial halloween haunt but it was still pretty entertaining. None of the other entries had any light or sound effects so I might have won because I brought an assault rifle to a knife fight!  ::)

I used a Parallax Board of Education but it would have been a bit easier if I'd used a Prop-2 with it's built-in screw terminals and high-current output support. I used the BOE and a second breadboard to hold all of the LED driver circuits: One ULN2803 (I used only channel to control the relay) and 6 discrete 2N2222-based drivers for the "high current" LEDs.

The entry consisted on a carved pumpkin mounted on a wood stand with several different LED lighting effects and a "psycho" music sound effect at the end of the sequence. The stand was hidden in a pair of baby's jeans and the electronics in a handy card board box I put behind the stand. The effects (in order that they occur):


  • White LED illuminates the Bate's House. Stays lit throughout rest of sequence.
  • The pumpkin's yellow LED eyes flicker. They "randomly" flicker throughout the rest of the sequence.
  • Blue LED "neon" sign flickers and then turns "on." The neon sign "randomly" flickers throughout the rest of the sequence.
  • "Psycho Pumpkin" sign lights up. The sign "randomly" flickers throughout the rest of the sequence.
  • White LED lights up behind a image of the bloody hand touching the shower curtain from the shower scene in the movie "Psycho." At the same time, red LEDs located behind the shower curtain flash ("blood" spatter),  a sound effect is played (the piercing theme from the shower scene in the movie "Psycho"), and the servo-controlled, knife-wielding arm moves in and out towards the shower curtain.
  • After a few knife strokes, everything stops/goes dark and the sequence restarts after a four second delay.

The sound is provided by a greeting card with a 10 second  record/play-back capability I found at Target for $7. It required a normally-closed switch to open in order to trigger playback so I used a SPDT relay wired in parallel with the greeting card's switch mechanism.

Here's a link to a Facebook photo album: http://www.facebook.com/album.php?aid=2042972&id=1293091406&saved
Here's a link to the YouTube video of it in action: http://www.youtube.com/watch?v=xUAO4VKsa48&feature=player_embedded

aalegado

I just realized that this post violates the posting guidelines. I sent a PM to the moderator to delete the post. Sorry!

The violation is that it uses a Parallax BOE which isn't a Efx-Tek product.

JonnyMac

Since we're pretty friendly with Parallax we'll let it slide -- but you really should post it in their forums, too.
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Shawn
Scaring someone with a prop you built -- priceless!

aalegado

I don't have the code handy right now...I'll post it tonight.

aalegado

Attached are the program listing, circuit schematic, and some photos of the pumpkin.

The code is relatively unsophisticated: There is a main loop that uses a combination of HIGH/LOW statements or subroutine calls to light different combinations of LED effects.

Certain effects are actually pre-defined sequences of HIGH/LOW of a particular LED effect such as the simulated Neon sign (it flickers slowly, then quickly, and then stays "On" like a Neon sign might do). I created these sequences by experimentally determining combinations of the HIGH/LOW statements with different PAUSE values. There Neon sign subroutine itself calls subroutines to flicker the Eyes, flash the Sign, etc. By re-using subroutines and/or nesting shorter LED effect subroutines in the larger Neon effect subroutine, I was able to build a complex-looking lighting sequence.

After going through different combinations of subroutine calls, the FOR-NEXT loop is used to operate the servo and cause it to move back and forth about 0.125" which is enough to operate the "knife-wielding arm" effect. Lighting effect subroutines are called from within the loop to cause all the LED effects to flash in synch with the knife strokes. After a few strokes, everything goes dark and the sequence starts over.

My crude, hand drawn schematics need some explanation:

Circuit "A" is the typical circuit used to drive either a motorcycle LED lamp strip or a three RGB LED array. These LED lamps/arrays were chosen because they were easy to build into the pumpkin display and had built-in current limiting resistors. Three iterations of circuit "A" were made to support the simulated Neon light (using just the Blue segments of the RGB LEDs), the "Psycho Pumpkin" Sign (two, 12V motorcycle LED lamp strips in parallel), and the Shower Scene red LED flicker effect (using the Red segments of the RGB LEDs. V+ is the Vin provided by the unregulated, 12V wall-wart that comes with the BoE.

Circuit "B" is the typical circuit used to drive discrete LEDs. It's basically the same circuit as "A" except I had to use a discrete current-limiting resistor. Three iterations of circuit "B" were made to support the House and Shower LEDs (both were very high intensity 1W Luxeon white LEDs; these used a 100Ohm 1/2W current-limiting resistor), and the paired yellow LEDs that made up the Eyes (these LEDs used a 470Ohm current-limiting resistor). V+ is the Vin provided by the unregulated, 12V wall-wart that comes with the BoE.

Circuit "C" is the relay used to trigger the greeting card sound module. The relay's NC contacts were wired in parallel with the trigger for the sound module's customer-recording sound (this was the shower scene theme music from Psycho). The sound module stored 10 seconds of low quality sound—a bit harsh on the ears but very recognizable. The relay is driven by one channel of a ULN2803 driver IC. V+ here is actually Vdd from the BoE.

Finally, circuit "D" is the hook-up for a Futaba servo.

Circuits A and B were built on a small breadboard. Circuits C and D were built onto the BoE's small breadboard. The BoE and small, separate breadboard were put into a small cardboard box positioned just behind the legs of the pumpkin.