3-5V
3-5V
<10mA
1-4kHz (typical)
80-90dB (typical)
1k (typical)
8 (typical)
Various sizes available (e.g., 12mm x 9mm, 15mm x 10mm)
Approximately 1-2 grams
Applications
Pinout and Connection Diagram
| The pinout and connection diagram for the Active Buzzer Module may vary depending on the specific manufacturer and model. Typically, the module has three pins | VCC (power), GND (ground), and SIG (digital input signal). A sample connection diagram is shown below: |
Precautions and Handling
| When handling the Active Buzzer Module, follow these precautions |
Handle the module by the edges to prevent damage to the internal components.
Avoid touching the pins or circuitry to prevent electrical shock or damage.
Use a suitable power supply and ensure the operating voltage is within the recommended range.
Avoid exposing the module to high temperatures, humidity, or mechanical stress.
By following the guidelines and specifications outlined in this documentation, users can effectively integrate the Active Buzzer Module into their projects and achieve the desired audible feedback or notification functionality.
Active Buzzer Module DocumentationOverviewThe Active Buzzer Module is a compact, low-cost IoT component designed to produce a audible sound or alarm in various applications. It is an active buzzer, meaning it requires an external power supply and a digital signal to operate. The module is commonly used in IoT projects, robotics, and automation systems to provide auditory feedback or alerts.Pinout and InterfaceThe Active Buzzer Module typically has three pins:VCC: Power supply pin (operating voltage: 3.3V - 5V)
GND: Ground pin
SIG: Digital signal input pin (logic level: 0V - VCC)Code Examples### Example 1: Basic Buzzer Control using ArduinoIn this example, we will demonstrate how to control the Active Buzzer Module using an Arduino board.```c
const int buzzerPin = 9; // Choose a digital pin on your Arduino boardvoid setup() {
pinMode(buzzerPin, OUTPUT);
}void loop() {
digitalWrite(buzzerPin, HIGH); // Turn on the buzzer
delay(1000); // Wait for 1 second
digitalWrite(buzzerPin, LOW); // Turn off the buzzer
delay(1000); // Wait for 1 second
}
```
In this code, we define a digital pin on the Arduino board (in this case, pin 9) as the output pin for the buzzer. In the `loop()` function, we toggle the buzzer on and off using the `digitalWrite()` function, with a 1-second delay between each state.### Example 2: Alarm System using Raspberry Pi and PythonIn this example, we will create a simple alarm system using a Raspberry Pi and the Active Buzzer Module.```python
import RPi.GPIO as GPIO
import timeGPIO.setmode(GPIO.BCM)
buzz_pin = 17 # Choose a GPIO pin on your Raspberry Pi
GPIO.setup(buzz_pin, GPIO.OUT)def alarm_sound():
GPIO.output(buzz_pin, GPIO.HIGH)
time.sleep(0.5) # Produce a 0.5-second beep
GPIO.output(buzz_pin, GPIO.LOW)
time.sleep(0.5) # Wait for 0.5 secondswhile True:
# Replace this with your alarm condition (e.g., sensor reading, network alert, etc.)
if True:
alarm_sound()
time.sleep(1) # Check the alarm condition every 1 second
```
In this code, we use the RPi.GPIO library to control the GPIO pins on the Raspberry Pi. We define a function `alarm_sound()` to produce a 0.5-second beep, and then call this function repeatedly based on an alarm condition (in this example, a simple `True` statement).### Example 3: IoT Alarm System using ESP8266 and MicroPythonIn this example, we will create a simple IoT alarm system using an ESP8266 board and the Active Buzzer Module.```python
import machine
import timebuzz_pin = 2 # Choose a GPIO pin on your ESP8266 board
machine.Pin(buzz_pin, machine.Pin.OUT)def alarm_sound():
machine.Pin(buzz_pin, machine.Pin.HIGH)
time.sleep_ms(500) # Produce a 0.5-second beep
machine.Pin(buzz_pin, machine.Pin.LOW)
time.sleep_ms(500) # Wait for 0.5 secondswhile True:
# Replace this with your alarm condition (e.g., Wi-Fi connectivity, sensor reading, etc.)
if True:
alarm_sound()
time.sleep_ms(1000) # Check the alarm condition every 1 second
```
In this code, we use the MicroPython library to control the GPIO pins on the ESP8266 board. We define a function `alarm_sound()` to produce a 0.5-second beep, and then call this function repeatedly based on an alarm condition (in this example, a simple `True` statement).These examples demonstrate the basic usage of the Active Buzzer Module in various contexts. You can modify the code to suit your specific project requirements and integrate the buzzer module with other IoT components and sensors.