PicoMite: driving a passive buzzer


Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7877
Posted: 01:07pm 28 Nov 2022      

You should have a resistor/capacitor filter off the pin to get rid of the carrier frequency of the PWM. However, you might get away without them - or with just a capacitor - if driving one of the little passive sounders.

The problem is that the sounders have a truly horrible frequency response and are designed to resonate over a narrow range to get maximum beep volume. You'd be far better getting one of the small laptop speakers which, although they are still horrible, at least attempt more than one frequency.

You may need more volume than you can get from the 3V3 supply. I'd be tempted to try a simple 1-transistor output stage on the 5V rail:


               5V
                |
             speaker
                |c
              |/
--- 1k --| |---|  NPN
         1u   |\
                V
                |e
             ---+--- GND


You should have Geoff's R/C network in front of this. You may also need a small resistor in series with the speaker if the transistor gets hot (it shouldn't). Note that this is *very* crude and can be improved a lot by adding bias resistors.