I know this has been discussed and solved numerous times, but those solutions that I have come across here don't seem to apply.
I have a very simple setup using an old Pro Mini and a DFPlayer Mini. I am running the audio through a PAM8403 amp to boost the volume. I do hear the audio track, but it is being drowned out by a constant rhythmic popping. I did several perfectly fine audio setups in my past, but those were all pre-covid and I fear my brain is fossilizing and I am overlooking something obvious. My code is simple and my circuit is simple and I cannot figure out what I have overlooked. Any help would be a blessing.
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
static const uint8_t PIN_MP3_TX = 2; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 3; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);
DFRobotDFPlayerMini player;
void setup() {
// Init USB serial port
Serial.begin(9600);
// Init DFPlayer Mini serial port
softwareSerial.begin(9600);
// Start comm to DFPlayer Mini
if (player.begin(softwareSerial)) {
Serial.println("OK");
delay(500);
// Set volume to max
player.volume(30);
delay(500);
player.play(5);
} else {
Serial.println("DFPlayer connect fail");
}
}
void loop() {
}
The circuit looks like this:

And make sure the supply can deliver the current needed for the PAM.
With a 3 Ohm speaker that could be peaks of 1.5Amp.
Try a larger cap (1000-2200uF) and see if the popping changes.
Make sure you're not using a piezo tweeter with the speaker setup.
A piezo is a short circuit for an inductor-less class-D PAM design.
Leo..
I pulled apart the speaker and did, indeed, find a piezo tweeter within. I took that out. No joy. (Although now, with the speaker removed and sitting on the workbench, the popping is quite visible!) Waiting on an order for larger caps. My power supply is rated at 1.5A, so maybe I could look into a slightly beefier one. Still trying to get to the bottom of this.
Good point! Yes, I do need to change this. I wasn't too concerned with this being a proto board test setup but it's still good practice and will keep me from making that mistake when this is done and needs to be moved to a permanent board.