3-24V
3-24V
10-30mA
1-4kHz (typical)
Up to 90dB
Varying sizes, typically 12mm x 12mm x 5mm
Approximately 5-10 grams
-20C to 70C
-40C to 85C
Applications
The Passive Buzzer Module is suitable for various IoT applications, including |
Alarm systems
Warning devices
Alert notifications
Home automation systems
Robotics
Medical devices
Industrial control systems
Integration
To integrate the Passive Buzzer Module into an IoT project, simply connect the positive terminal to the output of a microcontroller or a power source, and the negative terminal to ground. Adjust the input signal frequency and amplitude to achieve the desired tone and volume.
Passive Buzzer Module Documentation
Overview
The Passive Buzzer Module is a simple, low-cost component used to produce a audible tone or alarm in IoT projects. It is a passive device, meaning it does not require any external power source, and is commonly used in microcontroller-based projects.
Technical Specifications
Operating Voltage: 3.3V to 5V
Frequency Range: 2kHz to 4kHz
Output: Audible Tone
Package: PCB Mount or Breadboard Friendly
Connecting the Passive Buzzer Module
To connect the Passive Buzzer Module to a microcontroller, follow these steps:
1. Connect the positive leg of the buzzer to a digital output pin on the microcontroller.
2. Connect the negative leg of the buzzer to the ground (GND) pin on the microcontroller.
Code Examples
### Example 1: Basic Tone Generation (Arduino)
This example demonstrates how to use the Passive Buzzer Module to generate a continuous tone using an Arduino board.
```cpp
const int buzzerPin = 9; // Pin for the buzzer
void setup() {
pinMode(buzzerPin, OUTPUT);
}
void loop() {
digitalWrite(buzzerPin, HIGH); // Turn the buzzer on
delay(1000); // Hold the tone for 1 second
digitalWrite(buzzerPin, LOW); // Turn the buzzer off
delay(1000); // Wait for 1 second before repeating
}
```
In this example, we define the buzzer pin as an output and set it high to turn the buzzer on, producing a continuous tone. We then turn the buzzer off and wait for 1 second before repeating the process.
### Example 2: Alarm Sound (Raspberry Pi with Python)
This example demonstrates how to use the Passive Buzzer Module to generate an alarm sound using a Raspberry Pi and Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
buzzer_pin = 17 # Pin for the buzzer
GPIO.setup(buzzer_pin, GPIO.OUT)
def alarm_sound():
for i in range(5): # Repeat the alarm sound 5 times
GPIO.output(buzzer_pin, GPIO.HIGH)
time.sleep(0.5) # Hold the tone for 0.5 seconds
GPIO.output(buzzer_pin, GPIO.LOW)
time.sleep(0.5) # Wait for 0.5 seconds before repeating
alarm_sound()
```
In this example, we import the RPi.GPIO library and set up the buzzer pin as an output. We define an `alarm_sound()` function that produces an alarm sound by rapidly turning the buzzer on and off five times. The `time.sleep()` function is used to create the desired tone pattern.
Note: These code examples are for demonstration purposes only and may require modifications to work with specific hardware configurations.