Passieve buzzer voor Arduino die met PWM een toon geeft en geschikt is voor 4V tot 8V.
SKU: OT2071-D125 Artikelnummer: AB012 EAN: 4308851007787 Locatie: D12.05
Alternatief
Actieve Buzzer Module
€ 1,40
Bekijk dit alternatief
Zo sluit je de Buzzer module passief voor Arduino aan op een Arduino UNO of ESP32, met een voorbeeldsketch die je direct kunt uploaden.
Dit project laat zien hoe je muzikale tonen kunt genereren met een passieve buzzer-module met een Arduino Uno. De Arduino geeft variabele frequentiesignalen uit via de tone()-functie om een toonladder af te spelen. Open de Serial Monitor op 115200 baud om de momenteel afgespeelde frequenties te zien.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : Passive Buzzer Melody Player
* Board : Arduino UNO (arduino:avr:uno)
* Parts : Buzzer module passief Arduino
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// Passive Buzzer Module Demo on Arduino Uno
const int BUZZER_PIN = 9;
// Musical notes in Hertz (C major scale: C4 to C5)
const int notes[] = {262, 294, 330, 349, 392, 440, 494, 523};
const int noteCount = sizeof(notes) / sizeof(notes[0]);
void setup() {
Serial.begin(115200);
Serial.println(F("Passive Buzzer Demo Starting..."));
}
void loop() {
Serial.println(F("Playing scale ascending..."));
for (int i = 0; i < noteCount; i++) {
Serial.print(F("Tone: "));
Serial.print(notes[i]);
Serial.println(F(" Hz"));
tone(BUZZER_PIN, notes[i], 150);
delay(200);
}
delay(300);
Serial.println(F("Playing scale descending..."));
for (int i = noteCount - 1; i >= 0; i--) {
tone(BUZZER_PIN, notes[i], 150);
delay(200);
}
noTone(BUZZER_PIN);
delay(1500);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Dit voorbeeld laat zien hoe je muzikale tonen kunt genereren met een passieve buzzer-module met een ESP32. De microcontroller gebruikt PWM-toongeneratie om herhaaldelijk een reeks muzikale noten af te spelen. Sluit de buzzer-module rechtstreeks aan op voeding, ground en een GPIO-pin om de melodie te horen.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : ESP32 Passive Buzzer Melody Player
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : Buzzer module passief Arduino
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// Pin connected to the passive buzzer's PWM input
const int BUZZER_PIN = 25;
// Frequencies in Hz for a simple arpeggio
const int melody[] = {262, 330, 392, 523};
const int noteDurations[] = {250, 250, 250, 400};
void setup() {
Serial.begin(115200);
pinMode(BUZZER_PIN, OUTPUT);
Serial.println("ESP32 Passive Buzzer Demo Started!");
}
void loop() {
Serial.println("Playing melody...");
for (int i = 0; i < 4; i++) {
tone(BUZZER_PIN, melody[i], noteDurations[i]);
delay(noteDurations[i] * 1.30); // Pause between notes
noTone(BUZZER_PIN);
}
delay(2000); // Wait 2 seconds before playing again
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Deze passieve buzzer geeft een toon van ongeveer 85db wanneer deze op een spanning tussen de 4V en 8V wordt aangesloten. Voor deze passieve buzzer is een microcontroller nodig om de buzzer geluid te laten maken middels een PWM signaal. De buzzer verbruikt ca. 30mA.
Voltage: 5V
Geschikt voor o.a. Arduino
Afmetingen
Lengte: 2,5cm
Breedte: 1,5cm
Hoogte: 1,1cm

| Breedte | 1,5 cm |
|---|---|
| Geschikt voor | Arduino |
| Lengte | 2,5cm |
| Stroomverbruik | ca. 30mA |
| Hoogte | 1,1 cm |
Nog geen beoordelingen.
Niet tevreden? Je hebt 30 dagen bedenktijd na ontvangst om het product terug te sturen.
Alles over retourneren
Buzzer module passief voor Arduino