The word “buzzer” comes from the German “summen” – to buzz. It is essentially a sound-emitting device traditionally used as a signal device. Today, buzzers can be electromechanical or piezoelectric. Both are used on different devices.
The passive buzzer is an electromagnetic squeaker used to generate sound signals of different frequencies.
The active buzzer is the simplest module to produce a sound of about 2 kHz, which can often be needed when working with Arduino and in other projects.
The main difference between the active buzzer and the passive buzzer is that the active buzzer generates sound independently. To do this, the user must simply turn it on or off; in other words, by applying a voltage to the contacts or by de-energizing. On the other hand, a passive buzzer requires a signal source, which will set the sound signal parameters. An Arduino board can be such a source. The active buzzer will produce a louder sound signal than its competitor. The frequency of the sound emitted by the active buzzer is 2,5 kHz +/- 300 Hz. The power supply voltage for the squeaker varies from 3.5V to 5V.
The active piezo emitter is also preferable because there is no need to create an additional delayed code fragment in the sketch that affects the workflow. You can also measure the resistance between the two wires to determine what kind of element is in front of the user. Higher values will indicate an active Arduino buzzer.
The geometric shape of the buzzers does not differ in any way, and it is not possible to assign the element to one or another type according to this characteristic. Visually, the buzzer can be identified as active if there are a resistor and amplifier on the board. A passive buzzer has only a small piezo element on the board.
To stop the active buzzer, you have to use digitalWrite(buzzerPin, LOW), while with the passive buzzer, you need to use noTone(passiveBuzzerPin).