A buzzer is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric. It is used to produce sound as an alert or notification in various electronic circuits. Buzzers are commonly found in alarm devices, timers, and confirmation of user inputs such as a mouse click or keystroke.
Parameter | Value |
---|---|
Operating Voltage | 3V to 12V |
Current Consumption | 10mA to 30mA |
Sound Output | 85dB at 10cm |
Frequency | 2kHz to 4kHz |
Operating Temperature | -20°C to +60°C |
Dimensions | Varies (commonly 12mm diameter) |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Positive voltage supply (3V to 12V) |
2 | GND | Ground (0V) |
/*
* Example code to control a buzzer with Arduino UNO.
* The buzzer will beep on and off every second.
*/
const int buzzerPin = 9; // Pin connected to the buzzer
void setup() {
pinMode(buzzerPin, OUTPUT); // Set the buzzer pin as an output
}
void loop() {
digitalWrite(buzzerPin, HIGH); // Turn the buzzer on
delay(1000); // Wait for 1 second
digitalWrite(buzzerPin, LOW); // Turn the buzzer off
delay(1000); // Wait for 1 second
}
This documentation provides a comprehensive guide to understanding, using, and troubleshooting a buzzer in various electronic applications. Whether you are a beginner or an experienced user, this guide aims to help you effectively integrate a buzzer into your projects.