The Passive Buzzer KY-006 by AZDelivery is an audio signaling device that can be used to generate tones of varying frequencies. Unlike active buzzers that produce a tone when a DC voltage is applied, passive buzzers require an AC signal to operate. They are commonly used in alarm clocks, computers, timers, electronic toys, and many other devices where audio feedback is necessary.
Pin Number | Description |
---|---|
1 | Signal Input (S) |
2 | Ground (GND) |
// Define the buzzer pin
int buzzerPin = 9;
void setup() {
// Set the buzzer pin as an output
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Generate a 1kHz tone for 1 second
tone(buzzerPin, 1000);
delay(1000);
// Stop the tone
noTone(buzzerPin);
delay(1000);
}
Q: Can I use a passive buzzer with a DC voltage? A: No, passive buzzers require an AC signal, typically a square wave, to produce sound.
Q: What is the difference between a passive and an active buzzer? A: An active buzzer generates a tone when supplied with a DC voltage, while a passive buzzer requires an AC signal to produce sound.
Q: How do I change the tone produced by the buzzer? A: Change the frequency of the PWM signal sent to the buzzer's signal input pin.
Q: Can I use the passive buzzer with a microcontroller other than Arduino? A: Yes, as long as the microcontroller can generate a PWM signal within the buzzer's operating voltage range.
This documentation provides a comprehensive guide to using the AZDelivery KY-006 Passive Buzzer. For further assistance, consult the manufacturer's datasheet or contact technical support.