Active buzzer
It has an oscillator inside: just drive the pin high to play a fixed tone. It has polarity: the + goes to the GPIO and the − to GND.
Pinout
| Pin | Connect to | Note |
|---|---|---|
| + | GPIO | long leg / + mark |
| − | GND |
FastTeacherFor teachers
From the syllabus to a planned semester
- Teaching plan and calendar built automatically
- Class diary ready to paste into SIGA
- Slides and exercise lists with answer keys
Free Community edition · Windows
MicroPython example
from machine import Pin
import time
buzzer = Pin(5, Pin.OUT)
buzzer.on()
time.sleep(0.3)
buzzer.off()
Specifications
| Item | Value | Source |
|---|---|---|
| Frequency | 2,300 ± 200 Hz (fixed tone) | Datasheet active buzzer 12 mm 5 V (YMD-12095-G, typical of the part sold in Brazil) |
| Rated voltage | 4–8 V (5 V) | Datasheet active buzzer 12 mm 5 V (YMD-12095-G, typical of the part sold in Brazil) — on a 3.3 V GPIO it plays quieter. Under review: measure |
| Current | ≤ 30 mA | Datasheet active buzzer 12 mm 5 V (YMD-12095-G, typical of the part sold in Brazil) |
Values marked "Under review" will still be checked against the parts in the lab.