Author Topic: Piezo buzzer questions  (Read 12486 times)

0 Members and 1 Guest are viewing this topic.

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Piezo buzzer questions
« on: January 30, 2016, 05:16:10 pm »
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: 2441
  • Country: us
Re: Piezo buzzer questions
« Reply #1 on: January 30, 2016, 06:14:07 pm »
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: 9410
  • Country: gb
Re: Piezo buzzer questions
« Reply #2 on: January 30, 2016, 07:03:41 pm »
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 30, 2016, 07:07:45 pm by Gyro »
Best Regards, Chris
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: Piezo buzzer questions
« Reply #3 on: January 30, 2016, 07:21:39 pm »
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 alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #4 on: January 30, 2016, 07:52:40 pm »
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 30, 2016, 07:59:36 pm by alank2 »
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9410
  • Country: gb
Re: Piezo buzzer questions
« Reply #5 on: January 30, 2016, 08:13:49 pm »
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.
Best Regards, Chris
 

Online Zero999

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

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #7 on: January 30, 2016, 08:36:13 pm »
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: 851
  • Country: us
Re: Piezo buzzer questions
« Reply #8 on: January 30, 2016, 08:54:29 pm »
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9410
  • Country: gb
Re: Piezo buzzer questions
« Reply #9 on: January 30, 2016, 09:18:51 pm »
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.
Best Regards, Chris
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #10 on: January 30, 2016, 09:49:12 pm »
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: 12288
  • Country: au
Re: Piezo buzzer questions
« Reply #11 on: January 31, 2016, 12: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 alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #12 on: January 31, 2016, 01:43:52 am »
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 alank2Topic starter

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

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9410
  • Country: gb
Re: Piezo buzzer questions
« Reply #14 on: February 01, 2016, 07:18:11 pm »
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.
Best Regards, Chris
 

Offline alank2Topic starter

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

Offline Brumby

  • Supporter
  • ****
  • Posts: 12288
  • Country: au
Re: Piezo buzzer questions
« Reply #16 on: February 02, 2016, 02:02:22 pm »
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 02, 2016, 02:06:51 pm by Brumby »
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #17 on: February 02, 2016, 02:15:20 pm »
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: 12288
  • Country: au
Re: Piezo buzzer questions
« Reply #18 on: February 02, 2016, 02:42:14 pm »
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 alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #19 on: February 02, 2016, 09:03:12 pm »
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 Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Piezo buzzer questions
« Reply #20 on: February 02, 2016, 09:11:50 pm »
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 alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2183
Re: Piezo buzzer questions
« Reply #21 on: February 03, 2016, 01:25:27 pm »
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