Passive Buzzer

Z2M Part: EMA-00006-A / EDT-00008-A

Play siren sound with passive buzzer.

Circuit Diagram
Circuit diagram for Passive Buzzer
Wire Connections & Pin Configuration

Wire Color Connections:

Yellow/Red → Digital Pin 8 to Buzzer positive
Black → GND to Buzzer negative

Pin Configuration:

Arduino Digital Pin 8 → Passive buzzer positive
Arduino GND → Passive buzzer negative
Arduino Code
Edit
int buzzer = 11;  // Buzzer connected to pin 11

void setup() {
  // No pinMode needed, tone() handles it automatically
}

void loop() {
  // Tone(pin, frequency in Hz, duration in ms)
  tone(buzzer, 440, 500);  // Play note A4 (440 Hz) for 500 ms
  delay(700);              // Wait 700 ms before next tone
  tone(buzzer, 880, 500);  // Play note A5 (880 Hz) for 500 ms
  delay(700);              // Wait 700 ms before repeating
}

Instruction Details

Wiring: Connect passive buzzer positive to Digital Pin 8, negative to GND.
Library: Not required (built-in tone() function).
Upload Code: Tools → Board → Arduino Uno. Tools → Port → select your COM port. Click Upload button.
View Output: Buzzer plays police siren melody. Add 100Ω resistor in series if volume is too loud.

How to Use

  1. Connect the required components as per the Pin Configuration above
  2. Open Arduino IDE and create a new sketch
  3. Copy and paste the code above
  4. Select your Arduino board and COM port from Tools menu
  5. Click the Upload button to upload the code to your Arduino
  6. Open Serial Monitor (if applicable) to see the output

Components Required

  • Arduino Uno
  • Passive Buzzer
  • Breadboard
  • Jumper Wires

Category: Arduino Basics