As a small buzzer to output simple audio, I am considering the Jiangsu Huaneng Elec MLT-5020. Other buzzers of that size are also an option, as long as their footprint isn’t much bigger than 5×5 mm.
From the datasheet:
Recommended driving circuit (I guess, substituting the 2SC3199 with a PN2222A is safe):
Rated voltage: 3.6 Vo-p
Operating voltage: 2.0～5.0 Vo-p
I want to connect the buzzer to an Arduino (ATmega 328p) circuit with 5 V. I don’t have a 3.6 V power source in that circuit, although I could add one, for example with an LDO.
Some questions that come to mind:
For simplicity, can I drive the buzzer with 5.0 Vo-p?
Instead of the transistor circuit, can I just connect the buzzer directly to a pin via a resistor? (as done in some examples I found on the web)
I know the sound quality of these buzzers is awful, but I don’t want to degrade it further by bad wiring.
I tested the circuit with various resistors in series. Applying a constant high signal, I measured the current. (Interestingly the current fluctuated by a few mA, despite a constant voltage.)
I also tried connecting the MLT-5020 directly to Arduino pins 9 and 10 and driving it in push-pull mode via the ToneAC library: It was less loud than with the transistor ciruit. Apparently the Arduino cannot provide enough power on these pins, and obviously that's exceeding its maximum current ratings anyhow.