Shop OBEX P1 Docs P2 Docs Learn Events
Need to make a "POP" sound — Parallax Forums

Need to make a "POP" sound

LloydsLloyds Posts: 75
edited 2009-10-07 03:11 in BASIC Stamp
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

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2009-10-04 05:23
    Lloyds

    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
  • LloydsLloyds Posts: 75
    edited 2009-10-05 02:53
    WMc-
    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
  • Lab RatLab Rat Posts: 289
    edited 2009-10-06 04:36
    may i ask what you need to make this "POP" sound for. and the best and easiest way to protect any chips is to have a diode in parallel with the coil i forget which way to put it in cause its been almost six months since i did the relay project

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax posesses power beyond belief.

    Believe in it.
    Visit me at
    http://jrelectromech.services.officelive.com/default.aspx
    ·
  • LloydsLloyds Posts: 75
    edited 2009-10-07 03:11
    Rat,
    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
Sign In or Register to comment.