Buzzer
How to use a Buzzer
A buzzer is a small component to add sound features to the embedded system. They can be used to raise an alarm, observe and note the status of equipment, indicate commands, enhance user interactions, etc. It comes with 2-pin and can be easily plugged on a breadboard.
Buzzers are divided into two kinds, one is active and another is passive. Both types of buzzers are polarized, so check which terminal is positive and which terminal is negative before connecting it to the circuit.
Active Buzzers
Active Buzzers
Usually, the active buzzers have a label on the top that says to remove them after washing. Here it is recommended that you leave it on the buzzer so that you can easily identify which ones are active buzzers.
Due to the oscillating circuit present inside, the active buzzers can buzz at a predefined frequency when powered by a DC source. This type of buzzer only requires an ON/OFF type of signal. This advantage allows an active buzzer to be easily controlled by a microcontroller to produce a sound without the need for processing power, hardware timer, or additional code. Active buzzers are programmed just like LEDs. You digital write the buzzer pin HIGH to turn it on and write the buzzer pin LOW to turn it off.
Passive Buzzers
Passive Buzzers
The Passive buzzer requires a square wave signal to generate different tones. It is like an electromagnetic speaker, where a changing input signal produces the sound. It will make a sharp clicking sound if a DC signal is used. The frequency of the signal for the passive buzzers is between 2 kHz and 5 kHz to drive it. One advantage of passive buzzers over active buzzers is that you can control the tone or pitch of the sound produced by the buzzer. With active buzzers only one tone is possible, but with passive buzzers any tone within the dynamic range of the buzzer is possible.
How to distinguish between a passive buzzer and an active buzzer?
Active Buzzer
Passive Buzzer
There are several ways to distinguish passive buzzers and active buzzers.
- The most simple method is to watch their different appearances. If you can see a drive board, it is a passive buzzer. If the buzzer is completely covered by black adhesive, it is an active buzzer.
- Another method. Using a battery with a piece of electric wire, separately touch the connection terminals of the buzzer. If the buzzer makes a sound like "Chi" with every touch, it is a passive buzzer. If it just makes a sound for one time or is soundless, it is an active buzzer.
- Controllable sound is one feature of the passive buzzer. It can make sounds in different frequencies. However, it must be driven by a square wave and then will make a sound.
- While an active buzzer doesn't need a square wave, it will make a sound when DC power is supplied. That is because there is an oscillator in the active buzzer while no oscillator in the passive buzzer.
- Most passive buzzers are small in size. In the market, there are more passive buzzers than active buzzers. The active buzzer is more expensive than the passive buzzer.