A piezo speaker is a type of loudspeaker that uses the piezoelectric effect to produce sound. It converts electrical energy into mechanical energy, creating sound waves through the vibration of a diaphragm. Piezo speakers are compact, lightweight, and energy-efficient, making them ideal for a wide range of applications.
Below are the general technical specifications for a typical piezo speaker. Note that specific values may vary depending on the model.
Parameter | Value |
---|---|
Operating Voltage | 3V to 12V |
Operating Current | 5mA to 30mA |
Resonant Frequency | 2 kHz to 4 kHz |
Sound Pressure Level | 85 dB to 100 dB (at 10 cm) |
Impedance | 1 kΩ to 10 kΩ |
Dimensions | Varies (e.g., 20mm diameter) |
Piezo speakers typically have two pins:
Pin | Description |
---|---|
Positive (+) | Connects to the positive terminal of the power source or signal output. |
Negative (-) | Connects to the ground (GND) of the circuit. |
Below is an example of how to connect and use a piezo speaker with an Arduino UNO to generate a tone.
// Piezo Speaker Example with Arduino UNO
// Generates a tone on pin 8 of the Arduino
const int piezoPin = 8; // Pin connected to the piezo speaker
void setup() {
// No setup required for this example
}
void loop() {
tone(piezoPin, 1000); // Generate a 1 kHz tone
delay(500); // Play the tone for 500 ms
noTone(piezoPin); // Stop the tone
delay(500); // Wait for 500 ms before repeating
}
No Sound Output:
Distorted Sound:
Low Volume:
Q: Can I use a piezo speaker without a microcontroller?
A: Yes, you can use a simple oscillator circuit (e.g., a 555 timer) to drive the piezo speaker.
Q: What is the difference between a piezo speaker and a piezo buzzer?
A: A piezo speaker requires an external driving signal (e.g., a square wave), while a piezo buzzer has a built-in oscillator and only needs a DC voltage to operate.
Q: Can I use PWM to control the piezo speaker?
A: Yes, PWM (Pulse Width Modulation) can be used to generate tones by varying the frequency of the signal.
This concludes the documentation for the piezo speaker.