Five volts or three
The buzzer is rated 5 V and works from 3 to 7 V. VCC is its supply, so 5V on VCC gives it its rated voltage and about 22 mA; 3V3 gives it about 3.3 V, near the bottom of its range, about 3 dB quieter and about 15 mA. Either is safe beside a 3.3 V board, because VCC never reaches SIGNAL.
VCC is the buzzer's supply
With the transistor on, the buzzer has VCC across it, less the 20 mV or so the transistor keeps. So VCC decides how loud it is and how much it draws. The datasheet rates it at 5 V and allows 3 to 7 V.
Move VCC and read the datasheet's own typical curves. Current rises nearly in a straight line with voltage: about 13 mA at 3 V, 22 mA at 5 V, 30 mA at 7 V. Loudness rises too, but slowly: a couple of decibels a volt at the bottom of the range, less at the top.
The loudness curve is used here only to compare two voltages. The same datasheet promises at least 95 dB at 10 cm at 5 V, and its test report measured 95.5 to 97.8 dB on ten parts, while its curve draws about 90 dB at 5 V. The shape is what it is good for.
5V, and why it is safe
5V on VCC gives the buzzer its rated voltage. The ESP32 boards' 5V pins and the Pico's VBUS carry the USB cable's 5 V while the board is on USB, and the Uno's 5V is its supply.
That is safe beside a 3.3 V microcontroller because nothing connects VCC to SIGNAL. VCC goes to the buzzer's +, the diode and the LED's resistor. SIGNAL goes to a resistor and the transistor's base. The one path between them runs backwards through the transistor, from collector to base, and with the collector at VCC and the base below it, that junction is off.
3V3, and what it costs
3V3 works. The buzzer gets about 3.28 V, inside its range but near the floor of it, and on the typical curve it is about 3 dB quieter than at 5 V: noticeably softer, not dramatically. It draws about 15 mA instead of 22 mA, from your board's 3.3 V regulator rather than USB.
Below 3 V the datasheet makes no promises. A 3.3 V rail that sags under load, or a battery going flat, can take it there.
PWM is not a volume knob
analogWrite on SIGNAL switches the whole buzzer on and off hundreds of
times a second: 490 on an Uno's D9, 1000 by default on an ESP32. The buzzer's
own oscillator makes its 2.4 kHz note only while it has power, so what you
hear is that note chopped at the PWM rate, with the rate's own tone mixed
in. It can sound quieter, and it usually sounds worse. The datasheet
describes none of this, so treat it as something to try, not something to
rely on.
For different loudness, the practical choices are the one above, 5V or 3V3, and a different part.
When it does not work
No. VCC reaches the buzzer, the diode and the LED's resistor, and none of them touch SIGNAL. The only way from VCC to SIGNAL would be backwards through the transistor's collector and base, and with the collector at VCC and the base lower, that junction is reverse-biased and passes nothing.
Only a little. VCC on 3V3 makes it about 3 dB quieter, typical, which is noticeable but modest. The datasheet warns against covering the sound hole, and PWM chops the note rather than making it quieter. For a quiet beep, use the TK37 passive buzzer.
Then use 3V3. The buzzer gets about 3.3 V, inside its 3 to 7 V range, and draws about 15 mA. Keep VCC at 3 V or above: below that the datasheet makes no promise that the note starts.
What the diode across the buzzer is for, and what the LED does and does not tell you.
The diode and the light →Edit this page — content/books/active-buzzer/five-volts-or-three.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Active Buzzer
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.