Piezoelectric driver finds buzzer’s resonant frequency
By driving a piezoelectric buzzer near its resonant frequency and counting the residual oscillations, a microcontroller can find the buzzer's resonant frequency.
Mehmet Efe Ozbek, PhD, Atilim University, Incek, Ankara, Turkey; Edited by Martin Rowe and Fran Granville -- EDN, August 7, 2008
Piezoelectric buzzers find wide use as audible-signal generators because of their low power consumption and clear, penetrating sound. An external driver or a self-driven circuit that oscillates at the resonant frequency of the piezoelectric element can drive these buzzers. A piezoelectric element produces the maximum sound output at its resonant frequency. However, the resonant frequency of a piezoelectric element can have a tolerance as great as ±15%. An external driver tuned to the nominal resonant frequency is therefore likely to miss the actual resonance point. This Design Idea externally drives a piezoelectric element and automatically finds its actual resonant frequency.
The basis for operation is the following principle: When you apply an alternating voltage to the terminals of a piezoelectric element, the element will begin to vibrate. If you remove the excitation, vibrations will continue in a damped manner before they cease altogether. These residual vibrations will cause damped oscillations at the terminals of the piezoelectric element. If the excitation is close to the resonant frequency, the vibrations will be stronger and the residual oscillations will last longer (Figure 1). You can determine the actual resonant frequency by trying all the frequencies around the nominal resonant frequency and comparing the duration of residual oscillations.
In this design, a Microchip PIC18F452 microcontroller drives a piezoelectric element through its I/O pins, RB4 and RB3 (Figure 2). Initially setting RB3 to zero and RB4 to one and toggling them after each half-period generates an alternating piezoelectric voltage (VP) with a 0V-dc bias. After applying 10 cycles, RB3 is kept low, and RB4 is made an input to count the low-to-high and high-to-low transitions of VP. Enabling the “interrupt-on-port-change” feature of Port B for 10 msec and incrementing a counter in the interrupt-service routine counts the transition of the piezoelectric voltage. Listing 1 demonstrates this feature. The program repeats these steps for all frequencies of interest and identifies the frequency corresponding to the maximum number of transitions at the resonant frequency. You can easily expand the idea for the case of multiple resonant frequencies.
-
The idea is neat, but I think this code is flawed.
After the 10 cycle "pre-charging" of the piezo, there is a moment when both pins are pulled low for as long as delay_us(period), thus shorting out some of the piezo's energy, right before counting the free oscillations, resulting in a less sensitive reading.
10 VID - 2011-30-7 05:00:13 PDT -
The idea is neat, but I think this code is flawed.
After the 10 cycle "pre-charging" of the piezo, there is a moment when both the output pins are pulled low for as long as delay_us(period), thus shorting out some of the piezo's energy, right before counting the free oscillations.
10VID - 2011-30-7 04:51:26 PDT -
Maybe talking through my hat and out my rear here, never tried this, but seems a 2-terminal device should also have a impedance peak at the self-resonant frequency, like a regular quartz crystal or ceramic resonator.
.
If this 2-terminal device was included in a positive feedback loop (with an shunting attenuator to allow power drive for volume not needed for the actual feedback oscillation), would it not oscillate at it's natural resonant frequency?
Glen Chenier - 2008-12-8 16:49:00 PDT -
The simple self-resonant Murata piezo driver is for a special 3-terminal sounder, the third pin being a feedback pin. Quite a neat arrangement. Crude 2-pin piezos require some sort of other feedback to hit the sweet spot. I had a similar design problem a few years back coming up with a piezo transformer driver, not made easier by the peak resonant frequency shifting about as a function of temperature, humidity, aging and sheer bloody-mindedness.
Darren Holdstock, UK - 2008-11-8 06:42:00 PDT -
There are much easier ways to do self-tuned piezo drive, and they've been around forever. For example, see the bottom of page 25 in the muRata Piezoelectric Sound Components catalog (www.murata.com/catalog/p37e22.pdf#page=25) where one such topology is suggested to muRata customers. The design procedure is given in the muRata "Piezoelectric Sound Components Application Manual" (www.murata.com/catalog/p15e6.pdf#page=6)
Dan Wagner of Motorola - 2008-7-8 17:01:00 PDT


















