How to use a Buzzer
A buzzer is a small component to add sound features to the embedded system. It comes with 2-pin, and can be easily used on breadboard.
There are two types of buzzer that are commonly available: active and passive buzzers. The passive buzzer requires an AC signal to make a sound. It is like an electromagnetic speaker, where a changing input signal produces the sound.
The Active Buzzers can generate continuous Beep/Tone when powered by a DC source due to the internal oscillating circuit present inside it. This type of buzzer only require ON/OFF type of input.
The Passive buzzers require AC or Square wave signal to generate different tones. It is like an electromagnetic speaker, where a changing input signal produces the sound. It will not Beep if a DC signal are used. The frequency of the signal for the passive buzzers is between 2 KHz and 5 KHz to drive it.