Buzzer - Active Buzzer Alarm Sensor Module

SKU: BZ0501
KY-012 active buzzer module: black PCB, three header pins marked S and minus, round buzzer with seal sticker

Buzzer - Active Buzzer Alarm Sensor Module

SKU: BZ0501
Regular price $1.99
/
  • Free shipping on all orders over $100
  • Secure payments
  • In stock, ready to ship
  • Inventory on the way

Add $100.00 more for free shipping

Tax included. Shipping calculated at checkout.

10+ in stock

You'll also need

Choose a quantity and add it to your cart.

Breadboard 400 holes
$4.4910+ in stock
Breadboard Jumper Wire - 140pcs
$11.9910+ in stock

The KY-012 is a 3-pin active piezo buzzer module that sounds a fixed tone of about 2.5 kHz whenever its signal pin is driven high.

There is no library or timing code to write: switch one pin on to beep, off to stop. It suits alarms, timers and "button pressed" feedback on Arduino, ESP32 and Raspberry Pi projects.

Type
Active piezo buzzer
Voltage
3.5 – 5.5 V DC
Tone
2500 Hz ± 300 Hz
Sound output
85 dB min.

Why choose it

  • One-line control — it has a built-in tone generator, so HIGH makes it sound and LOW silences it.
  • Works across platforms — the datasheet lists it as compatible with Arduino and Raspberry Pi models, and the 3.5 – 5.5 V range suits 5 V boards. 3.3 V boards sit just below the minimum, so see the notes below.
  • Breadboard friendly — a 3-pin header is fitted, so you can plug it in or solder it.

Specifications

Core
Type Active piezo buzzer module (built-in tone generator)
Pins 3 (S, middle, –); middle pin not used
Mounting Solder, or plug into a breadboard
Power
Operating voltage 3.5 – 5.5 V DC
Control Switch on S: HIGH = sounds, LOW = silent
Sound
Tone (resonance) frequency 2500 Hz ± 300 Hz
Sound output 85 dB minimum (datasheet; measuring distance not stated)

Compatibility

Platform Works Notes
Arduino UNO / Nano (5 V) ✓ Yes S to any digital pin, – to GND. No library needed.
ESP32 / ESP8266 (3.3 V) ✓ Yes 3.3 V is just below the 3.5 V minimum, so it may sound quiet or not at all. A 5 V board is the safer choice.
Raspberry Pi / Pico ✓ Yes Any free GPIO pin (3.3 V). Pico example uses MicroPython.

In the box

Included
  • 1 × KY-012 active buzzer module (3-pin header fitted, as pictured)

Applications

  • Alarm or alert sounder for sensor projects
  • Beep on button press or timer end
  • Start-up and error beeps for your own gadgets

Tutorial

What you'll build: a beeper that sounds for half a second, stops, and repeats. About 15 minutes.

Choose your board

Board Logic voltage Pins used Language Best for
Arduino UNO 5 V D8, GND C++ (Arduino IDE) First-timers: the fewest setup steps
ESP32 3.3 V GPIO4, GND C++ (Arduino IDE) Projects that will add Wi-Fi later

New to this? Start with the Arduino UNO.

How it works

An active buzzer has its own tone generator inside. Power it and it sounds; remove the power and it stops.

  • GND (–) — the return path for the current. It must be joined to the board's GND.
  • S (signal) — the pin you switch on and off from your code. HIGH = on, LOW = off.
  • Active vs passive — an active buzzer makes one fixed tone. A passive buzzer needs a changing signal from your code, so it can play different notes.
Arduino UNO Tutorial

You need: Arduino UNO R3, USB cable, 2 jumper wires, the KY-012 module

Arduino UNOD8GNDKY-012 buzzerS (signal)middle: not used– (GND)

■ GND (–) ■ Signal (S) Middle pin: not connected

# Arduino UNO pin Module pin Wire colour Notes
1 D8 S Yellow Signal. Powers and drives the buzzer
2 GND – (minus) Black Ground. Look for the – mark printed on the board

Check the pin labels printed on your module before plugging in.

1
Install the Arduino IDE
Download and install the Arduino IDE. No extra library is needed.
2
Wire it up (USB unplugged)
Join S to D8 and – to GND as in the table. Leave the middle pin empty.
3
Upload the example
Plug in the UNO, then Tools → Board → Arduino UNO and Tools → Port → your UNO. Paste the sketch below and press Upload.
▸ Example 1 — Beep once a second
// KY-012 active buzzer on Arduino UNO
// Wiring: S -> D8, - (GND) -> GND, middle pin not connected
const int BUZZER_PIN = 8;   // you can change this (pin table must match)

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);      // buzzer pin is an output
  Serial.begin(115200);             // speed for the Serial Monitor
  Serial.println("OK - epartners.co.nz test");
}

void loop() {
  digitalWrite(BUZZER_PIN, HIGH);   // HIGH = buzzer sounds
  Serial.println("Buzzer ON");
  delay(500);                       // you can change this (milliseconds)
  digitalWrite(BUZZER_PIN, LOW);    // LOW = silent
  Serial.println("Buzzer OFF");
  delay(500);                       // you can change this
}

✓ Check: The buzzer beeps for half a second, then stops, again and again. Open Tools → Serial Monitor (115200 baud): you see "OK - epartners.co.nz test" once, then "Buzzer ON" and "Buzzer OFF" every half second.

ESP32 Tutorial

You need: ESP32 DevKitC (ESP32-WROOM-32), data-capable USB cable, 2 jumper wires, the KY-012 module

ESP32 DevKitCGPIO4GNDKY-012 buzzerS (signal)middle: not used– (GND)

■ GND (–) ■ Signal (S) Middle pin: not connected

# ESP32 pin Module pin Wire colour Notes
1 GPIO4 S Yellow Signal. 3.3 V logic
2 GND – (minus) Black Ground

Check the pin labels printed on your board.

Watch out: ESP32 pins are 3.3 V only. The buzzer runs from the GPIO pin, and 3.3 V is just below its 3.5 V minimum, so it may sound quiet or not at all. If it stays silent, try it on an Arduino UNO (5 V).

1
Install the Arduino IDE
Download the Arduino IDE.
2
Add the ESP32 boards
File → Preferences → "Additional boards manager URLs": paste https://espressif.github.io/arduino-esp32/package_esp32_index.json (see the official install guide). Then Tools → Board → Boards Manager → search "esp32" → install "esp32 by Espressif Systems".
3
Choose board and port
Tools → Board → ESP32 Arduino → ESP32 Dev Module. Tools → Port → your ESP32. If no port appears, install the CP210x driver (or the CH340 driver from WCH, depending on your board) and try a data USB cable.
4
Upload the example
Paste the sketch below and press Upload. If the upload fails, set Tools → Upload Speed → 115200 and upload again. If it says "Connecting…", hold the BOOT button until uploading starts.
▸ Example 1 — Beep once a second
// KY-012 active buzzer on ESP32
// Wiring: S -> GPIO4, - (GND) -> GND, middle pin not connected
const int BUZZER_PIN = 4;   // you can change this (pin table must match)

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);      // buzzer pin is an output
  Serial.begin(115200);             // speed for the Serial Monitor
  Serial.println("OK - epartners.co.nz test");
}

void loop() {
  digitalWrite(BUZZER_PIN, HIGH);   // HIGH = buzzer sounds
  Serial.println("Buzzer ON");
  delay(500);                       // you can change this (milliseconds)
  digitalWrite(BUZZER_PIN, LOW);    // LOW = silent
  Serial.println("Buzzer OFF");
  delay(500);                       // you can change this
}

✓ Check: The buzzer beeps every half second. In Serial Monitor (115200 baud) you see "OK - epartners.co.nz test" once, then "Buzzer ON" and "Buzzer OFF".

Troubleshooting

Board Problem Likely cause Fix
All No sound S and – swapped, a loose wire, or the wrong pin in the code Check the – and S marks on the module, push the wires in firmly, and make sure the pin in the code matches the pin table.
All Sound is constant and never stops Module powered directly from a power pin instead of the signal pin Connect S to the GPIO pin in the table, not to 5V or 3V3.
All Sound is very faint Peel-off seal still on the buzzer Remove the white sticker on top of the buzzer.
ESP32 Quiet or no sound 3.3 V is just below the 3.5 V minimum the module is rated for Check the wiring first. Try the same module on an Arduino UNO (5 V) to confirm it works.
ESP32 Stuck on "Connecting…" Board not in upload mode Hold the BOOT button until uploading starts.
ESP32 Upload fails or stops part-way Upload speed too high for the USB cable or USB chip Tools → Upload Speed → 115200, then upload again.
Arduino UNO / ESP32 No port in the Tools menu Charge-only cable or missing USB driver Use a data USB cable and install the driver for your board's USB chip.

Try next: make the buzzer beep three short times when a button is pressed.

Spotted a problem in this tutorial? Email support@epartners.co.nz and we'll check it and update the tutorial.

Good to know
  • Remove the white seal on top of the buzzer before use if it is still fitted.
  • The pitch is fixed. For different notes, use a passive buzzer instead.
  • If you plan to run several at once, power them separately.

Video guide

Datasheet

Key figures from the manufacturer's datasheet for the Joy-IT KY-012, the active piezo buzzer module supplied with this product.

KY-012 active piezo buzzer module
Article no. COM-KY012APB
Type Active piezo buzzer module
Operating voltage 3 – 5.5 V DC
Resonance frequency 2500 Hz ± 300 Hz
Minimum sound output 85 dB (measuring distance not stated)
Dimensions 15 x 25 x 12 mm

Download the KY-012 datasheet (PDF, 750 KB)

▸ Preview the datasheet

If the preview does not load on your device, use the download link above.

Source: Joy-IT, KY-012 Active piezo buzzer module datasheet, article no. COM-KY012APB.

Resources

Which one should I choose?

Product Key difference Best for
This product: KY-012 active buzzer module Active: sounds at a fixed tone when powered. 3 pins (S, middle, –). Simple alarms and beeps with one line of code
Passive buzzer module KY-006 Passive: needs an audio drive signal to sound, so the pitch is set by your code. 2 pins (store listing). Playing different notes or tunes
High quality passive buzzer module Passive, 3.3 – 5 V, 3-wire module with fixing holes (store listing). Tones with a mounted 3-wire board

FAQ

▸ Can this buzzer play different notes?

No. It is an active buzzer with a fixed tone of about 2.5 kHz, so the pitch cannot be changed from code. For different notes, choose a passive buzzer module.

▸ Does it work with a 3.3 V ESP32 or Raspberry Pi Pico?

Not reliably. The module is rated for 3.5 – 5.5 V, so the 3.3 V output of an ESP32 or Pico is just below the minimum. It may sound quiet or not at all, so a 5 V board such as the Arduino UNO is the safer choice.

▸ Do I need a resistor or transistor?

Not for the basic examples. Joy-IT's own Arduino and Raspberry Pi examples connect the S pin straight to a GPIO pin.

▸ What is the middle pin for?

Nothing is needed there. Use S and – only, and leave the middle pin unconnected. Check the labels printed on your module before wiring.

Technical question about this part? Email support@epartners.co.nz with your board and wiring, and we'll help you get it working.

Shipping: $5.99 urban, $9.99 rural. Free shipping on orders of $100 or more.

Order by 10:30am (NZT), Monday to Friday, and we dispatch the same day. Orders placed after 10:30am, on weekends or on public holidays are dispatched the next business day.

Delivery usually takes 1–2 business days after dispatch (2–3 for rural addresses). See our Shipping Policy for full details.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.

Recently viewed