Skip to content

Buzzer

Piezo or magnetic buzzer, active or passive

Buzzer component

The Buzzer is a sound-producing component that uses the Web Audio API to generate audible tones in the browser. Its sound comes from a piezo disc or a magnetic coil, and it can be active (built-in oscillator) or passive (requires external frequency signal).

A piezo buzzer wires straight to a GPIO with - to GND. A magnetic buzzer is a coil (about 42 Ω) that the simulator solves electrically: it draws more current than a GPIO gives, so drive it through a transistor, with a flyback diode across the coil, as on a real board. Projects that used the separate Magnetic buzzer (CoilBuzzer) open as a magnetic Buzzer.

It accepts a frequency (Hz) and volume (0–100%) as inputs. When both are above zero, the buzzer emits a square-wave tone at the specified frequency. A small overlay displays the current frequency and volume while active.

PinDirectionDescription
+TopPositive / Signal input
-BottomNegative / Ground
OptionTypeDefaultDescription
transducerSelectPiezoWhat makes the sound: a piezo disc or a magnetic coil
typeSelectPassiveBuzzer type — passive requires an external oscillating signal; active has a built-in oscillator
ohmsNumber42Coil resistance (magnetic only)
InputRangeDescription
frequency0+Tone frequency in Hz. Set to 0 to mute
volume0–100Volume as percentage. Set to 0 to mute
  • Tone generation relies on the browser’s Web Audio API
  • Simultaneous buzzer instances may be limited by browser audio policies
Docs
Open dashboard ↗