Author Topic: Piezo buzzer questions  (Read 7499 times)

0 Members and 1 Guest are viewing this topic.

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Piezo buzzer questions
« on: January 31, 2016, 04:16:10 am »
Hi,

I've been playing around with driving these to see what I can do with them.  I am using a 5V microcontroller.  I've got a though hole "passive" piezo (the typical cheap round type) from China that has been my test subject.  Right now I have it connected:

VCC - resistor - piezo lead 1
piezo lead 2 - mosfet drain
mosfet source=ground
mosfet gate driven by microcontroller directly

I don't get much sound out of it unless I use a very small resistor.  I am not interested in getting the rated frequency, but want to use it to make a simple tick noise (full on/ full off) and also an error low frequency buzz noise (100hz).

I realize not using it in its range may be why I'm not getting the volume out of it without lowering the resistor, but these are the two sounds I want.

I plan on running the error buzz for 125ms and during this time it uses around 45 mA which seems like quite a bit.

Especially when I see a data sheet like this for something different:

http://www.cui.com/product/resource/cmt-1603-smt.pdf

It talks about 3 ma as a maximum - is that advertising what it can do without exceeding 3mA, or is the design of these devices so that you can exceed that without damaging them as long as you remain inside the voltage maximum's?

Thanks,

Alan
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2410
  • Country: us
Re: Piezo buzzer questions
« Reply #1 on: January 31, 2016, 05:14:07 am »
Hi

The piezo buzzer *looks* like a capacitor. If you know it's capacitance and the frequency you are hitting it with, you can come up with an AC current that is going through the buzzer. That's what they are concerned about in terms of damaging the poor little thing.

The "this is to complicated" approach is to simply drop the resistor to the point that the sound is loud enough and see if it blows up. Best bet is that the thing was designed to be pretty loud, so you still will not be damaging it. Of course I have been wrong before ....

Bob
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Piezo buzzer questions
« Reply #2 on: January 31, 2016, 06:03:41 am »
I'm confused, you describe it as a "passive" piezo. Do you mean a simple piezo element with no internal electronics, rather than a buzzer?

If so then from the connections you describe, you're effectively driving it with DC... When you turn on the mosfet the drain pulls down to 0V, but when you turn it off there is nothing other than the piezo's internal leakage to pull it back up again (as Bob says, it's mostly capacitive).  Try putting a resistor in parallel with the piezo and you might find that the volume increases dramatically.

If it is a simple small piezo disc then you ought to be able to drive it directly off the micro-controller port. In fact a common way of increasing the volume is to drive it between two outputs toggling in anti-phase, effectively doubling the voltage swing.

None of the above applies of course if it is a (edit: higher current) active electronic buzzer.
« Last Edit: January 31, 2016, 06:07:45 am by Gyro »
Chris

"Victor Meldrew, the Crimson Avenger!"
 

Offline dadler

  • Supporter
  • ****
  • Posts: 842
  • Country: us
Re: Piezo buzzer questions
« Reply #3 on: January 31, 2016, 06:21:39 am »
What does your buzzer look like?

Does it look like this:



If so, these are active buzzers, with an internal oscillator and current limiting. This type will pull about 25-50mA @ 5V with no current limiting resistor. If you use much resistance, they either go silent or sound "sick". You can't really change the oscillation frequency in these externally.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #4 on: January 31, 2016, 06:52:40 am »
It does not have any drive circuit in it.

I tried putting resistance across it and it is maybe the smallest bit louder with it, but hardly noticeable.

I'll try driving it from the uc directly and see what it does - what are some common drive circuits?

EDIT - I did also add a reversed biased diode.
« Last Edit: January 31, 2016, 06:59:36 am by alank2 »
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Piezo buzzer questions
« Reply #5 on: January 31, 2016, 07:13:49 am »
Ideally you should be driving it actively up and down, as in the output stage of a logic gate rather than just in one direction (even with the added resistor). If you're still trying to make it 'tick' at low repetition rate then it probably won't get that loud anyway because there isn't much energy going into it (just the brief capacitive charge and discharge). Try driving it at several kHz, resonant effects help then too.

You don't need to include the reverse biased diode as it doesn't have an inductive component, it's capacitive.
Chris

"Victor Meldrew, the Crimson Avenger!"
 

Online Hero999

  • Super Contributor
  • ***
  • Posts: 11276
  • Country: gb
Re: Piezo buzzer questions
« Reply #6 on: January 31, 2016, 07:19:46 am »
Connected between two I/O pins on the microcontroller and drive each I/O pin with the opposite phase waveform.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #7 on: January 31, 2016, 07:36:13 am »
You don't need to include the reverse biased diode as it doesn't have an inductive component, it's capacitive.

Would that be different than a piezo that has an active driver in it?  I always thought on those you needed the reverse viased diode - or is that for a different type of buzzer?
 

Offline dadler

  • Supporter
  • ****
  • Posts: 842
  • Country: us
Re: Piezo buzzer questions
« Reply #8 on: January 31, 2016, 07:54:29 am »
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Piezo buzzer questions
« Reply #9 on: January 31, 2016, 08:18:51 am »
You don't need to include the reverse biased diode as it doesn't have an inductive component, it's capacitive.

Would that be different than a piezo that has an active driver in it?  I always thought on those you needed the reverse viased diode - or is that for a different type of buzzer?

I'm not sure, I guess it's possible that some of them have some sort of L-C arrangement to boost the piezo drive, but I've never seen one. There are also some small buzzers that are magnetic rather than piezo. I guess it wouldn't hurt to include one just in case, but only in the case of a DC powered an active one.
Chris

"Victor Meldrew, the Crimson Avenger!"
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #10 on: January 31, 2016, 08:49:12 am »
I use some "active" piezo in another project and I measured it and it does have a voltage spike when ti turns off, it was up to 60V as I recall so I put a reverse biased diode in there...
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 7850
  • Country: au
Re: Piezo buzzer questions
« Reply #11 on: January 31, 2016, 11:11:45 am »
You don't need to include the reverse biased diode as it doesn't have an inductive component, it's capacitive.

Would that be different than a piezo that has an active driver in it?  I always thought on those you needed the reverse viased diode - or is that for a different type of buzzer?

The old-fashioned way of making a buzzer was to wire up a relay with the coil powered through a set of NC contacts.  For that type of buzzer a reverse biased diode across the coil is advised.

Not for piezo.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #12 on: January 31, 2016, 12:43:52 pm »
I got it working pretty well by using two gpio pins and a resistor.  I sized the resistor to allow 85% of the maximum current the uc pins can handle and it works pretty well.  Thanks everyone.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #13 on: February 02, 2016, 06:10:42 am »
What is the difference between piezoelectric and electromagnetic - mouser lists these types.
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Piezo buzzer questions
« Reply #14 on: February 02, 2016, 06:18:11 am »
I think you've got the hang of piezo ones now, in both bare element and active. The electromagnetic involve a coil and a magnetic or at least ferrous diaphragm. Almost always supplied in 'active' form - the 'bare' form would be a small loudspeaker.
Chris

"Victor Meldrew, the Crimson Avenger!"
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #15 on: February 03, 2016, 12:40:34 am »
What are the advantages of each type.  I found both types at around the same price point at Mouser.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 7850
  • Country: au
Re: Piezo buzzer questions
« Reply #16 on: February 03, 2016, 01:02:22 am »
As mentioned above piezo devices are of two types.

One is the bare transducer - which is just a wafer of piezo material with contacts either side.  It reacts to an applied voltage like this:


(One set of these + and - signs needs to be reversed!)
... and if you apply DC voltage, then it will just bend in one direction and stay there.  To get an audible tone, you need to apply a voltage that varies.

Which leads us to the second type - an active device, which has an oscillator circuit built in.

Advantages of piezo transducers:
 - low power consumption for high output
 - no back EMF problems
 - lightweight
and when you have access to the oscillator circuitry:
 - can control volume easily
 - can change frequency easily

Electromechanical buzzers are essentially relays wired up to repeatedly turn on and off and they only have one real advantage that I can think of at this moment - you only need a suitable DC power source for them to work.
« Last Edit: February 03, 2016, 01:06:51 am by Brumby »
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #17 on: February 03, 2016, 01:15:20 am »
Thanks Brumby - I understand the passive vs. active thing now.

Here is a device that says it is electromagnetic - but since it talks about a square wave I am assuming it is not active with a driver built in:

http://www.mouser.com/ProductDetail/PUI-Audio/SMT-1127-S-R/?qs=%2fha2pyFaduhhFS9%252bGv%2ffsJn54YlgoPEgtA7%2fN8kErx9w1mCUvJ4uTw%3d%3d

How does this device differ from a piezo?  Assuming both are passive, what advantages or disadvantages would it have?
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 7850
  • Country: au
Re: Piezo buzzer questions
« Reply #18 on: February 03, 2016, 01:42:14 am »
Apologies!  I've not been paying attention.

That electromechanical buzzer is like a hobbled loudspeaker.  It does need a varying voltage to work, so it is similar to the bare piezo element in that respect.

I don't know enough about this type of product to comment about its advantages, but I think the operating voltage will generally be lower than for piezo transducers.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #19 on: February 03, 2016, 08:03:12 am »
I figured out last night that what I've been using is an electromagnetic type device without any driver in it.

Once I got my hands on a real piezoelectric, I found it doesn't need a resistor and uses much less current.  Another difference is that the PE type can't do a sinewave below 1kHz very well, where the EM type has no issue with it.  The PE can do a squarewave just fine and I tested it at 100 Hz.

Is the EM type more like a speaker?

If the piezo was just the disc you sometimes see, would it make noise or does it need an air chamber of some sort to do that?
 

Online Hero999

  • Super Contributor
  • ***
  • Posts: 11276
  • Country: gb
Re: Piezo buzzer questions
« Reply #20 on: February 03, 2016, 08:11:50 am »
The electromagnetic transducer is most likely a moving iron speaker.
https://en.wikipedia.org/wiki/Moving_iron_speaker

16R is too low for a microcontroller to drive which is why you found you needed a resistor. Another option is to drive it with an external transistor but make sure you don't exceed the maximum current/power rating.
 

Offline alank2

  • Super Contributor
  • ***
  • Posts: 1919
Re: Piezo buzzer questions
« Reply #21 on: February 04, 2016, 12:25:27 am »
Thanks Hero999 for that - that is what it looks like from the top all right.

I found this page with lots of info in case any one is interested:

http://dbunlimitedco.com/frequently-asked-questions
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf