# Buzzer gives only a click or one tone: active vs passive buzzer

> Fix a buzzer that clicks or beeps at one pitch: active buzzers have a built-in oscillator, passive buzzers need a tone signal from the pin.

Canonical: https://roboticsengineering.in/fix/active-vs-passive-buzzer-no-tone/ | Published: 2026-11-03 | Updated: 2026-11-04

**An active buzzer beeps at one pitch when powered; a passive buzzer needs a changing signal from tone().** Using the wrong code gives a click or silence.

## What the message means

The active type contains its own oscillator. The passive type is like a small speaker and plays only the frequency you send it.

## Fix it in this order

1. Check the type. Apply power directly: an active buzzer beeps, a passive one only clicks.
2. For an active buzzer use digitalWrite HIGH and LOW.
3. For a passive buzzer use tone(pin, frequency) and noTone(pin).
4. On an ESP32 use ledc PWM with the frequency you need, since the tone() function depends on your core version.
5. Check the polarity and use a transistor for a loud or large buzzer.

## Why it happens

An active buzzer contains a small oscillator, so applying DC voltage makes it sound at a fixed pitch. A passive buzzer is essentially a coil and diaphragm, so it needs a changing signal at the audio frequency you want. Feeding DC to a passive buzzer moves the diaphragm once, which gives a click and then silence. The pitch comes from the frequency of the signal, not from the voltage.

Arduino’s tone() generates the required square wave with a timer, which is why a passive buzzer responds to it. Timer support on the ESP32 depends on the core version, so LEDC PWM at a chosen frequency is a dependable choice there. A buzzer can draw more current than a pin should supply, so a transistor driver protects the microcontroller output.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Click only | Passive buzzer driven with DC. |
| Cannot change the pitch | Active buzzer. Use a passive one. |

## Confirm the fix

1. Connect the buzzer briefly to 5 V through a resistor, then note whether it beeps steadily or only clicks once.
2. Run tone(pin, 2000) for one second, then noTone(pin), and confirm the sound stops when the call is made.
3. Change the tone between 1000 and 3000 Hz, then listen for pitch change, which only a passive buzzer shows.

**Common mistake:** Assuming every buzzer is controlled the same way. A passive buzzer given DC stays silent or clicks, while the code can look perfectly correct.

## Related

[ESP32 PWM change](https://roboticsengineering.in/fix/esp32-ledcsetup-ledcattachpin-not-declared-core-3/), [GPIO current limit](https://roboticsengineering.in/fix/esp32-gpio-led-current-limit-use-resistor-transistor/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

## Why this happens

A piezo buzzer makes sound by flexing a thin disc. The disc moves a little each time the voltage across it changes. An active buzzer has a small oscillator circuit inside, so a steady DC supply makes it vibrate at the frequency that circuit sets. A passive buzzer has no oscillator, so DC moves the disc once and then nothing happens until the voltage changes again.

That is why one piece of code makes an active buzzer beep and leaves a passive one silent. The pitch of a passive buzzer follows the frequency you send, and small piezo discs usually sound loudest near their own resonance, often a few kilohertz. Check your datasheet for the figure.

## How to confirm the cause

- Connect the buzzer to the supply through a suitable resistor for a moment. A steady beep means active; a single click means passive.
- Look at the part. Many active buzzers have a sealed back and a mark for the positive leg; many passive ones show a bare circuit board underneath. This is a hint, not a rule.
- Run a tone sweep. If the pitch changes with frequency, the part is passive.
- If it beeps only one way round, it is polarised and probably active; check the plus mark.
- Measure the voltage the pin delivers. A 5 V board with a buzzer rated for 3 V may sound weak or distorted.

## Worked example

This Uno sketch alternates two pitches and then stops. Pin 8 is an example.

```
const int BUZ = 8;
void setup() {}
void loop() {
  tone(BUZ, 1000);   // 1 kHz
  delay(300);
  tone(BUZ, 2000);   // 2 kHz
  delay(300);
  noTone(BUZ);
  delay(1000);
}
```

A passive buzzer plays two clear pitches. An active buzzer ignores the frequency and gives its own fixed note whenever the pin toggles. On the Uno, tone() uses Timer 2 and so disables PWM on pins 3 and 11 while it runs.

## Common mistakes

- Using analogWrite() on a passive buzzer. That gives a fixed note of about 490 Hz or 980 Hz depending on the pin, not a chosen pitch.
- Driving a large buzzer straight from a pin that cannot supply the current. Use a transistor.
- Wiring an active buzzer the wrong way round.
- Copying tone() code to an ESP32 without checking that your core supports it.

## If this did not fix it

- Pin does not supply enough current: add a transistor and a base resistor.
- Too quiet: try the frequency near the part’s resonance.
- Constant tone that will not stop: noTone() was never called, or the pin is held high.
