Assistance with Buzzer

Discussion in 'General Electronics Chat' started by c0de3, Feb 5, 2012.

  1. c0de3

    Thread Starter Active Member

    May 1, 2009
    Hi all I've got a pack of these buzzers: HERE

    I'm having trouble getting any sound out of the buzzer?

    I've written a simple test program that sets the pin high, then NOPs 10 times. It then sets the pin low, and NOPs 10 times. When I did this and looked at the scope I saw it was AC. So I threw a diode in to see if that would fix things... Nope. I've uploaded a shot from the scope. Any ideas what I'm doing wrong? Ignore the drawing that shows a LED it should be a standard diode.

    Any tips let me know. Thanks.
  2. SgtWookie


    Jul 17, 2007
  3. c0de3

    Thread Starter Active Member

    May 1, 2009
    With a 1us instruction rate, I think my code is generating a 200kz sq wave... I get confused with time conversions like this but i think that is the case. If this is correct i dont think NOP intructions will work for me! Lol

    Need to fire up the on chip timer. I think it maxes out at something like ~250us on this chip. So I think i need to loop it four times to get 1kz. Wait, i think i need to loop it twice switch state, then loop twice again... If someone would confirm that would be great, again this timing stuff confuses me.
  4. Audioguru

    AAC Fanatic!

    Dec 20, 2007
    Jameco knows nothing about it. They just buy them and sell them.
    It is not a buzzer because a buzzer has an internal oscillator. It is a piezo transducer (a speaker but the Japanese manufacturer calls it a "sounder").

    The frequency response curve on its datasheet shows many peak frequencies and many null frequencies. The one you have performs poorly at 1kHz but performs pretty well at 4900Hz. The same very high pitch as a smoke detector.

    It will not work with a diode in series with it.