Skip to product information
1 of 4

Active Buzzer

Active Buzzer

SKU:AX22-0012

This AX22-sized board mounts a self-oscillating piezo buzzer on a compact 22 × 22 mm PCB, giving your project an instant beep, chirp, or alarm with nothing more than a HIGH on one GPIO pin no PWM timers or audio code required. Drop it into any AX22 backplane to add audible menu clicks, countdown alerts, game feedback, or status tones in seconds.
Regular price $1.99
Regular price Sale price $1.99
Sale Sold out
View full details

Technical Details

- 22 mm × 22 mm square
- 4× ⌀2.7 mm Mounting Holes
- ~85 dB @ 10 cm (5 V)
- 2 kHz nominal tone (±0.5 kHz)
- 1.8 V, 3.3 V, 5.0 V
- Arduino IDE Compatible
- MicroPython Compatible
- MicroBlocks Compatible

Material Datasheet →

Pinout

Technical Resources

Active Buzzer - (AX22-0012)
🖱️ Click & drag to rotate
#define BUZZER_PIN 14

// Notes (in Hz) for the song
const int NOTE_E4 = 330;
const int NOTE_D4 = 294;
const int NOTE_C4 = 262;
const int NOTE_G3 = 196;

// Song melody and note durations (4 = quarter note, 8 = eighth note, etc.)
int melody[] = { NOTE_E4, NOTE_D4, NOTE_C4, NOTE_D4, NOTE_E4, NOTE_E4, NOTE_E4,
                 NOTE_D4, NOTE_D4, NOTE_D4, NOTE_E4, NOTE_G3, NOTE_G3 };

int noteDurations[] = { 4, 4, 4, 4, 4, 4, 2,
                        4, 4, 2, 4, 4, 2 };

void setup() {
  // No setup required for the buzzer
}

void loop() {
  for (int i = 0; i < sizeof(melody) / sizeof(melody[0]); i++) {
    int duration = 1000 / noteDurations[i];  // Convert note duration to milliseconds
    tone(BUZZER_PIN, melody[i], duration);   // Play the note on the buzzer
    delay(duration * 1.3);                   // Pause between notes (1.3x duration for spacing)
    noTone(BUZZER_PIN);                      // Stop the tone
  }

  delay(100);  // Delay before repeating the song
}