Shop OBEX P1 Docs P2 Docs Learn Events
BS2e Sounds and Siren — Parallax Forums

BS2e Sounds and Siren

rfenergyrfenergy Posts: 4
edited 2005-08-24 20:12 in BASIC Stamp
Has anyone tried to use the freqout command to cause a BS2e to emulate the sound of a siren? I don't know enough about the command and its advanced parameters to get it to mnake a smooth transition between the frequencies. If anyone has any sample code os BS2e sirens or sound effects PLEASE post them so I can stop pulling my hair out!!

Mike.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-23 22:50
    It's very difficult to make a smooth transition because each new FREQOUT takes a bit of time to load an this lets the output relax. What this means is there will always be a clicking sound unless you synthesize the sound via some other method.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • doggiedocdoggiedoc Posts: 2,239
    edited 2005-08-24 11:22
    Would it be possible to generate the siren sound with discrete components and control that start/stop with the stamp?

    I seem to remember a schematic in one of my basic electronics texts somewhere. I'll have to look that up.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-24 12:11
    Sure, you could do that -- use a 555 (or 556) and let the BASIC Stamp control the reset pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • rfenergyrfenergy Posts: 4
    edited 2005-08-24 14:31
    Thanks for the information guys. That makes sense about the lag in the transition time. I'll explore the alternative of using some ancillary circuitry. Thanks again for responding.
  • doggiedocdoggiedoc Posts: 2,239
    edited 2005-08-24 20:12
    I found that schematic. Credit goes to Forrest M. Mims III, from the Basic Electronics Workbook.

    Hope this helps.





    sirenschematic.jpg


    I don't know what application you have in mind, but if you were to use the stamp to monitor whatever, say a perimeter trip-wire or tank fluid level. You probable could have it sound the "alarm" in the above circuit.

    Post Edited (doggiedoc) : 8/24/2005 8:19:54 PM GMT
Sign In or Register to comment.