Troubleshooting

The DFPlayer Pro DFR0768 is buggy. Are there any firmware updates?

userHead Joe.Goldthwaite 2023-12-11 03:17:25 348 Views3 Replies

I've been working on a musical clock that's had an on-going problem. I use the serial connection to start playing a song. I send AT+PLAYFILE=/XXXXXX.mp3\r\n". That normally plays the song. Sometimes instead it just emits a loud pop and goes silent. 

 

I assumed it was a timing issue so I've worked on that but it made no difference.  I wanted to detect when it happens and re-try playing the song but I've discovered that when it does the pop, it thinks it's playing the song I requested. That is sending AT+QUERY=5\r\n returns the song number I told it to play but nothing is coming from the speakers.

 

This problem has cost me a LOT of time and I'm kind of pissed of at DFRobot for sending out a buggy  product. I've tried two different DFPlayer Pro's and had the same issue with both of them. At this point I'm going to have to switch to a different MP3 player because I cannot tell from the device if it's playing correctly or not.

 

Does anyone know if they're doing any bug fixes for this? Is there any source code available so that I can figure it out myself?  

 

Thanks.

2024-06-04 06:15:19

I've been using the DFPlayer for years on many projects, now recently using the DFR0534 (Gravity module) and have found it reliable but because of limited on-board file-space (6mb), am in the process of trying the Pro (DFR0768).

 

BUT I DON'T WANT TO INVEST THE LARGE AMOUNT OF TIME IT TAKES TO ADOPT NEW CODE AND BUILD HW-KITS only to find that this player is buggy.

 

Appreciate your determination in isolating this problem….. it takes a lot of time and effort to shag issues like this.

 

Is this the only problem you've run into?    Does playing a file twice like you did get rid of ensuing issues reliably during this power-on cycle?  And you don't have to wait for the files to play…. just command the 2nd one to pre-empt the first one, and then you also don't have to wait for the 2nd one to finish playing before you start playing application-files?

 

Do you have a relay on the speaker just to avoid the pop at turn-on, or is that somehow part of the problem solution too?

 

THANKS!

 

-Mark

userHeadPic Mark.Rubel
Mark.Rubel wrote:

Sorry…. reread your post and I see you explained the timing of the silent files, quite well…. disregard those questions, leaving just these:

 


Is this the only problem you've run into?    

Does playing a file twice like you did get rid of ensuing issues reliably during this power-on cycle? 

2024-06-04 06:18:47
1 Replies
2023-12-18 09:04:32

Here's the code I ended up using to work around this bug. 

 

In my case, I have a relay that powers up the DFPlayer pro and a separate relay that connects or disconnects the speakers. I found that the player takes around 360 milliseconds to power up and start responding to commands. Since the bug seems to screw up on the first or second song after the initial power up, I send a silent mp3 file two times with a ¾ second delay after each. That's a total 2 second delay required between the power up and being able to play the first real file.

 

void dfplayerPowerUp() {    
   
   // This function turns off the speakers to the dfplayer pro
   speakersOff();

   // This section switches the relay to the dfplayer pro on. This
   // powers the player up.
   debugPrint("Switching the power relay on\n");
   digitalWrite(DFP_ON_PIN, HIGH);
   delay(RELAY_PULSE_MILLISECONDS);
   digitalWrite(DFP_ON_PIN, LOW);

   //Give it 1/2 second to fire up
   debugPrint("Waiting .5 seconds\n");
   delay(500);

   // The MP3 player pro sometimes emits a loud pop the first time it gets
   // the AT+PLAYFILE command after power up. If you query the player it
   // thinks it's playing the song but there's nothing but silents. The
   // second PLAYFILE command seems to work most of the time but sometimes
   // it does the same thing.

   // This code tells it to play a blank or silent MP3 file. It does this
   // twice waiting 3/4 seconds after each. Once all that's done, it turns
   // on the speaker and is ready to play the real song.
   
   // Sent the blank file twice with a one 3/4 second delay.
   for (int i=0; i<2; i++) {
       debugPrint("AT+PLAYFILE=/blank2s.mp3\r\n");
       dfpSerial.printf("AT+PLAYFILE=/blank2s.mp3\r\n");
       delay(750);
   }

   speakersOn();
}
 

 

 

userHeadPic Joe.Goldthwaite