Maker Pro
Maker Pro

Driving a piezo buzzer: resultant tone is noisy. Why?

I'm trying to drive a piezo buzzer/transducer from a microcontroller. The buzzer is this one: https://www.digikey.com/product-detail/en/cui-inc/CPT-2521C-500/102-3756-ND/6012427. At the moment, my driver circuit looks like this:

Buzzer driver_schem.png

It works, generally. However, I'm now trying to pick up the tone via a separate microphone. Looking at the waveform on the receiving end...

upload_2018-5-17_20-58-18.png

It's not pretty. You can see that the overall 800Hz signal is there, but there's a bunch of additional higher-frequency oscillation too. For comparison, my phone generating an 800Hz sine wave looks like this, measured in the same way:

upload_2018-5-17_21-0-2.png

It's much cleaner; there isn't any additional oscillation, although there's some obvious noise which I can filter out.

I want to know why my buzzer isn't producing nearly as clean a tone.

My primary theory is that I am not properly handling the significant capacitance and/or back-emf of the piezo element. It's also possible that it is simply a result of using a square wave via the MOSFET rather than a smooth sine wave... but that seems unlikely to me. It could also simply be a characteristic of the buzzer itself.

Does anyone have ideas or suggestions?
 

davenn

Moderator
It's also possible that it is simply a result of using a square wave via the MOSFET rather than a smooth sine wave... but that seems unlikely to me

Not to me, a square wave is full of harmonics. There is no way you can produce a clean tone from a square wave
( well, not without some seriously harsh filtering, but it would still be far from a smooth sine wave)


It could also simply be a characteristic of the buzzer itself.

and that is likely to be a cause as well .... don't recall having ever hearing a smooth sine tone from a piezo


Dave
 
Not to me, a square wave is full of harmonics. There is no way you can produce a clean tone from a square wave
( well, not without some seriously harsh filtering, but it would still be far from a smooth sine wave)




and that is likely to be a cause as well .... don't recall having ever hearing a smooth sine tone from a piezo


Dave

Interesting. I had come to the conclusion I did because the wave that was actually being produced seems like a superposition of exactly the wave I want and something else. Am I just thinking about this too idealistically -- would the sudden on/off switching be causing the extra oscillations, perhaps as a result of the way air travels within the body of this buzzer? The element itself is enclosed in plastic, which could definitely be acting as an echo chamber.

I'll see if I can test it with a proper sine wave tomorrow.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Your microcontroller isn't using pwm to create something which averages out to a sine wave is it?
 
In the linked buzzer device the piezo element is mounted in what is effectively an echo chamber, so that will have a natural resonant frequency (which looks to be about 5khz in the 'scope trace).

Edit: As per the post below, 3.6kHz is a better estimate. Bob has better eyes than me :).
 
Last edited:
The buzzer is rated for 3700 Hz and probably has a strong resonance at that frequency. Your square wave input at 800 Hz is ringing this resonance. Looking at your waveform, assuming the lower frequency is 800 Hz, it looks like about 4.5 cycles of ringing which comes to 3600 Hz.

Bob
 
Why would you use a 3.7kHz, buzzer, and/or square wave drive if you want an 800Hz "clean tone"? Take a look at the datasheet.
 
If you drive it with a sine wave, it will not ring like that, but the output will be about 1/8 as high as it would be at the design frequency of 3700 Hz.

Bob
 
Thanks for the ideas and suggestions, this certainly is helping to point myself in the right direction.

Why would you use a 3.7kHz, buzzer, and/or square wave drive if you want an 800Hz "clean tone"? Take a look at the datasheet.

Yes, I'm aware that I am using this buzzer at a wildly different A) frequency and B) voltage than it's rated at. I chose this one because it's one of the few off-the-shelf buzzers which is rated for operation at any significant depth underwater and I'm particularly uninterested in dealing with pressure issues. The waveform it's producing still works; my FFT is picking up the 800Hz fine, even though there are also some other frequencies mixed in there.

Thanks!
 
A 1-opamp phase-shift oscillator circuit and a single-chip audio power amp will get you a nice, clean sinewave that will drive the piezo without kicking up harmonics. Distortion can be under 2-3%, and the frequency is tuneable over a narrow range with a single pot.

ak
 
Top