A buzzer is an audio signaling device that produces sound when an electric current passes through it. It is commonly used in alarms, timers, notifications, and other systems requiring audible feedback. Buzzers are available in two main types: active and passive. Active buzzers generate sound when powered, while passive buzzers require an external signal to produce sound.
Below are the general 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) |
Current Consumption | 10mA to 50mA |
Sound Output Level | 85dB to 100dB (at 10cm distance) |
Frequency Range | 2kHz to 4kHz |
Operating Temperature | -20°C to +60°C |
Dimensions | Varies (e.g., 12mm diameter) |
Buzzers typically have two pins: positive (+) and negative (-). The table below describes the pin configuration:
Pin | Description |
---|---|
Positive (+) | Connects to the positive terminal of the power supply or signal source. |
Negative (-) | Connects to the ground (GND) of the circuit. |
Below is an example of how to use a passive buzzer with an Arduino UNO to generate a tone.
// Example code to generate a tone on a passive buzzer using Arduino UNO
// Define the pin connected to the buzzer
const int buzzerPin = 9;
void setup() {
// No setup required for this example
}
void loop() {
// Generate a tone at 1000 Hz for 500 milliseconds
tone(buzzerPin, 1000, 500);
// Wait for 1 second before repeating
delay(1000);
}
tone()
function for passive buzzers to generate sound at a specific frequency.No Sound from the Buzzer:
Buzzer Produces Weak 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 frequency.
Q: How do I differentiate between an active and passive buzzer?
A: Active buzzers typically have a built-in oscillator and produce sound when powered. Passive buzzers require an external signal and are usually smaller in size.
Q: Can I control the volume of a buzzer?
A: The volume of most buzzers is fixed. However, you can reduce the volume by lowering the supply voltage (within the operating range).
Q: Is it safe to connect a buzzer directly to a GPIO pin?
A: For active buzzers, yes, as long as the current draw is within the GPIO pin's limits. For passive buzzers, use a resistor or transistor to avoid overloading the pin.