Hello friends, I hope you all are doing great. Today, I am going to share the new PAM8403 Audio Amplifier Library for Proteus Simulation. The PAM8403 is the little stereo amplifier behind countless DIY speakers, toys and gadgets: two channels of 3 W each from a 5 V supply, a class-D design that stays cool, and on the most common board a volume knob right next to the chip. You feed it a line-level signal, connect two small speakers, and it plays. With this library you can run a full Proteus simulation of a PAM8403 board: the AC-coupled inputs, the volume knob, the 24 dB gain, both bridge-tied outputs and the sound.

Figure: The PAM8403 simulation running: the UNO plays C5, E5, G5 and C6 on the left and the right channel in turn.
Updates

PAM8403 Audio Amplifier Library for Proteus

Latest version: V1.0 (November 2026, this tutorial)

Other audio parts: MAX98357A I2S Amplifier · INMP441 I2S Microphone · Mini Speaker

Helping Tools

The demo plays notes from an Arduino, one on the left speaker and the next on the right, so you can watch both channels and the way a pin's square wave becomes a speaker signal.

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 sound board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the PAM8403 Audio Amplifier Library for Proteus Simulation:

Figure: The PAM8403 Audio Amplifier Library for Proteus Simulation.

What Is the PAM8403 Audio Amplifier?

The PAM8403 is a stereo class-D audio amplifier in a 16-pin package. It needs only 2.5 - 5.5 V and delivers up to 3 W per channel into 4 ohm speakers at 5 V. Like other filterless class-D amplifiers, it switches its outputs at a high frequency and lets the speaker's own inductance smooth the sound, so a board needs very few parts. The popular module adds input capacitors, a dual volume potentiometer with a knob and an on-off switch, and pads for the input, the supply and the two speakers.

The PAM8403 at a glance
PAM8403 audio amplifier board
Channels2 (stereo), class D, bridge-tied
Power3 W into 4 ohm per channel at 5 V
Gain24 dB, then the volume knob
InputsL, R and G - line level, AC coupled
Supply2.5 - 5.5 V
Usessmall speakers, toys, alarms, USB speakers

Line Level In

The PAM8403 is made for line-level audio - the signal from a phone's headphone socket, a DAC or a sound module, a few hundred millivolts. With 24 dB of gain, about 0.2 V RMS at the input is enough for the full 3 W at the output. That is the first thing to know when an Arduino is the source: a pin swings 5 V, about 25 times too much. A simple divider of 22 kohm and 1 kohm brings it down to a fifth of a volt peak to peak.

AC Coupling

A pin's square wave sits between 0 and 5 V - it has a large DC part. The board's 0.47 uF capacitors in series with the inputs block it: together with the chip's input resistance of about 20 kohm they form a high-pass filter at 17 Hz. Everything above passes, the DC does not, and the signal reaching the chip is centred on zero. A side effect shows on a square wave: over each half cycle the capacitor charges a little, and the flat tops tilt.

The Volume Knob

The knob turns a dual potentiometer between the inputs and the chip, so it sets how much of the input reaches the amplifier - the gain itself stays 24 dB. Audio potentiometers have a logarithmic taper, because our ears hear loudness logarithmically; in the library the knob passes (VOLUME / 100) squared of the input, so 70 % passes 0.49 and 50 % passes 0.25. The knob's mark on the sheet turns to show the setting.

Bridge-Tied Outputs

Each channel drives both ends of its speaker: L+ and L- move in opposite directions, so the speaker sees twice the swing a single output could give from 5 V. That is how a 5 V chip reaches 3 W. It also means that neither speaker wire is ground: never connect L- or R- to the circuit's ground, and never join the two channels' minus wires as some stereo cables do. The library models each output by its average - L+ at its duty cycle times the supply, L- opposite - so the speaker gets the audio and the supply delivers the current.

The Amplifier in the Simulation

The model works on the circuit's own voltages. Each input is a 20 kohm load against G, followed by the coupling capacitor computed as a high-pass filter at every step. The volume knob scales the filtered signal, the 24 dB gain multiplies it, and the result is clipped at the supply before it reaches the bridge. For each channel the model measures the input after the capacitor, the tone - from the input's upward zero crossings - the speaker voltage and the real power into the speaker, and from them the speaker's resistance. The louder channel's tone plays on the PC's speaker at the loudness of its power.

Why not our Mini Speaker Library for Proteus as the load? That speaker model listens to a pin driving it directly - a square wave from 0 to 5 V. A bridge-tied output swings both ways around zero, and the speaker model would hear each half cycle as a separate beat. So the demo uses an 8 ohm, 5 W power resistor as each speaker's load, and the amplifier plays the sound itself.

Features of the PAM8403 Audio Amplifier Library for Proteus Simulation

  • A real-looking board: the 21 x 18 mm module at its real size, the PAM8403, the capacitors and the blue volume potentiometer whose knob turns with the setting.
  • Real inputs: 20 kohm against G, the 0.47 uF coupling and its 17 Hz high-pass, the volume knob's audio taper.
  • Two bridge-tied outputs: 24 dB of gain, clipping at the supply, the current from the supply.
  • Sound: each channel's tone, voltage and power, and the louder tone on your PC's speaker.
  • A pop-up: both speaker voltages on a scope, the inputs and the settings, eight tiles - graphs, an event log and a check page.
  • A complete package: about 1.9 MB with the library, our resistors and power resistors, our Arduino UNO V4.0 and the demo, without the source code of the model.

The PAM8403 in Proteus

The device is PAM8403AMPTEP in TEPPAM8403.LIB, under Modules > Audio, with the prefix U and the model TEPPAM8403.DLL. Search PAM8403 or amplifier in Pick Devices. On the left are L, G, R, + and -; on the right L+, L-, R- and R+. One property: VOLUME, the knob in percent.

Figure: The PAM8403 audio amplifier.

Download PAM8403 Audio Amplifier Library for Proteus Simulation

Click the button below to download PAM8403-Audio-Amplifier-Library-for-Proteus-v1.0.zip (about 1.9 MB, without the source code of the models):

PAM8403 Audio Amplifier Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPPAM8403.LIB, TEPPOWERRES.LIB, TEPRESISTOR.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPPAM8403.DLL, TEPPOWERRES.DLL, TEPRESISTOR.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch (tone(), no library).
  • 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 PAM8403 Audio Amplifier Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPPAM8403.IDX from the LIBRARY folder if it is there.
  5. Start Proteus, press P and search for PAM8403.

Proteus Simulation of a Stereo Amplifier

The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0, four resistors as two dividers - 22 kohm and 1 kohm from D9 to the left input, the same from D10 to the right - the PAM8403 U1 with its knob at 70 %, and two 8 ohm power resistors as the speakers. G and - go to ground, + to VCC. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open PAM8403-Stereo-Notes-ArduinoUnoV4.pdsprj.

Figure: The whole simulation on an A4 sheet.

The Sketch

The sketch needs no library: tone() makes a square wave on one pin at a time, so the notes take turns:

  tone(pin, HZ[i]);
  delay(400);
  noTone(pin);

The loop sends the even notes to the left pin and the odd ones to the right:

  for (byte i = 0; i < 4; i++) note(i % 2 ? PIN_RIGHT : PIN_LEFT, i);   // C5 left, E5 right, G5 left, C6 right

Everything else - the level, the DC, the gain - happens in the dividers and on the board.

PAM8403 Simulation Results

Open the project and press Run. The demo runs 2.4 simulated seconds and took about two minutes on our PC with the pop-up open and the pictures being taken. Click the amplifier for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

Left

The board starts on 5.00 V and the volume knob sits at 70 %, which with the audio taper lets 0.49 of the input through. The Arduino prints its title and plays the first note on the left: tone() makes a 523 Hz square wave on D9, the divider cuts it to about 0.22 V peak to peak, and the board's coupling capacitor centres it on zero - 0.103 V RMS at the chip's left input.

With 24 dB of gain and the knob's 0.49, the left output carries a 523 Hz square wave of 0.76 V RMS, and the 8 ohm load takes 0.072 W. The right channel is silent: nothing on its input, zero volts across its speaker. The PC plays the note as the left speaker would.

Figure: C5 on the left.

Right

Then the right channel takes over: E5, 661 Hz, from D10 through its own divider - the same 0.103 V RMS at the input, the same 0.76 V RMS and 0.072 W at the speaker, while the left falls silent. On the scope the square wave has a slight slope on each flat part: the coupling capacitor and the input resistance form a high-pass filter at 17 Hz, and over each half cycle the capacitor charges a little. A real board shows exactly this tilt on an oscilloscope.

Figure: E5 on the right.
Figure: The dividers, the board and the loads.
Figure: The simulation in the workspace.

The Rest of the Notes

G5 follows on the left at 786 Hz and C6 on the right at 1050 Hz, each at 0.76 V RMS and 0.072 W. The tones the amplifier measures - 523, 661, 786 and 1050 Hz - are the Arduino's tone() frequencies, which come from dividing its clock, so they sit within a hertz or so of the musical notes. During the silence both channels read zero.

Figure: C6 on the right.

The Graphs, the Event Log and the Check Page

The Graphs page plots both speaker voltages and both inputs: the notes alternate between the channels. The Event log records the settings at the start. The Check page sums up the run: the supply at 5.00 V, each channel's input at 0.103 V RMS with its tone, 0.76 V RMS and 0.072 W into an 8.0 ohm load when it plays, no clipped sample, and the volume at 70 %.

Figure: The Graphs page.
Figure: The Event log.
Figure: The Check page.

The Arduino's monitor shows which side each note goes to.

Figure: The Arduino's monitor.

Analog or Digital Audio?

The PAM8403 takes analog audio; our MAX98357A I2S Amplifier Library for Proteus takes digital audio over I2S. With an analog amplifier the sound quality depends on the source - a DAC, a filtered PWM or, as here, a square wave from a pin - and the wiring can pick up noise. A digital amplifier receives the samples themselves and converts them on the chip, so the signal stays clean up to the speaker, but it needs a board that can produce I2S. For a beeper or a toy, a pin and a PAM8403 are the simplest path; for clean music from an ESP32, an I2S amplifier is the better choice.

Try It Yourself

  • Turn VOLUME down to 35 %: the speaker voltage falls to a quarter and the power to a sixteenth.
  • Replace a 1 kohm resistor with 4.7 kohm and turn VOLUME to 100 %: the louder input drives the output into clipping.
  • Remove a coupling path by feeding a DC level: the output stays at zero - the capacitor blocks it.
  • Play both channels at once with a second tone() library and watch the scope show two traces.
  • Add an RC low-pass filter after the divider and turn the square wave into something closer to a sine.

Ideas to Extend the Demo

  • A doorbell with a melody on both speakers.
  • A stereo alarm: a different tone on each side for different events.
  • A small music player with a DFPlayer-style module feeding the inputs.

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 PAM8403

  • Outputs: never ground L- or R-, and never join the channels' outputs - they are bridge-tied.
  • Level: line level in; divide a pin's 5 V down before it reaches the input.
  • Supply: two 4 ohm speakers at full power need over 1.5 A at 5 V.
  • Noise: keep the input wires short, share one ground point, and keep the speaker wires away from the inputs.
  • Heat: class D runs cool; the board needs no heatsink at its rated power.

Troubleshooting

  • Silence: no input, the volume at zero, or no supply on + / -.
  • Distortion: the input is too large - lower the level or the volume.
  • One channel only: the other input or its divider is not connected.
  • Hum or buzz on a real board: ground loops - one common ground, short input wires.
  • The part is not simulated: TEPPAM8403.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The inputs, the coupling capacitors, the volume knob, the gain, the bridge-tied outputs and clipping follow the PAM8403 datasheet and the board's circuit; the board is our own drawing.
  • Our own choices: the audio taper (VOLUME / 100) squared, 20 kohm per input, 0.25 ohm a side, the outputs averaged without the switching ripple.
  • Not modelled: the chip's shutdown and mute pins (not on this board), the switching noise, the thermal and short-circuit protection.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the chip's maker.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the PAM8403 Audio Amplifier Library for Proteus Simulation. I hope it helps you get the levels, the coupling and the speaker wiring right before the first real board makes its first sound. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!