Piezo Buzzers, Speakers, and Haptic Motors for Makers: How to Choose and Drive Each
Nearly every maker project that needs an alert tone, a click of confirmation, or a buzz of feedback reaches for "a buzzer" without thinking much about which of several very different components that actually means. Piezo buzzers, piezo speakers, and vibration motors are three distinct technologies with different drive circuits, different failure modes, and very different sound or feel — picking the wrong one, or driving the right one incorrectly, is why so many DIY alert circuits sound thin and buzzy or why a "haptic" project just feels like a cheap toy. This guide sorts out what each component actually is and how to drive it properly.
Piezo Buzzers: Self-Driven and Simple
A piezo buzzer (sometimes called a piezo "beeper") is a piezoelectric disc paired with a small internal driver circuit that already contains its own oscillator. You apply DC voltage (often 3–12V depending on the part) and it produces a fixed-frequency tone on its own — no PWM signal required, no external driving circuit needed. This is the component behind most cheap "beep" sounds: smoke detectors, microwave timers, and simple confirmation beeps. Its main limitation is that it usually produces one tone (or a very narrow range if it does accept an external signal) and cannot play music or varied alert patterns.
Passive Piezo Elements: You Drive the Frequency
A passive piezo element (no internal driver) is just the piezoelectric disc itself — it makes no sound until you apply an AC signal, and the frequency of that signal is the pitch you hear. This is what Arduino's tone() function is built around: it toggles a GPIO pin at your requested frequency, and a passive piezo turns that square wave directly into sound.
// Arduino tone() drives a passive piezo directly from a digital pin tone(BUZZER_PIN, 440, 200); // 440Hz (A4) for 200ms noTone(BUZZER_PIN);Because you control the frequency in software, a passive piezo can play simple melodies, rising/falling alert tones, or Morse-style patterns — something a self-driven buzzer cannot do. The tradeoff is volume and tone quality: driven directly off a GPIO pin, output is quiet and thin. A small transistor or MOSFET driver stage between the microcontroller and the piezo element increases the current available and noticeably improves volume.
Piezo Speakers: Same Idea, Wider Bandwidth
A piezo speaker is built for a wider, flatter frequency response than a beeper-style buzzer — still a piezoelectric disc, but paired with a resonant cavity or diaphragm designed to reproduce more of the audible range reasonably evenly, closer to (but still well short of) a real dynamic speaker. These are the right choice for anything that needs to sound like actual audio rather than a single alert tone — simple voice alerts, tune playback, or door-chime style projects — while remaining far cheaper and thinner than a dynamic speaker and its enclosure. They still benefit from an amplifier stage for anything beyond whisper volume; see this site's Class-D amplifier project for a proper audio path if intelligibility matters.
Vibration Motors: ERM vs. LRA
Haptic feedback — a phone's buzz, a game controller's rumble — comes from a completely different component family: small vibration motors, not piezo elements at all (though piezo haptic actuators exist in high-end products, they're rare in hobbyist parts bins).
ERM (Eccentric Rotating Mass)LRA (Linear Resonant Actuator) How it worksA tiny DC motor spins an off-center weightA magnetic mass oscillates back and forth on a spring at its resonant frequency Drive signalSimple DC voltage, or PWM for variable intensityAC signal at (or very near) its specific resonant frequency — typically 150–250Hz Response timeSlower to spin up and coast down — feels "mushy," a delayed buzzFast, crisp start/stop — feels like a sharp "click" or "tap" EfficiencyLower; wastes energy spinning an eccentric massHigher when driven at resonance; poor off-resonance Typical useCheap pagers, simple "buzz" alerts, cost-sensitive projectsGame controllers, phones, anything wanting sharp tactile feedbackERMs are forgiving: apply PWM through a flyback-protected MOSFET or a simple driver like the DRV8833 and you get a variable-intensity buzz with almost no tuning required. LRAs are the opposite — drive one at the wrong frequency (or with plain DC) and it barely moves; drive it at its rated resonant frequency and it snaps sharply. This is exactly the problem haptic driver ICs like the DRV2605/DRV2605L exist to solve: they contain a library of pre-tuned haptic effects (clicks, buzzes, ramps) and auto-resonance-tracking calibration for LRAs, controllable over I2C from an Arduino or ESP32 with no manual frequency tuning required.
// DRV2605L via Adafruit's library, I2C haptic driver #include "Adafruit_DRV2605.h" Adafruit_DRV2605 drv; drv.begin(); drv.selectLibrary(1); drv.setMode(DRV2605_MODE_INTTRIG); drv.setWaveform(0, 47); // "Buzz 1" effect drv.setWaveform(1, 0); // end of sequence drv.go();Choosing the Right Component
- Need a simple alert beep and nothing else? A self-driven piezo buzzer — wire it to a transistor switch or directly to a GPIO pin if current allows, done.
- Need alert tones, melodies, or a startup jingle? A passive piezo element driven by tone() or a proper waveform generator, through a small driver transistor for volume.
- Need intelligible audio or music playback? A piezo speaker at minimum, or better, a real small dynamic speaker driven through a proper I2S DAC and amplifier stage.
- Need a cheap "it buzzed" confirmation? An ERM motor on PWM through a flyback diode and MOSFET.
- Need crisp, phone-quality tactile feedback? An LRA driven by a DRV2605-family haptic driver IC, which handles resonance tracking for you.
Wiring Notes and Common Mistakes
- Never drive any of these components directly off a GPIO pin at more current than the pin can supply (typically 20–40mA max) — use a transistor or dedicated driver for anything beyond the faintest buzz.
- Vibration motors are inductive-ish loads with brush noise (ERM) or spring mechanics (LRA) — always include a flyback diode across an ERM motor when switching it with a transistor, exactly as you would for a DC motor or relay coil.
- Piezo elements are high-impedance, capacitive loads, not resistive ones — a plain resistor-based volume control will not behave the way it does with a normal speaker; use a proper driver IC or amplifier if you need level control.
- LRAs are usually rated for a narrow band around one specific resonant frequency printed on the datasheet (e.g., "175Hz LRA") — driving one meant for 175Hz at 235Hz will produce a much weaker buzz, not a higher-pitched one.
These three component families get lumped together as "buzzers" constantly, but treating them as interchangeable is exactly why so many DIY alert and haptic circuits underperform. Match the component to the actual job — alert tone, audio, or tactile feedback — and drive it the way its datasheet actually calls for.
Related Guides
- How to Program Addressable LED Strips: WS2812B Patterns, Effects, and Power Design
- I2C vs SPI vs UART: How to Choose and Use Serial Communication Protocols
- How to Use Sensors with Arduino and ESP32: Temperature, Distance, Load, Current, and Hall Effect
- How to Control Motors with Arduino and ESP32: Stepper, DC, and Servo Drivers
- ESP32: Setting Up for Arduino IDE
- Arduino vs ESP32: Which Should You Use? A Practical Comparison
- Getting Started with ESP32: GPIO, WiFi, and Your First Project
- I2C Wiring and Protocol Guide for Arduino, ESP32, and Raspberry Pi