How can a loud high-frequency tone be produced from a 3V square wave?

Given that:

  • the square wave is 3V and can have a varying frequency (max 4mA)
  • 12VDC high-current supply is available


  • It should be as loud as possible (distortion doesn't matter, unless it reduces output power)
  • Inexpensive (if a transistor can do the trick, why use an IC?)
  • Simple (preferable)

Just hooking up the PWM to the piezo works, but it's very quiet. Using a MOSFET or NPN (3904) does not deliver any more volume when connected like:

enter image description here

  1. 3V 50% square wave -> 100R -> B
  2. 12V -> Speaker+
  3. Speaker- -> E
  4. C -> Gnd

Adding a high-pass filter (small capacitor) before the Base removes the offset, but really reduces the signal voltage. There is no sound in this case (the input frequency was changed to 10KHz for the test below):

enter image description here

Can an NPN transistor, such as the 3904 keep up with 20KHz? 40KHz? It seems to be switching at 2KHz when given an input of 10KHz. And even though 12Vdc is connected to the emitter, only 4V is output at the Collector:

enter image description here

But the main issue is that the sound is not amplified (and is not drawing any noticeable power from the 12V supply).

Is a bridge required on the speaker terminals? What is the best way to get loud volume out of a high-frequency piezo?


enter image description here

Just using opposite 3V square waves on each terminal of the piezo gives a decent sound level, although nowhere near as powerful as the speaker can handle.

The voltage at the piezo terminals:

enter image description here

  • \$\begingroup\$ Tried an H-bridge yet? \$\endgroup\$ Nov 5, 2013 at 2:26
  • \$\begingroup\$ If you have adequate 12VDC supply, there is no theoretical limit as to how loud your output could be. What you can reasonably achieve is a different matter. \$\endgroup\$ Nov 5, 2013 at 5:42

1 Answer 1


Put a really big inductor (like 30 mH or so, get a bunch of 5 or 10 mH inductors and start putting them in series one at a time) in parallel with the piezo. And cover your ears. You may need to play around with the frequency and the inductance a bit to get the best oomph. I got a surprisingly loud tone out of a piezo at about 4 kHz on about 4 volts with 30 mH of inductance. I'm sure you can do even better with 12 volts.

The idea is that the piezo's capacitance will resonate with the inductance, producing a much larger sound than you would be able to otherwise.

Actually, for 40 kHz you might want a much smaller inductor, maybe around 5 or 10 mH.

  • 1
    \$\begingroup\$ Related reading. \$\endgroup\$ Nov 5, 2013 at 4:12
  • \$\begingroup\$ Good idea. There is definitely something wrong with the oscillation - wiggling the oscilloscope probe around at the emitter causes the minuscule volume to quadruple. But 1mH across the piezo (which acts as a capacitor) does absolutely nothing to increase the volume (which is so low, it is barely audible at 10 kHz). While I acquire a larger inductor, do you see anything else that could be wrong with the circuit (one terminal connected directly to 12V, while the other goes to the Collector, then Emitter to Ground? \$\endgroup\$ Nov 6, 2013 at 2:12
  • 1
    \$\begingroup\$ I don't see anything obviously wrong, unfortunately. I presume you are driving the transistor correctly? Your schematic does not contain much useful information. When you add the inductor in parallel, it should actually generate a rather high voltage when it oscillates - likely higher than the supply voltage due to resonance. \$\endgroup\$ Nov 6, 2013 at 5:56
  • 1
    \$\begingroup\$ Hmm. Can you post an updated schematic so I can see what you did? Adding an inductance will definitely help so long as it is the right size. If it's too big or too small, then it will make it quieter. Although it will depend on how you're driving it. If you're trying to do a push-pull, it won't help you at all. \$\endgroup\$ Nov 10, 2013 at 1:16
  • 1
    \$\begingroup\$ Ah, I see. Yeah, in that case an inductor will not help as the drivers on both ends will not allow the inductor and piezo element to resonate. The original circuit you had should work; the circuit I used was essentially the same except I used a MOSFET instead of a BJT and then I had the parallel inductor. \$\endgroup\$ Nov 10, 2013 at 2:08

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.