Arduino Speaker set-up creating constant popping noise

Hello, I am trying to make a lightsaber (focusing on internals atm) but I am running into trouble with the sound part. I am using a sparkfun pro micro 5mhz to drive a PAM8302A amp, using a lowpass filter for sound quality. At low volumes, the speaker works great, but as I turn it up the popping noise starts.

The filters is made up of a 1kohm resistor to a .68uF capacitor(goes to ground) to a 120ohm resistor and then the amp, which drives a 3W, 4ohm speaker.

Also, should I add a high pass filter as well?

Popping is almost certainly caused by a lack of power supply decoupling. Put a 1000uF capacitor across power and ground of your amplifier.

80mw88:
I am using a sparkfun pro micro 5mhz

That's rather slow isn't it? :slight_smile:

Learn those prefixes and symbols! Case is always sensitive for physical units and prefixes(*). And you
meant 8 or 16 not 5 anyway I presume, perhaps 16MHz, 5V ??

You didn't mention what your power source was either...

(*) massive confusion can result from confusing micro, milli and mega.

MarkT:
That's rather slow isn't it? :slight_smile:

Learn those prefixes and symbols! Case is always sensitive for physical units and prefixes(*). And you
meant 8 or 16 not 5 anyway I presume, perhaps 16MHz, 5V ??

You didn't mention what your power source was either...

(*) massive confusion can result from confusing micro, milli and mega.

Oh crap, Yeah I messed up there, its a 5V, 16 MHz, and the power source is a 18650 cell the is regulated to 5V, but at the moment I'm testing by using the power through the USB port. Also, when I get home I'll try the capacitor across the power lines.

Ok after connecting the cap, the popping noise lessens by a good margin but is still present.

Try a bigger capacitor or try an additional capacitor and join it to the first with a 10 ohm resistor. In a Py circuit. So the power is fed into the amplifier through a 10 ohm resistor and there is a capacitor to ground on each end of the resistor.

Also is this a stereo amplifier? If so have you connected the input to the unused side to ground.

It might be that you are actually clipping the waveform on the output, the only cure for this is more supply voltage and/or current and perhaps a different amp chip.