DIGITALbeginner

Active Buzzer

A 12 mm electromagnetic buzzer with its own oscillator, on a TinkerBlock board. SIGNAL HIGH beeps at about 2.4 kHz, LOW stops it: one note, one line of code. An S8050 transistor switches it from VCC, so your pin gives a few milliamps and VCC can be 5V beside a 3.3 V board. There is no pull-down on SIGNAL, so use a pin that stays LOW while your board boots.

Comes in this kit — not sold separately

Specifications

TypeActive buzzer with its driver: an NPN transistor switch, a flyback diode and an indicator LED. HIGH on SIGNAL beeps, LOW stops
BuzzerHuawha TMB12A05, electromagnetic, with its own oscillator. 2400 ± 300 Hz, one fixed note. Ø12 × 9.5 mm, through-hole, shipped under a paper seal to peel off
LoudnessAt least 95 dB at 10 cm at 5 V (datasheet); 95.5 to 97.8 dB on the datasheet's ten-part test report. About 3 dB quieter at 3.3 V, typical
Rated voltage5 V, for 3 to 7 V. The buzzer runs from VCC
Current30 mA max (datasheet); about 22 mA typical at 5 V and 15 mA at 3.3 V, plus about 3 mA for the LED on 5 V. None of it flows through SIGNAL
DriverS8050 NPN transistor between the buzzer and GND, hFE 200 to 350. SIGNAL feeds its base through 1 kΩ: about 2.6 mA from a 3.3 V pin, 4.3 mA from 5 V
SIGNAL1 kΩ to the transistor's base and nothing else. No pull-down: a pin that is HIGH or pulled up while your board boots sounds the buzzer
Supply5V on VCC, on any board: VCC never reaches SIGNAL, so it is safe beside a 3.3 V board. 3V3 works, quieter
ProtectionSS14 Schottky diode across the buzzer for the switch-off kick. Nothing to add
IndicatorRed LED and 1 kΩ from VCC to the transistor: lit while the buzzer is driven. Not a power light
Pins to wire3 of the 4: GND, VCC and SIGNAL. NC is connected to nothing on the board
Header4-pin right-angle male, 2.54 mm pitch: GND, VCC, NC, SIGNAL, with GND on the square pad
Board22.4 × 30.4 mm, two 4.8 mm mounting holes 16 mm apart. The front prints ACTIVE HIGH, the back BEEPS WHEN GPIO IS HIGH
In the box1 × TK36 block. It also ships inside the TinkerBlock kits

What it does

One note, on demand. The black can is an active buzzer: a coil, a thin metal disc and an oscillator all inside it, so it sounds its own 2.4 kHz note from plain DC. The rest of the board switches it: an S8050 transistor between the buzzer and GND, a 1 kΩ from SIGNAL to the transistor's base, a diode for the coil's kick at switch-off, and a red LED that lights while it is driven.

Drag to turn it
The TK36 as it ships, seal on. Peel it off before use. Turn it over for the back.

SIGNAL HIGH switches the transistor on and the buzzer beeps; LOW switches it off. The buzzer's current, about 22 mA from 5 V, flows from VCC and never through your pin, which gives the base about 2.6 mA at 3.3 V.

The page this replaces called the buzzer a piezo element, put its note near 2 kHz, and suggested tape over the hole to quieten it. The datasheet says an electromagnetic buzzer at 2400 ± 300 Hz, and warns against covering the hole.

Two things to know before wiring

  • There is no pull-down on SIGNAL. Whatever your pin does before setup() runs, the buzzer does. GPIO 0, 43 and 44 on an ESP32-S3 dev board beep from power-up, and GPIO 0 can stop the board running your sketch at all. The handbook uses GPIO 4.
  • VCC is the buzzer's supply, and it is a 5 V part. Wire VCC to 5V on every board: it never reaches SIGNAL, so that is safe beside a 3.3 V microcontroller. 3V3 works, about 3 dB quieter.

Wiring, in four lines

  1. GND to your board's GND.
  2. VCC to 5V: an Uno's 5V, the 5V pin of an ESP32 or ESP32-S3 board on USB, or a Pico's VBUS.
  3. SIGNAL to GPIO 4 on an ESP32-S3 or ESP32, D9 on an Uno, GP15 on a Pico.
  4. NC to nothing: it is connected to nothing on the board.

Then pinMode(pin, OUTPUT) and digitalWrite(pin, LOW) first in setup(), and digitalWrite(pin, HIGH) to beep.

Where to start

The handbook below is nine short articles, each with a working figure. The first beep is the whole build in three wires and a few lines, and quiet at boot is the one page about choosing the pin.

For how it works, read a switch in the ground wire and five volts or three. For alarms and confirmations that do not stop your sketch, beeps without delay(). If it will not beep, when it does not beep.

When it doesn’t work

It beeps as soon as I power my board.
The board has no pull-down on SIGNAL, so the buzzer follows whatever your pin does before the sketch starts. On an ESP32-S3 dev board GPIO 0 is pulled up by the BOOT button and sounds it from power-up; GPIO 43 and 44 are the serial port and do the same. Use GPIO 4, and make pinMode OUTPUT and digitalWrite LOW the first two lines of setup().
Should VCC go to 3V3 or 5V?
5V, the buzzer's rated voltage: an Uno's 5V, the 5V pin of an ESP32 board on USB, a Pico's VBUS. It is safe beside a 3.3 V board because VCC never reaches SIGNAL. 3V3 works too, inside the buzzer's 3 to 7 V range, about 3 dB quieter.
Can PWM change the volume?
Not usefully. analogWrite switches the whole buzzer on and off hundreds of times a second, and its own oscillator's note comes out chopped at that rate: sometimes quieter, usually rougher. The datasheet does not cover it. 3V3 on VCC is a little quieter; for real control, use a passive buzzer.
I want it to play a tune.
Wrong part: the note is made inside the buzzer at 2400 ± 300 Hz, and tone() only chops it. TK37 is the passive buzzer, which plays the frequency your sketch gives it.
Should I take the paper seal off?
Yes. It says REMOVE SEAL AFTER WASHING and is there to keep cleaning fluid out when the board is washed after soldering. The buzzer beeps with it on, but the datasheet warns that covering the sound hole can make it run unsteadily. For the same reason, tape over the hole is not a volume control.
The LED lights but it does not beep.
The LED sits beside the buzzer on the transistor, so SIGNAL, VCC and GND are all fine. The fault is the buzzer or its leads. Check the seal is the only thing over the hole.

The active buzzer handbook

9 articles · about 40 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

The board

2 articles

Four pins of which three are wired, a 12 mm buzzer that makes its own note, and the four small parts that switch it: a transistor, two resistors, a diode and a light.

How it makes a sound

3 articles

SIGNAL only feeds a transistor's base. The buzzer runs from VCC, which is why VCC can be 5V beside any board, and a diode catches its coil when it stops.

Driving it

2 articles

Three wires and a beep, then the one thing this board asks of the pin you choose: that it stays LOW while your board starts.

Using it

2 articles

Beep patterns that play while the sketch gets on with its work, and the short list of reasons it stays silent.

Lessons using TK36

Each one is a working build, not a snippet.

Edit this page — content/modules/active-buzzer.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Active Buzzer

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →