Electronic components: Buzzers
New Course Coming Soon:
Get Really Good at Git
Buzzers are components that can generate a sound.
Well, I’d call it a noise rather than a sound but I don’t mean to be harsh to buzzers, so let’s call it a sound.
A sound that can have a frequency, so you can generate various musical notes.
Buzzers are also sometimes called speakers.
There are 2 kinds of buzzers. Active buzzers and passive buzzers.
On the left you can see a passive buzzer, and on the right an active buzzer:
They can be distinguished by the seal on the active one, and the circuit visible on the passive one.
Active buzzers are more expensive because they have some additional logic compared to the passive buzzer.
In particular, active buzzers work with direct current. You connect a 0V
wire and a signal wire, alternating between high and low with a different frequency based on the sound you want to play.
Passive buzzers on the other hand need a PWM signal, which we issue in Arduino with the analogWrite()
function.
Passive buzzers are cooler because they can play little songs, using the tone()
function provided by the Arduino language.
Here is how can I help you:
- COURSES where I teach everything I know
- THE VALLEY OF CODE your web development manual
- BOOTCAMP 2024 cohort in progress, next edition in 2025
- BOOKS 16 coding ebooks you can download for free on JS Python C PHP and lots more
- SOLO LAB everything I know about running a lifestyle business as a solopreneur
- Interesting links collection
- Follow me on X