A buzzer is a small electronic voice device that generates sound through electrical signal transmission. So this device can generate different music sounds based on designs & applications like flute sounds, alarm sounds, buzzers, electric bells, etc. Whenever users activate this device, it works as an audible alert or notification device by generating a “buzzing” sound. Therefore, developers commonly use this device in different projects to generate sound feedback for user communications such as button clicks, alerts, or signal alarms. There are two types of module buzzers, active and passive, which vary in their sound generation methods, operating principles & applications. This article elaborates on passive buzzers like the KY-006 module, pin-out, features, and applications.
What KY-006 Module?
A KY-006 is a passive piezo buzzer module used commonly in electronics projects. These modules can also be compatible with different microcontrollers thus, it allows you to produce different sound tones by transmitting varying frequency PWM signals to it. This module includes a piezoelectric element that works as a speaker & a control switch that manages the element. This small module generates audible sounds based on the input signal it gets, making it perfect for creating alerts, simple melodies, or alarms within your projects.
How KY-006 Module Works?
A KY-006 passive piezo buzzer module generates sound by quickly switching its electrical condition on & off at various frequencies. This module needs an external signal to generate sound, so it requires a microcontroller to produce the switching frequency.
Thus, the module has a significant component, like a piezoelectric transducer that vibrates whenever voltage is provided and generates sound. Here, you must control the on/off cycle frequency with PWM functionality on any microcontroller to control the pitch. KY-006 modules can generate sound from 1.5 kHz to 2.5 kHz frequency range. This module applies to simple alarms, basic melodies, user feedback sounds, and audible notifications within electronics projects.
KY-006 Module Pin Configuration:
The following section presents the pin configuration of the KY-006 module. This module includes three pins, which will be explained below.

KY-006 Buzzer Module Pin Configuration
- Pin-1 (S): This is the PWM signal pin that controls the generated sound by the buzzer.
- Pin-2 (5V): This is an optional pin, so you usually do not use it and can leave it unconnected because the signal pin supplies the voltage needed for the module to work.
- Pin-3 (GND): This is the ground pin of the module that you connect to the GND on your circuit board.
Features & Specifications:
The features and specifications of the KY-006 module include the following.
- KY-006 is a passive piezoelectric buzzer module.
- This module includes three pins.
- Its operating voltage ranges from 1.5V to 15V.
- The operating current is 20mA.
- The tone generation ranges from 1.5 kHz to 2.5 kHz.
- It perfectly works with flight controller projects.
- The working current is < 25mA.
- Control method used in PWM signal.
- Operating temperature ranges from -40°C to +85°C.
Equivalent & Alternatives :
Equivalents to KY-006 modules are Piezo Electric buzzer, Active Passive Buzzer with Module, Speaker, etc. Alternatives to KY-006 modules are mini passive buzzers, generic 5V, high-power, PCB-mounted modules, breadboard-friendly buzzers, etc.
KY-006 Buzzer Module Interfacing with Arduino Uno
The KY-006 buzzer module’s interfacing with Arduino Uno is shown below. The required electronic components to make this interface mainly include the KY-006 buzzer module, Arduino Uno, and connecting wires. The connections of this interfacing as follows;

KY-006 Buzzer Module Interfacing with Arduino Uno
- Connect the KY-012 buzzer module’s GND pin to the Arduino Board’s GND pin.
- The middle pin of this module is connected to the 5V pin of Arduino.
- Connect the signal pin of the module to pin 11 of our Arduino Board.
Code:
The required code for interfacing the KY-006 buzzer module with Arduino Uno is shown below.
// The following code is used to test the passive buzzer
int out =11; // initializing pin 11 as buzzer pin
void setup () // Code written in it will only run once.
{
pinMode(out, OUTPUT); // Setting pin 11 as output pin
}
void loop () // Code written in it will run repeatedly
{
unsigned char i, j ;
while (1){
for (i = 0; i <80; i++){
digitalWrite (out, HIGH); // This will turn the buzzer ON
delay (1) ; // Giving a Delay of 1ms will set frequency 1
digitalWrite (out, LOW); // This will turn the buzzer OFF
delay (1) ; // Giving a delay ms
}
for (i = 0; i <100; i++){
digitalWrite (out, HIGH); // This will turn the buzzer ON
delay (2) ;
digitalWrite (out, LOW); // This will turn the buzzer OFF
delay (2) ; // Giving a delay of 2ms
}}}
Working
The above code sets the signal pin to pin 11 of the Arduino board.
In the void setup() function of the code, we have initialized pin 11 mode as output with the pinMode() function.
After that, we utilized two loops in the void loop() function of the code. The first loop equals 80 iterations, so the buzzer in this loop switches ON & OFF with a 1 ms delay. After that, in the second loop, it goes equal to the 100th iteration. Thus, the buzzer switches ON & OFF with a 2 ms delay.
This interface generates a melody tune through the passive buzzer. The Arduino creates the PWM signal for the passive buzzer, which produces tones at various frequencies.
Advantages & Disadvantages
The advantages of KY-006 modules include the following.
- These are versatile in producing a range of sound signals by using PWM signals, allowing you to make different sound effects within a project.
- They generate a wide range of tones.
- These modules are low-cost.
- The KY-006 module is simple to use.
- These modules’ size is compact.
- It has less power consumption:
- These are flexible and controlled with fundamental digital write commands.
The disadvantages of KY-006 modules include the following.
- This module needs a dedicated circuit to produce a sound.
- It needs additional coding to manage the sound frequency & duration.
- This module’s sound quality can be considered quite low, so it is not suitable for complex audio applications.
- It needs extra circuitry.
- Its sound control is limited and thus needs more precise code exploitation to attain preferred tones.
- These are not appropriate for difficult audio applications:
- The generated sound can change in quality & loudness.
- These modules are not suitable for applications that need intricate melodies or sounds.
Applications
The applications of the KY-006 module include the following.
- The KY-006 module primarily produces audible sound alerts or tones for electronic projects.
- Designers use it in alarms, simple musical sounds, notifications, and user feedback within interactive devices.
- It is used whenever different sound frequencies are required due to its ability to generate various tones based on the input signal frequency.
- These modules generate simple beep sounds for alarms within timers, security systems, or reminder applications.
- It provides audible confirmation for menu selections, button presses, or other consumer interactions on devices.
- It creates simple melodies or sound effects by changing the output signal’s frequency.
- This module indicates errors or status changes within electronic devices with various sound patterns.
- These are used in educational projects and robotic applications.
Please refer to this link for the KY-006 Module Datasheet.
Thus, this is an overview of the KY-006 module, pinout, features, specifications, interfacing, pros, cons & uses. This is a passive buzzer module that generates different sound tones based on the input signal frequency. These are very small and 3-pin modules that are compatible with different microcontrollers like Raspberry Pi, ESP32, Arduino, etc. Here is a question for you: What is the ky-005 module?