Speaker Rhythmic popping noise

I have built a sound board for a game table I’m working on using a Arduino nano and a DFplayer mini.

When Testing on the breadboard everything worked great. BUT when I completed the build and wired it up, the Speakers now have this very loud rhythmic popping noise.

It starts about 1 min after I power it up, starts as a quick pop, then at almost exactly one second intervals for about 10-15 seconds and then increases to once every half second, and stays like that.

All sounds play fine (popping continues thru the play of the track)
And All other functions in the project work perfectly. the only difference is the popping noise.

I thought it was electrical interference so I have separated the wires from all others same results, I’ve also tried adding a resistor to both the RX and TX pins, and even changing speakers. And the popping remains the same.

The only real difference from bread board to prototype is some of the lengths of the cables.

Does anyone have any ideas as to what may be causing this popping noise?

I’ve included a quick sketch up as to how I have it wired.

Thank you

Check your grounds. Try a different power supply, a bit bigger if possible. Try lowering the volume. It may be caused by your code. See if you are turning on or off something at approximately this interval. It probably will be an inductive load but not guaranteed. You can try disconnecting one speaker at a time.

gilshultz:
Check your grounds. Try a different power supply, a bit bigger if possible. Try lowering the volume.
It may be caused by your code. See if you are turning on or off something at approximately this interval. It probably will be an inductive load but not guaranteed. You can try disconnecting one speaker at a time.

I’m using a pc power supply to power the project, I am powering the Dfplayer mini and Nano off of the same 5v lead.

I disconnected one speaker at a time and I seamed to stop for a bit, but then started up. I had one speaker working or at least I thought i did where the one speaker was fine, and then when I plugged in the other it would start, I then moved the connections and it is happening on both connections. using only one speaker channel does not seam to work.

I don’t think its the sketch as it was not happening before I switched to the prototype board. Even when i used the pc power supply to power the project in place while it was still on the bread board.

Here is the sketch tho:

const int buttonPin2 = 4; // Home IR
const int buttonPin3 = 2; // Away IR
const int buttonPin4 = 3; // End Game Horn from Scoreboard
const int ledPin1 = 8; // Home Led
const int ledPin2 = 12; // Away Led
const int ledPin3 = 5; // Horn status “End Game LED 1”
const int ledPin4 = 6; // Horn status “End Game LED 2”
int buttonState2 = 0; // variable for reading the pushbutton status
int buttonState3 = 0; // variable for reading the pushbutton status
int buttonState4 = 0; // variable for reading the pushbutton status

#include <SoftwareSerial.h>
#include <DFMiniMp3.h>

// implement a notification class,
// its member methods will get called
//
class Mp3Notify
{
public:
static void PrintlnSourceAction(DfMp3_PlaySources source, const char* action)
{
if (source & DfMp3_PlaySources_Sd)
{
Serial.print("SD Card, ");
}
if (source & DfMp3_PlaySources_Usb)
{
Serial.print("USB Disk, ");
}
if (source & DfMp3_PlaySources_Flash)
{
Serial.print("Flash, ");
}
Serial.println(action);
}
static void OnError(uint16_t errorCode)
{
// see DfMp3_Error for code meaning
Serial.println();
Serial.print("Com Error ");
Serial.println(errorCode);
}
static void OnPlayFinished(DfMp3_PlaySources source, uint16_t track)
{
Serial.print(“Play finished for #”);
Serial.println(track);
}
static void OnPlaySourceOnline(DfMp3_PlaySources source)
{
PrintlnSourceAction(source, “online”);
}
static void OnPlaySourceInserted(DfMp3_PlaySources source)
{
PrintlnSourceAction(source, “inserted”);
}
static void OnPlaySourceRemoved(DfMp3_PlaySources source)
{
PrintlnSourceAction(source, “removed”);
}
};

// instance a DFMiniMp3 object,
// defined with the above notification class and the hardware serial class
//
//DFMiniMp3<HardwareSerial, Mp3Notify> mp3(Serial1);

// Some arduino boards only have one hardware serial port, so a software serial port is needed instead.
// comment out the above definition and uncomment these lines
SoftwareSerial secondarySerial(10, 11); // RX, TX
DFMiniMp3<SoftwareSerial, Mp3Notify> mp3(secondarySerial);

void setup()
{

// initialize the LED pin as an output:
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin2, INPUT_PULLUP);
pinMode(buttonPin3, INPUT_PULLUP);
pinMode(buttonPin4, INPUT);

Serial.begin(9600);

Serial.println(“initializing…”);

mp3.begin();

uint16_t volume = mp3.getVolume();
Serial.print("volume ");
Serial.println(volume);
mp3.setVolume(30);

uint16_t count = mp3.getTotalTrackCount(DfMp3_PlaySource_Sd);
Serial.print("files ");
Serial.println(count);

Serial.println(“starting…”);

//play startup track
Serial.println(“track 3”);
mp3.playMp3FolderTrack(3); // sd:/mp3/0003.mp3
delay(5000);

}

void waitMilliseconds(uint16_t msWait)
{
uint32_t start = millis();

while ((millis() - start) < msWait)
{
// calling mp3.loop() periodically allows for notifications
// to be handled without interrupts
mp3.loop();
delay(1);

}
}

void loop()
{

//read the pushbutton value into a variable
int sensorVal = digitalRead(2);
//print out the value of the pushbutton
Serial.println(sensorVal);

// read the state of the pushbutton value:
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);
buttonState4 = digitalRead(buttonPin4);

// HOME check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState2 == LOW) {
//turn LED on:
digitalWrite(ledPin1, HIGH);
// play track 1:
Serial.println(“track 1”);
mp3.playMp3FolderTrack(1); // sd:/mp3/0001.mp3
delay(9000);
} else {
// turn LED off:
digitalWrite(ledPin1, LOW);
}

// AWAY check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState3 == LOW) {
// turn LED on:
digitalWrite(ledPin2, HIGH);
// play track 2:
Serial.println(“track 2”);
mp3.playMp3FolderTrack(2); // sd:/mp3/0002.mp3
delay(9000);
} else {
// turn LED off:
digitalWrite(ledPin2, LOW);
}

// End Game horn via. Scoreboard clock.
if (buttonState4 == HIGH) {
// turn LED on:
digitalWrite(ledPin3, HIGH);
digitalWrite(ledPin4, HIGH);
// play track 2:
Serial.println(“track 4”);
mp3.playMp3FolderTrack(4); // sd:/mp3/0004.mp3
delay(9000);
} else {
// turn LED off:
digitalWrite(ledPin3, LOW);
digitalWrite(ledPin4, LOW);
}
}

Your DFPlayer module VCC is powered from VIN. That is highly suspicious. What is the voltage on VIN? What is the DFplayer supply voltage specification? |500x375 I now see that you also have some kind of IR device running on VIN. What about that?

aarg: Your DFPlayer module VCC is powered from VIN. That is highly suspicious. What is the voltage on VIN? What is the DFplayer supply voltage specification? |500x375

I have the power from the Pc power supply powering both the Nano via the VIN, and the Dfplayer mini via the VCC pin. both being powered off of the same 5v line.

Dfplayer mini Data sheet says 3.2 to 5v Dc. also says "type: Dc4.2v" (not sure what that means)

The IR device is just 2 IR break beam sensors both being powered Via 5v, and acting as switches to play the individual tracks on the DFplayer mini.

BubbleHockey: Dfplayer mini Data sheet says 3.2 to 5v Dc. also says "type: Dc4.2v" (not sure what that means)

They mean "typical".

Your player is probably simply thermally cutting out due to over heating, its a tiny stereo class D amp without any heatsinking.

Alternatively it might be the issue identified in this thread https://arduino.stackexchange.com/questions/49807/dfplayer-noise-researched-tried-and-bep-bep-bep-bep-bep although that doesn't explain it working on the breadboard.

MarkT: They mean "typical".

Your player is probably simply thermally cutting out due to over heating, its a tiny stereo class D amp without any heatsinking.

Alternatively it might be the issue identified in this thread https://arduino.stackexchange.com/questions/49807/dfplayer-noise-researched-tried-and-bep-bep-bep-bep-bep although that doesn't explain it working on the breadboard.

The Dfplayer Mini does get a bit warm. Would Using a voltage regulator and nocking the supply to the Dfplayer mini to 3 or 4v help?

When the Tracks play you can hear the track fine despite the clicking or popping noise, with no pause or break in sound.

The sound Im hearing in the linked thread however is NOT what I'm hearing. its very much a timed Pop or click. once every 1/2 a second.

This regular popping noise is known as “ motor boating “, a few causes but mainly due to power supply problems. In particular lack of current capacity and lack of adequate decoupling. You might have to use a 1000uF capacitor across the supply.

MarkT: Your player is probably simply thermally cutting out due to over heating, its a tiny stereo class D amp without any heatsinking.

[/url] although that doesn't explain it working on the breadboard.

UPDATE

I did some looking into the "motor boating" (BTW that needs a new name, for the sake of a google search) and tho some of the examples DID sound a bit like what I was experiencing the sound was a bit off, and some of the fixes/explanations did not match what I was seeing from the Power supply.

In the end, it lined up with the increase in temp on the DFplayer mini. And MarkT's suggestion seams to be the correct one. I put a voltage regulator on the DVplayer mini and limited to 3.5v and I have not had the noise. I need to do more extensive testing on extended play, but that seams to have solved the problem.

Thank you everyone for your help!

Hi, Have you moved the 5V supply from the Vin to +5V pin? If you are using a PC supply, have you got a fuse in the +5V to your project? PC supplies can output 10A or higher, if you have short on the +5V to gnd, this will vapourise wires and components.

How have you got all your gnds connected? Daisy chained or star config? It is best with audio to have ALL gnd connections converge on one point, rather than join them together in a chain.

Tom.... :)