Phipps Electronics

Order within the next 

FREE SHIPPING OVER $199

50,000+ ORDERS

WORLDWIDE SHIPPING

SSL SECURED

Using the Small Passive Buzzer Module KY-006 with Arduino  

Contents

Introduction

In this tutorial, we will learn about the KY-006 module, what is a passive piezoelectric buzzer, and we will build a simple project to music using the KY-006 module and an Arduino.

Small Passive Buzzer Module KY-006

The KY-006 Module will be our main component for this tutorial. This module has a passive piezoelectric buzzer mounted on a breakout board. Figure 1 shows the module as seen in fritzing.

Figure 1: KY-006 Small Passive Buzzer Module

Pinout

The KY-006 module has three pins.

Component PinArduino Uno board Pin
(-)GND
middle+5V
SSignal

What is a Passive Piezoelectric Buzzer?

A passive piezoelectric buzzer is a kind of buzzer that uses the piezoelectric effect to produce sound. By applying a voltage to the buzzer terminals, a metal plate vibrates producing a tone.

Project - Arduino Simple Tone Player

After learning about the KY-006 module and the passive piezoelectric buzzer, it is now time to build a project using the module. Our project will play tones using the KY-006 module and an Arduino.

Components

For this project, we need the following components:

  • Arduino Uno board (1 pc.)
  • KY-006 Small Passive Buzzer Module (1 pc.)
  • Jumper wires

Wiring Diagram

Figure 2: Connection Diagram

Figure 2 shows the connection between the Arduino Uno and the KY-006 Small Passive Buzzer Module.

The KY-006 module pins are connected to the Arduino Uno board as follows:

Component PinArduino Uno board Pin
(-)GND
middle+5V
S10

The Code

				
					// Arduino and KY-006 module
void setup() {
  // nothing to do here
}
void loop() {
  int buzzer = 10;          // module connected to pin 10 of Arduino
  // play a melody to the KY-006 module
  
  tone(buzzer, 262, 250);   // play a tone
  delay(325);               // pause code
  noTone(buzzer);           // stop playing tone
  tone(buzzer, 196, 125);
  delay(162);
  noTone(buzzer);
  tone(buzzer, 196, 250);
  delay(325);
  noTone(buzzer);
  tone(buzzer, 220, 250);
  delay(325);
  noTone(buzzer);
  tone(buzzer, 196, 250);
  delay(325);
  noTone(buzzer);
  tone(buzzer, 0, 250);
  delay(325);
  noTone(buzzer);
  tone(buzzer, 247, 250);
  delay(325);
  noTone(buzzer);
  tone(buzzer, 262, 250);
  delay(325);
  noTone(buzzer);
  delay(1000);
}
				
			

Project Test

Apply power to your Arduino Uno board. You will hear a melody play on the KY-006 module and will repeat it indefinitely.

SUBSCRIBE FOR NEW POST ALERTS

Subscribe to be the first to know when we publish a new article!
List Subscriptions(Required)

POPULAR POSTS

Scroll to Top