Passive buzzer module
Passive buzzer module pinout (I/O, VCC, GND), how it differs from an active buzzer, tone() on Uno, ESP32 and Pico, volume tips and the KY-006 variant.
Community draft — report a mistake
3.3 V or 5 V? On the 3-pin module the I/O pin only drives a transistor, so a 3.3 V GPIO is enough even with the buzzer on 5 V. The 2-pin bare buzzer or KY-006 can run straight from a GPIO through a 100 Ω resistor at low volume.
A passive buzzer is a small speaker with no oscillator of its own: it makes whatever frequency you feed it, so it can play notes, melodies and alarm sweeps. That’s the difference from an active buzzer, which beeps at one fixed pitch when you apply DC. Look underneath — a passive buzzer shows the green PCB; an active one is sealed with black resin.
Use tone(pin, frequency) and noTone(pin). It’s loudest near its resonant frequency, about 2–4 kHz; low notes sound weak. With a module, the transistor lets it run from 5 V for more volume while your GPIO only supplies a few mA.
Variants: the 3-pin blue module prints I/O, VCC, GND; the KY-006 prints S and − with the unmarked middle pin as + (often unused). Wire by the labels on your board.
Prices are indicative (Nov 2026) and vary by seller.
Pinout
| Pin | What it does |
|---|---|
I/O | Signal — a square wave (from tone()) sets the pitch |
VCC | 3.3–5 V supply (5 V is louder) |
GND | Ground |
Use it with
Common errors
Only clicks once, no tone
A passive buzzer needs a continuous square wave. Use tone(pin, 1000) instead of digitalWrite(pin, HIGH).
Plays one fixed beep whatever the frequency
That’s an active buzzer (sealed bottom, sticker on top). It has its own oscillator — use a passive one (open bottom, green PCB visible) for melodies.
tone() doesn’t compile or clashes on ESP32
Update the ESP32 core to 2.0.x or later where tone() is supported, or use ledcWriteTone(). tone() and some PWM/servo libraries share timers — use different channels.
Module gets warm or drains the battery while silent
Low-level-trigger modules (PNP transistor) pass current through the buzzer coil whenever I/O is LOW. After noTone(), set the pin HIGH, or buy a high-level-trigger module.