An Active Buzzer module is a type of safety and alerting system that is commonly used in various applications such as door and window alarms, security systems, and personal safety devices. It typically consists of a buzzer or loudspeaker that produces an audible sound when triggered, as well as an electrical circuit that powers the buzzer and controls its operation. The circuit can be activated by a sensor, such as a motion detector or magnetic switch, that detects the presence of an object or movement and sends a signal to the buzzer. The module may also include features such as a built-in battery, a flashing light, or an audible alert.
Specifications
The Active Buzzer module consists of an active piezoelectric buzzer, it generates a sound of approximately 2.5 kHz when the signal is high.
Operating Voltage
3.5V ~ 5.5V
Maximum Current
30mA / 5VDC
Resonance Frequency
2500Hz ± 300Hz
Minimum Sound Output
85Db @ 10cm
Working Temperature
-20°C ~ 70°C [-4°F ~ 158°F]
Storage Temperature
-30°C ~ 105°C [-22°F ~ 221°F]
Dimensions
18.5mm x 15mm [0.728in x 0.591in]
HOW TO CONNECT AN ACTIVE BUZZER TO THE ARDUINO
Let’s build an example project that will control an active buzzer with the press of a button.
Here are the parts you will need:
Arduino Uno
Jumper wires
Breadboard
Tactile push button
Active buzzer
To connect the active buzzer and push button to the Arduino, follow the diagram below:
HOW TO PROGRAM AN ACTIVE BUZZER ON THE ARDUINO
Once your circuit is connected, upload this code to the Arduino:
int buzzerPin = 8;
int buttonPin = 7;
void setup() {
pinMode(buzzerPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
int buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
digitalWrite(buzzerPin, HIGH);
}
if (buttonState == HIGH) {
digitalWrite(buzzerPin, LOW);
}
}
EXPLANATION OF THE CODE
Active buzzers are programmed just like LEDs. You digital write the buzzer pin HIGH to turn it on, and write the buzzer pin LOW to turn it off.
At the top of the sketch we declare two pin variables. The first pin variable is calledbuzzerPinand is set equal to Arduino pin 8. The other pin variable is calledbuttonPinand is set equal to pin 7.
In thesetup()section thebuzzerPinis set as an OUTPUT with thepinMode()function. ThebuttonPinis set as an INPUT with internal pullup resistor by using INPUT_PULLUP as the second argument in thepinMode()function.
In theloop()section we take a digital read of thebuttonPinand store the value in a local int variable calledbuttonState. Then we have twoifstatements that say “if thebuttonStateis LOW then digital write the buzzer pin HIGH, and if thebuttonStateis HIGH then digital write the buzzer pin LOW”.
After you connect the circuit and upload the code, you should see that pressing the button turns the buzzer on.
Subscribe to our emails
Be the first to know about new collections and exclusive offers.
Choosing a selection results in a full page refresh.