I use a PAM8403 class-D amplifier module (~ 2$ on ebay), which is very good, and stereo.

The output volume is too loud. If I lower the amp's input volume (via software), then obvisouly the output volume is lowered, but there's a noise buzz. That's why I would like to lower the output volume rather than the input volume.

I noticed randomly that putting a 10k resistor in series between OUT+ and loudspeaker's input makes the volume lower.

It works, I am quite happy with that. But:

1) Is it a good practice? Why does it work?

2) This 10k resistor seems (by ear) to make something like -20dB volume reduction.
Is there a formula to find R for -10dB reduction?

Here is how it looks like:


simulate this circuit – Schematic created using CircuitLab

PS: I don't know my earphones's impedance but I can say it's standard earphones shipped with my Samsung phone.

  • \$\begingroup\$ PS: 1k resistor instead of 10k seems correct (closer to 10dB volume reduction) \$\endgroup\$
    – Basj
    May 13, 2017 at 22:05
  • \$\begingroup\$ PS2: it seems that there is a small distorsion, though, like very small crunch/clipping \$\endgroup\$
    – Basj
    May 13, 2017 at 22:08
  • \$\begingroup\$ Attenuate the input with a voltage divider (2 resistors) or a volume control (pot) rather than software. \$\endgroup\$
    – user16324
    May 13, 2017 at 22:38
  • \$\begingroup\$ Yes, but as there is a constant noise floor on the output of PAM8403 (even if IN+ = IN - = GND), I wanted to diminish the volume of output to make the noise floor diminish as well. What do you think @BrianDrummond ? \$\endgroup\$
    – Basj
    May 13, 2017 at 23:00
  • 1
    \$\begingroup\$ You need a voltage divider (pot). The noise you're getting might be Johnson–Nyquist noise - the "sound" of a signal through the resistor, or it might be a noisy power supply, which would call for bypass caps. \$\endgroup\$
    – tjbtech
    May 13, 2017 at 23:02

1 Answer 1


Cheap class D amplifiers have very poor rejection of power supply noise/ripple. This is fully expected because the output square wave peak IS the power rail so, the trick is to make that power rail as quiet as possible. So, if your output signal is quite small, noise/ripple on the power rails can dominate.

This 10k resistor seems (by ear) to make something like -20dB volume reduction. Is there a formula to find R for -10dB reduction?

A 20 dB volume reduction is about a 4:1 decrease in sound level as perceived by the ear because 10 dB (or 1 bel) is "defined" as the attenuation that halves loudness at 1 kHz. This doesn't hold true for other audio frequencies but it's a good measure.

If your loudness has reduced by 4 then that is an attenuation of 20 dB. If your earphones have an impedance of about 1000 ohm then adding a 10 k resistor will attenuate the signal to 1000/11000 = 0.09 and if you take the log and multiply by 20 you get 20.82 dB.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.