Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
aashish_delhi
PostPosted: Mar 31, 2011 - 06:53 AM
Wannabe


Joined: Jan 04, 2008
Posts: 67


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...
 
 View user's profile Send private message  
Reply with quote Back to top
glitch
PostPosted: Mar 31, 2011 - 07:40 AM
Raving lunatic


Joined: Jan 12, 2002
Posts: 7835
Location: Canada

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.]
 
 View user's profile Send private message  
Reply with quote Back to top
Kas
PostPosted: Mar 31, 2011 - 08:43 AM
Resident


Joined: Nov 06, 2005
Posts: 673
Location: Vilnius, Lithuania, Continental EU

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.
 
 View user's profile Send private message  
Reply with quote Back to top
aashish_delhi
PostPosted: Mar 31, 2011 - 10:45 AM
Wannabe


Joined: Jan 04, 2008
Posts: 67


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. Smile

_________________
-Aashish.
If you don't see it coming, you'll never know what hit you...
 
 View user's profile Send private message  
Reply with quote Back to top
bobgardner
PostPosted: Mar 31, 2011 - 12:33 PM
10k+ Postman


Joined: Sep 04, 2002
Posts: 23948
Location: Orlando Florida

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
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
stevech
PostPosted: Mar 31, 2011 - 06:06 PM
Raving lunatic


Joined: Dec 18, 2001
Posts: 5370


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.
 
 View user's profile Send private message  
Reply with quote Back to top
aashish_delhi
PostPosted: Apr 01, 2011 - 07:32 AM
Wannabe


Joined: Jan 04, 2008
Posts: 67


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. Smile

_________________
-Aashish.
If you don't see it coming, you'll never know what hit you...
 
 View user's profile Send private message  
Reply with quote Back to top
chartman
PostPosted: Apr 01, 2011 - 09:41 AM
Resident


Joined: May 01, 2003
Posts: 620


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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits