Passive Buzzer
Category:
Subcategory:
Signal Type:
n/a
IDeATe Component Number:
0498
Makes variable-pitch beeping, driven by the frequency of a changing (alternating current) power source connected to it.
Passive Buzzer
About

A passive buzzer requires an AC power source to make sounds as it does not have a built-in oscillating source like an active buzzer. It will not make sounds if connected to a DC voltage. It's outputting sound is driven by the frequency of its oscillating input signal. The advantage of a passive buzzer is that the tone and loudness of the buzzer can be controlled by the frequency and drive power of the waveform that is used to drive it but it is more difficult to use.

Getting started
/* Arduino tutorial - Passive Buzzer Module
   More info and circuit: http://www.ardumotive.com
   Dev: Giannis Vasilakis // Date: 12/11/2017  */

int buzzer = 8 ;
void setup ()
{
  pinMode (buzzer, OUTPUT) ;
}
void loop ()
{
  unsigned char i, j ;
  while (1)
  {
    for (i = 0; i <80; i++) // When a frequency sound
    {
      digitalWrite (buzzer, HIGH) ; //send tone
      delay (1) ;
      digitalWrite (buzzer, LOW) ; //no tone
      delay (1) ;
    }
    for (i = 0; i <100; i++)
    {
      digitalWrite (buzzer, HIGH) ;
      delay (2) ;
      digitalWrite (buzzer, LOW) ;
      delay (2) ;
    }
  }
}
Related Components