Need to make a "POP" sound
Lloyds
Posts: 75
Hello everyone,
I want to make a single reasonably loud (in a quiet room) "POP" sound. I want to keep it compact, and have to buy a speaker, so maybe a little Piezo?
Could I just hit the speaker with 5 volts using the PULSOUT command, and adjust the duration to get the right "POP" sound. Or maybe the PWM command?
All suggestions are appreciated!
Thanks,
Lloyd
I want to make a single reasonably loud (in a quiet room) "POP" sound. I want to keep it compact, and have to buy a speaker, so maybe a little Piezo?
Could I just hit the speaker with 5 volts using the PULSOUT command, and adjust the duration to get the right "POP" sound. Or maybe the PWM command?
All suggestions are appreciated!
Thanks,
Lloyd
Comments
A "POP" is pretty easy to reproduce. Try this.
Speaker PIN 0
Pop CON 10 '? ( 1 to 1000 )
Main:
HIGH 0
PAUSE Pop
LOW 0
PAUSE 10000
GOTO Main
I tried this on my PDB and it worked pretty good. Its not very loud.
A transister would help to make it louder.
___________________$WMc%________________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
Thanks. I tried a slight variation on your suggestion tonight and it worked, too. I ran the pulse through an L295 relay driver (your transistor) and it gave a pretty decent pop with a 3 ohm speaker when I hooked it up with the driver switching 12 volts. I think the relay driver will protect the stamp from possible back emf from the speaker coil which I understand can do some damage to the stamp.
Is that a Sox and Martin 'Cuda in the pic?
Lloyd
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax posesses power beyond belief.
Believe in it.
Visit me at
http://jrelectromech.services.officelive.com/default.aspx
·
Regarding my setup, I am using the stamp to evaluate several inputs, do a couple of calculations, and then energize a pair of remotely located solenoids. I wanted to make the pop sound to serve as an indicator of when the remote solenoids energized during testing. I had some LEDs hooked up in parallel to the solenoids to serve as indicators, but they were too hard to watch and I decided an audible alert would work better. I do have a diode hooked up at each solenoid as part of the L295 circuitry.
When I put the post up originally, it didn't occur to me that i could just drive a speaker instead of a solenoid, and a little 12 volt pulse into the speaker would make a nice pop. You guys suggested driving a speaker with a transistor, and it finally dawned on me that I already had what I needed.
Thanks again,
Lloyd