A buzzer is an audio signaling device that produces sound when an electric current passes through it. It is widely used in various electronic applications to provide audible alerts or notifications. Buzzers are commonly found in alarms, timers, household appliances, and embedded systems. They are available in two main types: active buzzers, which generate sound when powered, and passive buzzers, which require an external signal to produce sound.
Below are the general technical specifications for a typical buzzer. Note that specific values may vary depending on the model and manufacturer.
Parameter | Specification |
---|---|
Operating Voltage | 3V to 12V (commonly 5V) |
Operating Current | 10mA to 50mA |
Sound Output Level | 85dB to 100dB (at 10cm distance) |
Frequency Range | 2kHz to 4kHz |
Type | Active or Passive |
Dimensions | Varies (e.g., 12mm diameter) |
Buzzers typically have two pins:
Pin | Description |
---|---|
Positive (+) | Connect to the positive terminal of the power supply or signal source. |
Negative (-) | Connect to the ground (GND) of the circuit. |
For active buzzers, simply applying a DC voltage will produce sound. For passive buzzers, an oscillating signal (e.g., PWM) is required to generate sound.
Below is an example of how to use a passive buzzer with an Arduino UNO to generate a tone.
// Example: Generating a tone with a passive buzzer using Arduino UNO
// Define the pin connected to the buzzer
const int buzzerPin = 9;
void setup() {
// Set the buzzer pin as an output
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Generate a 1kHz tone for 500ms
tone(buzzerPin, 1000, 500);
delay(1000); // Wait for 1 second
// Generate a 2kHz tone for 500ms
tone(buzzerPin, 2000, 500);
delay(1000); // Wait for 1 second
}
tone()
function to generate a specific frequency on the buzzer pin.delay()
function is used to create pauses between tones.digitalWrite()
to turn the buzzer on or off.No Sound from the Buzzer:
Low or Distorted Sound:
Buzzer Overheats:
Buzzer Does Not Respond to PWM Signal:
Q: Can I use a passive buzzer without a microcontroller?
A: Yes, but you will need an external oscillator circuit to generate the required signal.
Q: How do I differentiate between an active and a passive buzzer?
A: Active buzzers typically produce sound when connected to a DC voltage, while passive buzzers require an oscillating signal.
Q: Can I connect a buzzer directly to a GPIO pin?
A: Yes, but ensure the GPIO pin can supply enough current. If not, use a transistor or driver circuit.
Q: What is the typical lifespan of a buzzer?
A: Buzzers generally have a long lifespan, often exceeding 10,000 hours of operation under normal conditions.