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
Requirements:
- 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:
- 3V 50% square wave -> 100R -> B
- 12V -> Speaker+
- Speaker- -> E
- 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):
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:
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?
Update:
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: