Hello friends, I hope you all are doing great. Today, I am going to share the new Passive Buzzer Library for Proteus. A passive buzzer is the sounder you use when one beep is not enough: it plays whatever tone you give it, so the same little part can chirp, play a melody, sweep like a siren or sound a two-tone alarm. It is the part behind the start-up tune of a 3D printer, the beeps of a microwave and the melody of a musical greeting card.
Passive Buzzer Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Other component libraries: C945 Transistor · PC817 Optocoupler · Relay Module · Resistor · 5 mm LED · Designer Colour LED · Push Button · Active Buzzer · Electrolytic Capacitor · Ceramic Capacitor · Tantalum Capacitor · Film Capacitor · 1N4007 Diode · Zener Diode · Schottky Diode · Supercapacitor · Photodiode · RGB LED · Bridge Rectifier · Flashing LED · Bi-Colour LED · SMD LED · Slide Switch · Toggle Switch · Rocker Switch · Micro Limit Switch · Emergency Stop Switch · SMD Resistor · Power Resistor · Resistor Network · Potentiometer · Trimmer Potentiometer · Slide Potentiometer · NTC Thermistor · DIP Switch · Fuse · Mini Speaker · 7-Segment Display · LED Bar Graph · IR / UV LED · Small Transistors · TIP122 Darlington · N-MOSFET · P-MOSFET · PC817 Optocoupler · Filament Bulb · Power LED · Voltage Regulator · SCR and TRIAC · Inductor · Toroid Inductor · Crystal
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Serial Monitor Expert: the serial monitor with extra debugging tools
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
Our library has two of them, at true scale: a 12 mm magnetic passive buzzer, drawn from the side so you can see the green board under its black can, and a 27 mm piezo disc, the brass disc with a white ceramic layer and red and black leads. Neither has an oscillator inside. At Run, they sound the tone your Arduino drives them with, on your PC speaker too, as loud as the real part would be at that frequency. The pop-up names the note, draws the loudness against frequency with the tone on it, and shows the drive, the duty and the current. Plain DC gives one click and silence, exactly as on the bench.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Passive Buzzer board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the Passive Buzzer Library for Proteus:
What is a Passive Buzzer?
A passive buzzer is a sounder with no electronics of its own. Inside there is only the part that moves the air, a coil and a thin iron diaphragm, or a piezo ceramic on a metal plate. Give it a square wave and it vibrates at that frequency; give it steady DC and it moves once, a single click, and then stays silent. The tone is entirely up to the circuit that drives it.
An active buzzer looks almost the same from the top, but it has a small oscillator built in. Power it and it sounds its own fixed tone, usually around 2.3 kHz, with nothing more than digitalWrite(). That makes it the easier part for a plain beep, and we covered it in our Active Buzzer Library for Proteus. The passive one takes a little more work, and repays it with every note you can think of.
| Feature | Active buzzer | Passive buzzer |
|---|---|---|
| Oscillator inside | yes | no |
| Its tone | one, fixed by the maker | any tone you drive it with |
| On DC | a steady tone | one click, then silence |
| From an Arduino | digitalWrite() | tone(), a square wave |
| How to tell | sealed black underside | a green board visible underneath |
Inside the Magnetic Buzzer
A magnetic buzzer is a tiny loudspeaker. A coil sits under a thin, springy iron disc, with a permanent magnet holding the disc slightly pulled in. Current through the coil pulls the disc further in or lets it spring back, depending on its direction and size. Switch the current on and off a few thousand times a second and the disc vibrates, pushing the air through the hole in the top of the can. Electrically, the part is simply its coil: a resistance of a few tens of ohms, with a little inductance.
Our model follows the CUI CEM-1206S, a typical 12 mm magnetic transducer: rated at 5 V (it works from 3 V to 8 V), a 47 ohm coil, loudest at 2.4 kHz, and 85 dB at 10 cm when driven with a 5 V square wave at that frequency. The datasheet limits the mean current to 45 mA.
Inside the Piezo Disc
A piezo disc works on a different principle. A thin layer of piezoelectric ceramic is bonded to a brass plate. Put a voltage across the ceramic and it grows or shrinks very slightly, and since it is glued to the brass, the whole disc bends like a drum skin. Drive it with a square wave and it flexes back and forth at that frequency. The silver layer on top of the ceramic is one electrode, where the red lead is soldered; the brass is the other, with the black lead.
Electrically, a piezo disc is a small capacitor, so it draws almost no current: just a short charging pulse at every edge. Our part follows the Murata 7BB-27-4: a 27 mm brass plate, about 20 nF, loudest at 4.6 kHz, and a maximum input of 30 V peak to peak. A bare disc is fairly quiet in free air; glued over a small cavity or into a box it gets much louder, which is how the sealed piezo buzzers on circuit boards are built.
| Feature | Magnetic buzzer | Piezo disc |
|---|---|---|
| Style | 12 x 8.5 mm can on a green board | 27 mm brass disc, red and black leads |
| Rated like | CUI CEM-1206S | Murata 7BB-27-4 |
| Electrically | a 47 ohm coil | a 20 nF capacitor |
| Loudest at | 2.4 kHz | 4.6 kHz |
| Voltage | 5 V rated, 3 V to 8 V | 30 V peak to peak at the most |
| From a pin | through a resistor or a transistor | straight on the pin |
| In the library | BUZZERPASSIVETEP | PIEZODISC27TEP |
Resonance and Loudness
Every sounder has a frequency where it is loudest, its resonance: the diaphragm or the disc, the air in the can and the hole all ring most easily there. Move away from it and the sound falls off, slowly at first and then steeply. That is why the datasheets give the sound level at one frequency only. Loudness is measured in decibels: 6 dB less is half the sound pressure, 20 dB less is a tenth.
Our model puts every tone on a resonance curve: a quality factor of 1.5 for the magnetic buzzer, whose curve is broad, and 3 for the piezo disc, which is sharper. It then adds two more things that change the loudness on a real part. The drive: a 5 V square wave is the reference, and half the voltage is 6 dB quieter. And the duty: a square wave that is high half the time puts the most energy into its fundamental, while a thin pulse is much weaker.
Notes and Frequencies
Music divides every doubling of frequency, an octave, into 12 semitones, each about 6 % higher than the last. The reference is A4 at 440 Hz. So A5 is 880 Hz, A6 is 1760 Hz, and so on. The pop-up names the note nearest to the tone it hears, and shows how far off it is in cents, hundredths of a semitone. A tone within 10 cents of a note sounds in tune to most ears.
| Note | Frequency | Note | Frequency |
|---|---|---|---|
| C7 | 2093 Hz | G7 | 3136 Hz |
| E7 | 2637 Hz | C8 | 4186 Hz |
| A4 | 440 Hz | A7 | 3520 Hz |
Making the Tone: tone()
On an Arduino, the square wave comes from tone(pin, frequency), which uses a timer to toggle the pin in the background while your sketch carries on. tone(pin, frequency, duration) stops by itself after the given number of milliseconds, and noTone(pin) stops it at once. An UNO plays one tone at a time; starting a tone on another pin needs a noTone() on the first. The timer can only divide its clock in whole steps, so the tone you get is often a few hertz away from the one you asked for. That is a few cents at most, and the pop-up shows it.
Driving It Safely
A 47 ohm coil straight on a 5 V pin would ask for over 100 mA, far past the 40 mA an UNO pin can give at the very most. There are two good ways. A series resistor limits the current: with 100 ohm, our demo measures 29.9 mA peak and 1.41 V on the coil. It works, but the coil gets less than its 3 V minimum, so the sound is about 11 dB below the rated 85 dB. A transistor switching the buzzer from the 5 V rail gives it the whole supply and full volume, with only a few milliamps from the pin. The piezo disc needs neither: as a capacitor it takes well under a milliamp on average.
Where They Are Used
Passive buzzers play the start-up and error tunes of 3D printers, the key clicks and alerts of appliances, the alarms of meters and chargers, and the melodies of toys and greeting cards. Piezo discs also work the other way round, as sensors: tap one and it makes a voltage, which is why they turn up as knock sensors and in electronic drum pads.
Features of the Passive Buzzer Library for Proteus
- The real look, at true scale: a 12 mm magnetic buzzer from the side, on its green board, and a 27 mm brass piezo disc with red and black leads, each with our small TEP signature.
- They play the tone they are given: the model times the edges of the drive and finds the frequency, the note and the duty.
- Sound on your PC: at the right pitch and at the loudness the real part would have; it pauses when the simulation pauses.
- A real loudness curve: each part is loudest at its resonance, with the drive voltage and the duty on top.
- DC only clicks: exactly as a passive part does, with a note in the log that it needs
tone(). - Real electrical loads: the buzzer is a 47 ohm coil, the disc a 20 nF capacitor, so the pin current is real.
- A pop-up for each part: the tone, the note, the loudness against frequency, mute and volume, graphs, an event log and a check page.
- A complete package: about 1.9 MB with the library, our Arduino UNO V4.0, our resistor and push buttons and the demo, without the source code of the models.
The Passive Buzzers in Proteus
The devices are BUZZERPASSIVETEP and PIEZODISC27TEP in TEPPASSIVE.LIB, under Speakers and Sounders, with the prefix BZ and the model TEPPASSIVE.DLL. Search PASSIVE or PIEZO in Pick Devices. Each has two pins, + and -; on the disc, + is the red lead to the electrode and - the black lead to the brass.
The Properties
| Property | What it does |
|---|---|
| Loudest at (VALUE) | 2.4kHz or 4.6kHz: the label; the resonance belongs to each device |
| Sound on the PC, % | 40; 0 keeps it silent |
| Coil resistance, ohm (buzzer) | 47 |
| Capacitance, nF (disc) | 20 |
Download Passive Buzzer Library for Proteus
Click the button below to download Passive-Buzzer-Library-for-Proteus-v1.0.zip (about 1.9 MB, without the source code of the models):
Passive Buzzer Library for Proteus V1.0- README.txt: installation, the demo, the properties, troubleshooting and the limits.
- Proteus Library Files:
TEPPASSIVE.LIB,TEPRESISTOR.LIB,TEPBUTTON.LIBand ourArduinoV4TEP.LIB. - Proteus Model Files:
TEPPASSIVE.DLL,TEPRESISTOR.DLL,TEPBUTTON.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch.
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install Passive Buzzer Library for Proteus
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPPASSIVE.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for PASSIVE.
Demo: A Chime and a Sweep
BZ1, the magnetic buzzer, sits on D9 behind R1, a 100 ohm resistor that keeps the pin current safe. BZ2, the piezo disc, goes straight on D8. Two push buttons from D2 and D3 to ground start the music: SW1 plays a chime on the piezo, and SW2 sweeps the magnetic buzzer from 500 Hz to 5 kHz. Open Passive-Buzzer-Chime-ArduinoUnoV4.pdsprj. It runs on our Arduino UNO Library for Proteus V4.0, with its built-in monitor, the same window as our TEP Serial Monitor Advance for Proteus. The resistor is from our Resistor Library for Proteus, the buttons from our Push Button Library for Proteus.
| Part | Connection | Job |
|---|---|---|
| BZ1 (magnetic buzzer) | D9 through R1, - to GND | the sweep, and the DC test |
| R1 (100 ohm) | D9 to BZ1 + | keeps the pin under 40 mA |
| BZ2 (piezo disc) | D8, - to GND | the chime |
| SW1 (push button) | D2 to GND | plays the chime |
| SW2 (push button) | D3 to GND | plays the sweep |
The Sketch
At power-up, the sketch first shows why a passive buzzer needs a tone. It puts plain DC on the buzzer for 0.3 s:
digitalWrite(BUZZER, HIGH);
delay(300);
digitalWrite(BUZZER, LOW);
The chime plays four notes on the piezo, C7, E7, G7 and C8, climbing towards the disc's resonance. Each note lasts 250 ms, with a short gap before the next:
tone(PIEZO, CHIME[k], 250);
delay(300);
The sweep steps the buzzer's tone by 100 Hz every 60 ms, from 500 Hz to 5 kHz, and stops it with noTone() at the end:
for (unsigned int hz = 500; hz <= 5000; hz += 100) {
tone(BUZZER, hz);
Both buttons use INPUT_PULLUP, so a press reads LOW, and the sketch waits for the button to be released before it listens again.
Run the Demo
Press Run. The first thing that happens is the DC test: 1.41 V on BZ1's coil for 0.3 s, and no tone at all. Its pop-up stays SILENT, and the Event log records one click with the reason: a passive buzzer needs a square wave. The loudness curve shows where this buzzer is happiest, a broad peak at 2.4 kHz:
The Chime on the Piezo
Now press SW1. The piezo plays C7, E7, G7 and C8, and you hear them on your PC. On the sheet, rings move out over the disc's electrode while it sounds. The pop-up follows each note: the last one, C8, measures 4202 Hz, 7 cents sharp, 51 % duty, and only 1 dB below the disc's loudest, because it is close to the 4.6 kHz resonance. The white dot sits right at the top of the curve:
The four notes show the resonance clearly. C7 at 2102 Hz is 14 dB below the disc's loudest, E7 at 2662 Hz 11 dB, G7 at 3167 Hz 8 dB, and C8 just 1 dB. The same 5 V square wave, four very different levels. The Graphs page shows the steps of frequency and the sound rising with each, and the average current: 0.84 mA at C8, tiny, as a 20 nF capacitor should take:
The log also shows the cents. tone() gave 2102 Hz for the 2093 Hz the sketch asked for, 8 cents sharp: its timer can only divide out whole steps, and a few cents is normal.
The Sweep on the Magnetic Buzzer
Now press SW2. The buzzer sweeps from 500 Hz to 5 kHz in 2.79 s. You hear it rise, swell as it passes 2.4 kHz, and fade again above it. We paused the simulation in the middle of the sweep, at 2717 Hz, just past the resonance: the PC sound stopped with it, and went on when we pressed Run again. The pop-up shows about 73 dB at 10 cm, with 1.41 V peak on the coil and 29.9 mA from the pin. Here is the complete circuit, truly running:
Why 73 dB and not the rated 85 dB? The 100 ohm resistor leaves only 1.41 V on the coil, about 11 dB less than a 5 V drive. That is the price of protecting the pin. The Graphs page shows the frequency climbing in steps, and the sound swelling to its peak near 2.4 kHz and falling away:
The Event log names every one of the 46 steps of the sweep, with its note and its loudness. The last, 5000 Hz, is 8 dB below the buzzer's loudest:
The Check Pages
The Check page of the buzzer flags exactly the trade-off of the demo: the drive is right, the pin current of 30 mA is safe, but 1.4 V is under the coil's 3 V minimum, so a transistor would make it about 11 dB louder. The disc's Check page is all green: 5.0 V against its 30 V limit, and 0.84 mA on average:
Try It Yourself
- Change the chime to 4600 Hz notes, and see the disc reach its loudest.
- Lower R1 to 47 ohm, and watch the Check page warn about the pin current.
- Play the sweep with
analogWrite()instead oftone(), and hear the fixed PWM frequency. - Play a melody of your own on the piezo, and read every note in the log.
- Swap the two parts, and compare their loudness curves at the same notes.
Ideas to Extend the Demo
- Drive the buzzer through a transistor and compare the sound level.
- Play a different alert for each of several sensors.
- Use a potentiometer to set the pitch of the tone.
- Make a small piano with a row of push buttons.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real Passive Buzzer
- Check which kind you have: a green board underneath means passive; DC on it gives only a click.
- Protect the pin: a magnetic buzzer needs a resistor or a transistor; a piezo disc can go straight on the pin.
- Play near its resonance: the datasheet frequency is where it is loudest.
- Give a piezo a cavity: glued over a hole or into a box, it gets much louder.
- One tone at a time: an UNO's
tone()plays on one pin at a time.
Troubleshooting
- It only clicks: it gets DC. Use
tone(pin, hz). - It is quiet: the tone is far from its resonance, or the drive is low. Check the curve on the pop-up.
- No sound on the PC: the volume is 0, Mute is on, or the PC has no sound device. The simulation runs the same.
- A warning about the pin current: the buzzer's coil is on a pin with too small a resistor.
- The part is not simulated:
TEPPASSIVE.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The coil's inductance is left out: the buzzer is its 47 ohm resistance.
- The PC plays a clean buzzy tone, not the exact sound of each part.
- The effect of a cavity or a box on the piezo is not included.
- Arduino is a name of Arduino; this library is not made or endorsed by Arduino or Labcenter.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the Passive Buzzer Library for Proteus. I hope it helps you give your projects a voice, from a single chirp to a whole tune, and hear it before you build it. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!