DFPlayer Mini failing to play/detect music

I'm using an arduino uno with a DFPlayer to play music. And apparently, it's able to initialize, but no music can be played. Dfplayer.readFileCounts() return 0, Dfplayer.play() does not play anything. All i can hear from the speaker, is a very quiet buzzing noise.

This is the schematics. I've did my best to replicate what my circuit is like. The arduino is powered using USB.


And this is the code. It's a test sketch i've made to test if the DFPlayer Mini is working or not:

#include "DFRobotDFPlayerMini.h"
#include <SoftwareSerial.h>

SoftwareSerial softSerial(/*rx =*/7, /*tx =*/6);
DFRobotDFPlayerMini myDFPlayer;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  softSerial.begin(9600);
  Serial.println();
  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  delay(2000);
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));
  if (!myDFPlayer.begin(softSerial)) {  //Use serial to communicate with mp3.
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
  }else{
    Serial.println(F("DFPlayer Mini online."));
    delay(1000);
    Serial.println(myDFPlayer.readFileCounts());
    Serial.println("Playing music.");
    myDFPlayer.volume(25);  //Set volume value. From 0 to 30
    myDFPlayer.play(4);  //Play the first mp3
  }
}

void loop() {
  // put your main code here, to run repeatedly:

}

I would appreciate if anybody have a solution to this.

Note: If a "buzzing" noise occurs when using the DFPlayer Mini, it is recommended to connect a 1KΩ resistor in series between the Rx pin of the DFPlayer Mini and the Tx pin of the controller.

Yes, i did add a 1KΩ resistor between DFPlayer Mini RX and Arduino TX

How do you know play(4) is the first mp3 on the card? Also what size card are you using as there is a limit. It can not exceed 32gb.

My bad, i forgot to update the code after changing the contents of the card. Anyways, I'm using an 8GB card. Even after changing to play(1), no music is played. The same quiet buzz is heard.

Did you try the two IO pins on the DF module? Check the datasheet if you don’t know which ones they are.

Oh, the IO/ADKEY test? OK, i'll try it.

Result: Got quiet static pulses, no music.

Conclusion: The music files are probably incompatible in some ways. I'll try and figure out why and how to fix it

I usually go with .WAV files but lately I switched to .MP3 . Just make sure you have a folder in the root directory called MP3 and in it are your .mp3 files. Also make sure they are structured like 0000.mp3, 0001.mp3 … etc.

I think there is also a specific function you need to call that tells it to read from that MP3 folder instead of the root folder. I don’t have the library in front of me but I am sure you can find it.

So, the music file in question, is originally a CAF file. Heavily unsupported, requires conversion. So, i used ffmpeg (on mac) to convert the files. And that's where we are now. After a back and forth with ChatGPT, we've decided on converting the files to WAV or whatever other commands that ChatGPT gave me. I'll ping back once i have the results

Well, after converting to WAV, it worked. The ADKEY test has been passed. Now, i'm gonna gear the DFPlayer Mini with Serial and further see if it actually fully works or not

Well, the WAV operation was a success. Now, readFileCounts() return 2, playback was successful. Overall, problems solved :)

Although i know your work may not have worked, i appreciated your choices and suggestions

I know you had a success. But was wondering/suggesting that the DFPlayer mini pin out shows two GND pins. From you posts and most projects I see elsewhere only one GND is hooked up.

I experienced with a breadboard and only DFPlayermini with two switches. I required both pins to be grounded for consistent/expected function.

I'd be curious to know why/when to use one or the other, both, or if it even matter as long as at least one is. Not trying to hijack your thread, but wondered if this may factor into your issue at all?

My plans to incorporate a MCU haven't happened yet. But planning to tinker that soon

Circuit boards generally have a ground plane (one big surface), and the other vias and runs of the circuit are etched away from that ground plane. GND is GND. @unteddybear - I would examine your breadboard.

Connecting 2 ground pins are optional, as there is an internal ground plane that both of those ground pins are connected to. So, you can either go with 1 ground pin or 2 if you want.

But people actually recommend connecting both pins to ground to ensure stability. so @unteddybear, yes, connecting both pins are better