Toggle Nav

Interfacing Passive Buzzer Module with Arduino



Table of Contents

Buzzer Features

A buzzer is a device used to produce sound. There are two types of buzzer: active and passive. In the active model, buzzer starts playing sound only if connected to a power supply, but in the passive model, we need to send a pulse from the microcontroller to play sounds.
The supply voltage of the buzzer is 3 volts, 5 volts and 12 volts.

You can download the passive buzzer datasheet here.

Passive Buzzer Module Pinout

Buzzer has 2 pins: DATA and GND but the buzzer module has an extra VCC pin.
You can see the pinout in the image below.

Required Materials

Hardware Components

Arduino UNO R3 × 1
Male to Female jumper wire × 1

Interfacing Buzzer with Arduino

Step 1: Circuit

Connect the wires according to the following circuit.

Step 2: Code

Upload the following code to Arduino.

modified on June 5, 2018
by SURYATEJA from 

const int buzzer = 9; //buzzer to arduino pin 9

void setup(){
  pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output


void loop(){
  tone(buzzer, 1000); // Send 1KHz sound signal...
  delay(1000);        // ...for 1 sec
  noTone(buzzer);     // Stop sound...
  delay(1000);        // ...for 1sec

You can download the StarWars song project by Buzzer through the following link.

Liked What you see?

Get updates and learn from the best

More To Explore

Leave a Reply

Your email address will not be published. Required fields are marked *