I'm designing a board which will feature a small SMD piezo buzzer which will be used for generating tones of varying frequencies from a PWM signal. I'm looking for a simple circuit which will be safe for the MCU and other components while also obtaining good response from the piezo.

I've been considering different options: driving directly from MCU (would like to avoid to protect MCU), driving with a single transistor (I understand this is not as efficient since it only drives the piezo buzzer in one direction) and finally with two transistors. For this last option I have the following circuit:

enter image description here

The resistors are chosen to have around 5mA for the buzzer and assuming an hFE of 100 for the dual transistor IC. BUZZ and ~BUZZ will be driven using PWM channel with complementary output on two MCU pins.

Is this circuit correct? Do I need to add other components for protecting the transistors? I've seen that other circuits place a resistor in parallel to the piezo which I'm not sure is needed in this case. Also, I'm concerned about voltage spikes generated by the piezo being manually displaced (for example, during a fall) or when the tone is cut-off.

The buzzer in question I'm considering is this one: https://www.digikey.com/product-detail/en/cui-devices/CPT-1203-78-SMT-TR/102-CPT-1203-78-SMT-DKR-ND/10326255

  • \$\begingroup\$ These transducers have audio resonances that make them "loud" at selective frequencies; this one near 4kHz. If you drive it on a sub-harmonic, you may hear more of the 4kHz than the intended subharmonic. For example, 1.4 kHz intended tone produces 4.2kHz harmonic that may dominate. \$\endgroup\$
    – glen_geek
    Nov 10, 2019 at 15:22
  • \$\begingroup\$ What is wrong with the datasheet example? It drives the buzzer with antiphase signals from two inverters. Which is basically same as connecting directly to MCU as you already have two antiphase signals. What protection the MCU would need? 20mA limit with 180 ohm resistor? \$\endgroup\$
    – Justme
    Nov 10, 2019 at 15:52

1 Answer 1


That won't work as well as you hope it will. You have those 600 ohm resistors in there that will reduce the power to the buzzer. That's kind of in direct contrast to your goal of making the buzzer as loud as possible.

What you'd want for maximum volume would look more like a full h-bridge driver than anything else.

Like this:


simulate this circuit – Schematic created using CircuitLab

  • Drive BUZZ and /BUZZ both to the same level to turn off the buzzer (both high or both low.)
  • Drive BUZZ and /BUZZ to opposite levels to make a click.
  • Alternate BUZZ and /BUZZ high and low at 4kHz to make an audible buzzer sound.
  • Drive both signals to a defined high or low at all times, and switch fast when changing states. An in between value on BUZZ or /BUZZ will cause two transistors to conduct at once, wasting power or destroying your transistors.
  • BUZZ and /BUZZ must have V+ as their high state. If your digital signal has a lower voltage than V+, then you will have to use some kind of level translation. If the digital high is lower than V+ then Q2 and Q4 won't shut off and you will end up with a short circuit.

Alternatively, just do it the easy way:


simulate this circuit

It won't be as loud, but it is three transistors "cheaper."

You don't need to separately limit the current to the buzzer. The 5mA rating in the datasheet tells you how much current it will draw if operated on 5V. It doesn't matter if the 5V source can deliver 20A. The buzzer will still draw only the rated 5mA.

If you supply it with a higher voltage, then it will draw more current, but even then you don't need to limit the current. Stay below the maximum rated voltage, and it will still only draw what current it needs. Above the rated voltage, it will flex too far and break before it can draw any really large current.

  • 1
    \$\begingroup\$ I'm just not good with MOSFETs. I'd have gotten something wrong if I'd tried to make an example circuit with them. \$\endgroup\$
    – JRE
    Aug 21, 2020 at 8:56
  • 1
    \$\begingroup\$ What's the reason for R2 in the second schematic? I've just tried it on a breadboard (with a 1.8K ohms resistor, though, for it's been lying around anyway) and it did not make any difference sound-wise or volume-wise. I guess that you have good reasons that I'm just not able to reason about. \$\endgroup\$ Mar 18, 2021 at 20:50
  • 2
    \$\begingroup\$ @PaulKertscher: You need the resistor for a piezo buzzer. Piezo buzzers need the resistor to work properly and not kill the transistor. Electromagnetic buzzers need a diode instead to keep from killing the driving transistor. \$\endgroup\$
    – JRE
    Mar 18, 2021 at 20:58
  • 1
    \$\begingroup\$ @JRE Thanks for the quick reply. Could you elaborate how the Piezo Buzzer would kill the transistor. (It's not that I don't believe you, I just want to understand ;) ) \$\endgroup\$ Mar 18, 2021 at 21:08
  • 2
    \$\begingroup\$ @PaulKertscher: Electromechanical buzzers turn a coil on and off to make noise. When you shut off the current, the coil generates a voltage that can be higher than the maximum voltage of the transistor - bang, dead. Piezo buzzers can vibrate after the current is shut off and also generate a high voltage. \$\endgroup\$
    – JRE
    Mar 18, 2021 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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