1
\$\begingroup\$

Can piezo-buzzer be interfaced with MCU same as normal 5V continuous buzzer?

I am talking about the flat thinnest buzzer like this.

enter image description here

We need to feed PWM to this to create different tones right? If yes, do we need to provide PWM at audio frequency or any other resonant frequency?

I can't find any proper datasheet for such parts, so finding exact parameters are difficult.

\$\endgroup\$
1
\$\begingroup\$

No, what you show needs to be driven differently than a "buzzer". It's not a buzzer, just a piezo transducer. These things don't oscillate on their own. You have to drive it with the signal you want to emit, not just apply power as with a buzzer.

To know how to drive this buzzer, read it's datasheet. The supplier you bought these from should be able to supply a datasheet. If not I wouldn't trust them.

If you can't get hold of a datasheet for these parts, look around on web sites of reputable suppliers for something similar. At least that will give you a rough idea.

Piezo elements look mostly capacitive to the driving circuit, but can also exhibit kickback like inductors and can generate high voltages when subjected to mechanical shocks.

For starters, connect one of these between a microcontroller PWM output pin and ground. Add reverse Schottky diodes to power and ground to protect the microcontroller output. Drive it with 1 kHz square wave and see what you get. Look at the voltage and see how clean it still is after being loaded by the piezo. If it's a mess, then that's a good clue that the micro output isn't strong enough to drive the piezo well at that voltage.

You can try putting a double emitter follower (NPN and PNP) on the output of a opamp to drive the piezo from a higher voltage and with lower impedance. What you show can probably take a few 10s of volts without damage, but of course without a datasheet we don't really know what the limits are.

\$\endgroup\$
  • \$\begingroup\$ thanks for your insights. It looks like it is more of a trial and error method. I might have to make boost circuit to drive this thing. I saw this thing in the Tile and it is pretty loud but couldn't figure out it's driving mechanism. But anyway thanks for pointing direction. \$\endgroup\$ – Vishal P Nov 17 '16 at 12:29
  • \$\begingroup\$ @user2365252 Observe that the metal plate electrically connects to the black wire - be careful when mounting that this goes to your driver "ground". Mounting should be at circumference, but still will likely alter the free-air audio resonant frequency. \$\endgroup\$ – glen_geek Nov 17 '16 at 14:55
1
\$\begingroup\$

First, measure the capacitance- that is the most important parameter for driving them. Probably a few tens of nF. The other parameter is resonant frequency, but that is influenced by the design of the cavity you mount them in. The acoustic output will also be heavily influenced by the cavity design and the mounting method.

The vibration mode of this kind of element is oil-canning so there is a mechanical null line that forms a circle concentric with the element. Usually we try to use a molded plastic knife edge at the null point for mounting so as not to damp the element/cavity resonance too much.

It is preferable not to put DC across the elements, so you can drive them (to some level of volume) with a GPIO pin and a series capacitor. The only danger of that is that shocking the element (tapping it, for example) will generate voltage (like a piezo BBQ lighter) that could conceivably damage the MCU. You can slap some Schottky diodes in there (BAT54 for example).

Another method that will give you more volume is to drive push-pull using two outputs (in which case you may not need the series capacitor if you turn them both to the same state when off). In that case, you could use 2 BAT54 dual diodes.

For more drive voltage and current, you can consider using one or two (push-pull) MOSFET gate drivers which are inexpensive and designed to drive large capacitive loads. They will also shift the voltage so you can drive perhaps 60Vpp from a low voltage source. That's probably getting to the ear-piercing 100dB+ sound pressure level with good mounting and cavity design, assuming a relatively large element (20-25mm). Typical voltage rating is 30V, so that would be right at the the limit.

Just to start, try this:

schematic

simulate this circuit – Schematic created using CircuitLab

With a frequency of 1kHz-5kHz. Yes, it puts DC across the element, but it won't hurt it for some testing.

You can sweep the frequency and determine the resonant frequency of the bare element.

Incidentally, hardware PWM does not give you what you want. It will change the duty cycle with a fixed base frequency. You need to change the base frequency. Typically (it varies with the micro) this might be done with dedicated frequency generation hardware or simply by reloading a compare timer module (most PICs will do this nicely) through an interrupt. The timer directly toggles the output pin in hardware so get almost no jitter provided the interrupt service routine can reload the compare value before the next transition comes along. For a 5kHz output you have edges only every 100usec, so there is rather a lot of time to reload the compare.

\$\endgroup\$
  • \$\begingroup\$ I agree the resistor of 1K across buzzer has worked wonderful. I am running buzzer at 4 KHz PWM right now and it works like a charm. I even found an answer for the reason we need to put this resistor across the buzzer here on the stack overflow itself. I will post the link to that if I found it again. Thanks. \$\endgroup\$ – Vishal P Mar 23 '17 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.