how to use a piezo buzzer/tweeter?

8 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,
I want to put a small "beeper" on a AVR dev board that I made. I have seen some piezo devices that beep when they are simply connected to a DC supply, so I am looking for something like that.
However, a small piezo device (which looked very similar to what I wanted) that I bought from a local store does not beep or do anything when connected to 5V off the board. I had asked for a 5V piezo buzzer and the store guy handed me this thing and told me that it takes 3V to 12V.
I read some articles/posts about the differences between a "buzzer" and a speaker, etc, and some posts mentioned piezo devices that need to be pulsed instead of being given a simple dc supply.
This little device that I bought just has +ve and -ve markings on it; nothing about any resonant freq in KHz or anything.
So I am not sure what I actually bought, and it'll be a while before I can go to that store again. I also suspect that I just might've blown the poor thing by connecting it with wrong polarity.
Any ideas/thoughts...? Any homework that I should do...?

-Aashish.
If you don't see it coming, you'll never know what hit you...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

a buzzer typically has it's own internal oscillator and drive, thus you only need to apply power to make it work. What you have sounds like a piezo speaker, thus you have to provide it with an AC waveform with your audio signal. The easiest way to do this is to use the AVR's PWM functionality, with complimentary outputs. Attach each of the complimentary outputs to the terminals of the piezo, this will in effect present it with a +/-5V [10Vp-p] signal. Then simply drive the PWM with your audio data for the tone/signal you'd like to generate. [you can use a simple square wave of the frequency you want, but you may find that it sounds a bit staticy, feeding the PWM with a series of sinewave samples will likely produce a cleaner sounding result.]

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Second option is that You have something like:
http://www.eleccircuit.com/self-resonance-piezo-buzzer-with-1-18v/
That's because You had polarity marked and voltage range. Simple transducer usually is not specified by these parameters.
Inverted voltage could damage transistor (reversed Vce).
Macho men rip it and replace transistor, there's regular NPN BJT.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks guys! I will try to buzz it using the AVR or a simple 555 timer. I'll get back if I still cant get it to sound, but I hope it will work just fine. :-)

-Aashish.
If you don't see it coming, you'll never know what hit you...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you use 2 regular outputs 01 then 10, it puts 5V one way then the other way... 10V pk to pk. To beep at 2khz, it needs to be 250usec at one pattern and 250usec at the other. Each on off cycle is half a ms, so to beep for 10ms, go thru the loop 20 times.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a bunch of $0.50 beepers that have an internal circuit such that all you do is apply voltage and they beep. No need for a pulsed input.

I also have some that lack the internal circuit (oscillator). I guess those are valuable if you want varying frequencies, within the limits of the transducer. But for this, you can also simply use a small ordinary loudspeaker.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have a bunch of $0.50 beepers that have an internal circuit such that all you do is apply voltage and they beep. No need for a pulsed input

Hi Steve,
Is there a way to identify these just by looking at them?
I am guessing they are the ones with polarity marked, right...? If yes, then I probably have a blown-out sample since it does nothing when I apply a voltage to it (doesn't even give a tiny squeak or something like an ordinary speaker does when you first touch a voltage to it). In any case, I think I'll be able to go back and buy another one tomorrow. This time I'll ask the store helper to beep it for me first. :-)

-Aashish.
If you don't see it coming, you'll never know what hit you...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Piezos that require a driver are usually very thin.. 1/8"..3mm
Those that have a built in driver range from 5mm-20mm thick(generally) and as noted above will have + and - stamped on the casing somewhere.