12 Volt Piezo Buzzer Plate (25mm)
12 Volt Piezo Buzzer Plate (25mm)
The 12 Volt Piezo Buzzer Plate (25mm) is a compact, low-power acoustic device designed to produce a high-pitched audible signal when an electrical current is applied. This component is commonly used in various IoT applications, such as alarm systems, monitoring devices, and interactive projects, where an audible notification or alert is required.
The 12 Volt Piezo Buzzer Plate (25mm) operates on the principle of piezoelectricity, where an electrical current is converted into mechanical energy, producing a sound wave. When a 12V DC power supply is applied to the buzzer's terminals, the piezoelectric material within the device deforms, creating a pressure wave that generates a high-frequency sound (typically in the range of 2-4 kHz).
By following these guidelines and precautions, the 12 Volt Piezo Buzzer Plate (25mm) can be effectively integrated into various IoT applications, providing a reliable and efficient means of generating audible notifications and alerts.
12 Volt Piezo Buzzer Plate (25mm) DocumentationOverviewThe 12 Volt Piezo Buzzer Plate (25mm) is a compact, high-decibel buzzer designed for use in a variety of applications, including alarm systems, warning devices, and interactive projects. This component is ideal for IoT projects that require a loud, high-quality audible alert.Pinout and ConnectionThe buzzer has two terminals: a positive (+) terminal and a negative (-) terminal. The positive terminal is marked with a "+" sign or a red wire, while the negative terminal is marked with a "-" sign or a black wire.Technical SpecificationsOperating Voltage: 12V DC
Operating Current: 20mA
Sound Pressure Level: 85dB
Frequency: 2.4kHz
Dimensions: 25mm diameter, 10mm height
Mounting: Adhesive backing for easy attachment to any surfaceCode Examples### Example 1: Basic Buzzer Control with ArduinoIn this example, we'll use an Arduino board to control the buzzer. We'll connect the buzzer to digital pin 9 and ground.HardwareArduino Board (e.g. Arduino Uno)
12 Volt Piezo Buzzer Plate (25mm)
Breadboard
Jumper wiresCode
```c++
const int buzzerPin = 9; // digital pin 9void setup() {
pinMode(buzzerPin, OUTPUT);
}void loop() {
digitalWrite(buzzerPin, HIGH); // turn the buzzer on
delay(1000); // wait 1 second
digitalWrite(buzzerPin, LOW); // turn the buzzer off
delay(1000); // wait 1 second
}
```
This code will turn the buzzer on and off every second, creating a continuous beeping sound.### Example 2: IoT Alarm System with Raspberry Pi and PythonIn this example, we'll use a Raspberry Pi and Python to create a simple alarm system using the buzzer. We'll connect the buzzer to GPIO pin 17 and ground.HardwareRaspberry Pi (e.g. Raspberry Pi 4)
12 Volt Piezo Buzzer Plate (25mm)
Breadboard
Jumper wires
Power supply for Raspberry PiCode
```python
import RPi.GPIO as GPIO
import timeGPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT) # set GPIO 17 as outputwhile True:
# simulate an alarm condition (e.g. sensor detection)
if True:
print("Alarm triggered!")
GPIO.output(17, GPIO.HIGH) # turn the buzzer on
time.sleep(5) # wait 5 seconds
GPIO.output(17, GPIO.LOW) # turn the buzzer off
time.sleep(1) # wait 1 second before checking again
```
This code will turn the buzzer on for 5 seconds when an alarm condition is detected (in this case, a simulated condition).Remember to adjust the power supply and voltage regulator according to your specific setup and requirements.