3 days i'm working with this DFPlayer and... humm.. my brain will explode ;/
very strange behavior.
- It's a pain to use this module with RX/TX from arduino (Hardware Serial).
You
MUST unplug RX/TX for upload to Arduino. It's very very boring but i know this problem (as serial bluetooth module and others serial devices).
So, use le news library and/or use Software Serial is recommended.
The problems identified :
- Time to boot is random, i don't know why sometime it take 1s, some time 20s...
- Easy to crash if you send commands too quick or....random crash/random start...
- Sound at 100% (30/30) is nice but sound at 35% (10/30) or others is crackle. (must use 100% volume or sound isn't perfect).
- I read everything I could find on the DFPlayer but the information is contradictory.
- 0-2999 files (really 0 ??

- 100 folders of 255 files (100 * 255 = 25500).
- folder names 001, 002, 003, but news library use folder "mp3"
- 1st library i found is very very incomplete. 2nd is incomplete too.
-
Use external Power to try DFPlayer, don't works with 5v supplied by Arduino. The sound cuts.
- If you power down the DFPlayer, do it 5 seconds mini.
- TTL is 3.3v so
USE 1kOms between (Arduinot TX) and (DFPlayer RX) (i will try level shifter) cd4050
- USE 5V (external power supply, i use 5v 2a) to power DFPlayer. 3.3V powered doesn't works.
+ All samples i try are playing by DFPlayer (22khz, 44khz, wav, mp3).
+ samples names are not only xxxx.mp3 (copy/paste mp3/wav on SDcard and play. (sample are called 1, 2, 3, ... by DFPlayer).
+2Gb and 8Gb mSD card work.
I don't use any DFPlayer library for playing samples with DFPlayer.
I use only "SoftwareSerial"
Just to try DFPlayer if it works :
- Format mSD (FAT or FAT32).
- put wav file on mSD.
- name it : 01.wav.
USE THIS CODE :
// **************************************************
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
uint8_t play1[10] = { 0X7E, 0xFF, 0x06, 0X03, 00, 00, 0x01, 0xFE, 0xF7, 0XEF};
void setup()
{
mySerial.begin(9600);
delay(1000);
}
void loop()
{
for (int i=0; i<10; i++) { mySerial.write( play1
); }
delay(2000);
}
// **************************************************
I put screen capture, see the forum doesn't print my sketch correctly.

This module isn't perfect bu it works.
I don't know if i can use it for my project, i want a playeur module, fast ans without bugs.
I have a question for you: Is it a requirement that the files are named like 1.mp, 2.mp3, 3.mp3 etc? Or can you also use names like songa.mp3, songb.mp3 etc.
Name as you want and create folders but :
I don't know/understand how it works
I try it again and again.. next post...
Edit :I create "reset" fonction and i do this at boot time.
- mySerial.begin(9600);
- delay(400);
- rst();
- delay(400);
- vol(30);
- delay(400);
And it boot fast, no bug... (for this time...).
I think i can reduce wait time between serial commands.
Edit:it appears that with .mp3 instead of .wav, the "clap ! sound" at start playing isn't as high.
Bur for looping sample, i think it can be a problem.
Now i will try it folders can be used.