Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Elegoo Passive Buzzer: Examples, Pinouts, and Specs

Image of Elegoo Passive BuzzerDesign with Elegoo Passive Buzzer in Cirkit Designer

Introduction

The Elegoo Passive Buzzer is an audio signaling device that can be used to generate sound waves in a variety of tones. Unlike active buzzers, which have an internal oscillator and generate a tone when powered, passive buzzers require an external signal to produce sound. This makes them more versatile, as they can be used to create different tones and melodies by controlling the frequency of the input signal. Common applications include alarm devices, timers, confirmation or alert sounds in user interfaces, and simple music or sound effects in DIY projects.

Explore Projects Built with Elegoo Passive Buzzer

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VCC Connect to the positive supply voltage (5V recommended)
2 GND Connect to the ground of the circuit

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the VCC pin of the passive buzzer to a digital output pin on a microcontroller, such as an Arduino UNO.
  2. Connect the GND pin to the ground (GND) on the microcontroller.
  3. To generate sound, you need to create a square wave of the desired frequency on the digital output pin connected to the VCC of the buzzer.

Important Considerations and Best Practices

Example Code for Arduino UNO

// Define the buzzer pin
int buzzerPin = 9;

void setup() {
  // Set the buzzer pin as an output
  pinMode(buzzerPin, OUTPUT);
}

void loop() {
  // Play a tone on the buzzer for 1 second
  tone(buzzerPin, 1000); // 1000 Hz frequency
  delay(1000); // Delay for 1 second
  noTone(buzzerPin); // Stop the tone
  delay(1000); // Delay for 1 second
}

Note: The tone() function generates a square wave of the specified frequency (in Hz) on a pin. The noTone() function stops the generation of a square wave on a pin.

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use the passive buzzer with a 3.3V microcontroller? A: Yes, the passive buzzer can operate at voltages as low as 1V, but the sound output may be quieter at lower voltages.

Q: How do I change the tone produced by the buzzer? A: Change the frequency of the PWM signal sent to the buzzer. Higher frequencies will produce higher-pitched tones, while lower frequencies will produce lower-pitched tones.

Q: Can I play melodies with the passive buzzer? A: Yes, by varying the frequency of the input signal in a sequence that corresponds to the melody, you can play simple tunes with the passive buzzer.