ESP32 KY-012 Active Buzzer Module

KY-012 Active Buzzer Module image

KY-012

Protocol: Digital

Overview

The KY-012 is an active piezoelectric buzzer module that emits a 2.5 kHz tone when powered. It operates within a voltage range of 3.3V to 5V and is ideal for applications requiring audible alerts.

About KY-012 Active Buzzer Module

The KY-012 Active Buzzer Module is equipped with an active piezoelectric buzzer that emits a tone at approximately 2.5 kHz when powered. Unlike passive buzzers, this module does not require an external square wave signal; it generates sound as soon as a voltage of at least 3.3V is applied to its signal pin. Operating within a voltage range of 3.3V to 5V and drawing a maximum current of 30 mA, it produces a minimum sound output of 85 dB. This makes it suitable for applications requiring audible alerts, such as alarm systems and user notifications.

Where to Buy

KY-012 Active Buzzer Module

Starting from

1$ per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Voltage 3.3V - 5V
Maximum Current 30 mA
Tone Frequency 2.5 kHz ± 300 Hz
Minimum Sound Output 85 dB
Operating Temperature -20°C to 70°C
Storage Temperature -30°C to 105°C
Dimensions 19 x 15.5 x 11 mm

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • Pin (-): Ground (GND).
  • Pin (middle): Not connected.
  • Pin (S): Signal input.

Wiring with ESP32

  • KY-012 Pin (-): Connect to ESP32 GND.
  • KY-012 Pin (S): Connect to ESP32 GPIO (e.g., GPIO15).

Troubleshooting Guide

Common Issues

❌ No Sound Emitted

🔊 Continuous Sound

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🔧

ESP-IDF Example

C++
🏠

ESPHome Example

YAML
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

The ESP32 KY-012 Active Buzzer Module is a powerful KY-0xx module sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.