Understanding the Difference Between Active and Passive Buzzer
When it comes to acoustic alarm outputs, LEDs, and simple LED/buzzer driving, distinguishing between active and passive buzzers is crucial. While both types of buzzers serve the same purpose, their underlying mechanisms and requirements differ significantly.
The Active Buzzer: A Self-Sustaining Solution
An active buzzer has an internal shock source, meaning it can produce sound without an external power source. This is achieved through a simple internal oscillator circuit that converts direct current (DC) into a constant frequency pulse signal. As a result, active buzzers can operate on a DC signal, typically denoted as VDC or VDD. However, they may also function on a specific AC signal, but this requires a precise voltage and frequency, which is not commonly used.
The Passive Buzzer: A More Complex Solution
A passive buzzer, on the other hand, lacks an internal drive circuit and relies on an external signal to produce sound. This signal must be a sinusoidal signal or a pulse signal with a specific frequency. Unlike active buzzers, passive buzzers cannot operate on a DC signal, as the magnetic circuit constant prevents oscillation. Instead, a square-wave signal is required to drive the buzzer, typically in the range of 2-5 kHz.
Advantages of Passive and Active Buzzers
While passive buzzers are generally cheaper and offer sound frequency control, active buzzers are more convenient to use in process control applications. The fundamental difference between active and passive buzzers lies in their input signal requirements.
Working Principle of Passive Electromagnetic Buzzer
The passive electromagnetic buzzer operates on the principle of an alternating magnetic flux produced by an AC signal applied to a frame. This flux is superimposed on a constant flux, causing a molybdenum sheet to vibrate and produce sound. The natural frequency of the overall sound pressure frequency response curve is determined by the clearance value, the molybdenum sheet thickness, the housing frequency, and the magnetic intensity.
Piezoelectric Buzzer: A High-Pressure Solution
A piezoelectric buzzer uses a high-pressure piezoelectric ceramic adhesive to generate a mechanical deformation in a vibrating metal sheet. When an AC voltage is applied, the piezoelectric effect causes the metal sheet to vibrate and produce sound.
Driving a Passive Piezoelectric Buzzer
When using a passive piezoelectric buzzer, such as the PTH2, it is essential to understand that it cannot be driven directly by a DC signal. Instead, a square-wave signal with a frequency of 4 kHz is required. This can be achieved using a PWM (Pulse Width Modulation) square wave output drive or a timer flip IO foot drive.
Example Code for Driving a Passive Piezoelectric Buzzer
Assuming a PTH2 passive piezoelectric buzzer is connected to an NXP MKE02 MCU, the following code can be used to drive the buzzer:
// Option One: PWM driving
// Program: 4K generated using the PWM square wave output drive
// Option Two: Timer flip IO foot drive
// Assuming program two simple needs 4k cycle frequency of the square wave signal 250us, 125us
// Need a timer period inversion driving pin to control a buzzer sound.
// Output pin is driven initial configuration
// Need a buzzer and stop function
// Timer interrupt function, here we are not in the list, there are a lot of routine official with the timer program, you can use and reference.
Conclusion
In conclusion, understanding the difference between active and passive buzzers is crucial for selecting the right component for a specific application. While active buzzers offer convenience and simplicity, passive buzzers provide sound frequency control and are often cheaper. By understanding the working principles of both types of buzzers, developers can make informed decisions and choose the right solution for their projects.