Electronic – Piezo circuit issues

piezo-buzzerpwmtransistors

In my circuit I am seeing strange behavior from my piezo. I am driving a 4Khz (TDK PS1240P02BT) piezo buzzer with a BSS138K N-channel logic-level enhancement FET. The PWM output of my microcontroller (PIC18) is connected directly to the gate of the transistor with a 100K Ohm pull-down also attached to the gate. The PS12 piezo has a 1K Ohm resistor in parallel just like the data sheet recommends. The voltage driving the piezo is 12V, and the gate voltage is 3.3V.

Circuit:

enter image description here

Edit: Added potential simulation with Olin's suggested clamping diodes:
simulation

The issues I am seeing are dying transistors, piezo volume dropping during longer tones, and the piezo failing to work for a while after playing, and then working again after "resting" for a while.

I have a couple of questions:

  1. Any ideas why the transistors are dying? It doesn't appear to be getting too hot.

  2. Is there a way to determine the impedance of the piezo? It does not appear to be listed in the data sheet. I tried modelling the circuit but this is difficult to do accurately when the capacitance of the piezo is unknown. I did see much higher current spikes than expected when using ~100nF values.

  3. The data sheet lists the piezo at 3.3VP-P, but says it can tolerate up 30V with no DC bias. Is running this through 12V going to destroy the piezo?

  4. Generally, are current limiting resistors and flyback diodes needed for piezo drivers, and if so how does one calculate the value of the resistor?

  5. Finally, as an aside, would the piezo survive in an automotive environment (my current problems occur on the bench with a regulated supply), e.g. would the voltage transients quickly destroy the piezo?

Best Answer

Piezo elements can look quite inductive to the circuit. They can also produce high voltages from external shocks. Some barbecue lighters make a spark electrically by whacking a piezo, for example.

The problem is that either or both of these effects are causing high voltage which is frying your transistor. Make sure there are reverse diodes to ground and power to provide a safe path for any current that would otherwise cause a high voltage. Schottky diodes would be good in this case since they are fast and your voltages are low.