Buzzer
Piezo or magnetic buzzer, active or passive
Overview
Section titled “Overview”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.
| Pin | Direction | Description |
|---|---|---|
+ | Top | Positive / Signal input |
- | Bottom | Negative / Ground |
Configuration
Section titled “Configuration”| Option | Type | Default | Description |
|---|---|---|---|
transducer | Select | Piezo | What makes the sound: a piezo disc or a magnetic coil |
type | Select | Passive | Buzzer type — passive requires an external oscillating signal; active has a built-in oscillator |
ohms | Number | 42 | Coil resistance (magnetic only) |
Data Inputs
Section titled “Data Inputs”| Input | Range | Description |
|---|---|---|
frequency | 0+ | Tone frequency in Hz. Set to 0 to mute |
volume | 0–100 | Volume as percentage. Set to 0 to mute |
Limitations
Section titled “Limitations”- Tone generation relies on the browser’s Web Audio API
- Simultaneous buzzer instances may be limited by browser audio policies