I'm looking for the right circuit to connect my piezo buzzer to MCU (STM8S in my case). I don't have a partnumber\datasheet for my particular buzzer, but I've found a number of similar schematics in datasheets:
Some of them also have a protection diode (like described in this question) What's the function of the diode in this driver connected to a piezo buzzer?
My buzzer works when connecting directly to MCU pin (measured current is about 3mA).
So here comes questions:
Do I really need a transistor if current through buzzer is so low?
What is a good circuit to connect a non-piezo (magnetic) speaker to MCU? I've tried 8Ohm speaker with 500Ohm series resistor -- the sound is very low.