MP3-TF-16P aka DFPlayer Mini .. another cheap sound module

Thanks for sharing all that you have learned about this module. I guess its a case of you get what you pay for. It is a cheap module which is probably good enough for a toy or joke gadget. But not really suitable for an advanced project requiring reliability and predictability.

Today i tried to make folders working, but no luck, no work.
I don't know why, i have understood the DFPlayer protocol and i send the good commands.

  • Equalizers (Normal/Pop/rock/Jazz/Classic/Base/...) Works !
    In the DFPlayer manual, i saw : Only 6 EQ, same in the DFRonbot Wiki.
    But i don't remember where, i saw 10 EQ, i try this and there seems to be 11 equalizers (0-10) NOT SURE.

I always have a small "clap" sound before playing each sample (i tried others .mp3).

I tried 4 speackers, no hardware issue.
I will try level shifter soon for TTL (3.3) TX

Today, i want to try playing files named 001.mp3, 002.mp3, 003.mp3...

  • I put 43 mp3 on SDcard, the 43 numbers of a darts games.

1.2.3.4.5.6.7.8.9.10.
11.12.13.14.15.16.17.18.19.20.
22.24.26.28.30. 32.34.36.38.40.
21.27.33.39.42.45.48.51.54.57.60.
25.50.

Files are namad :
00.1mp3 002.mp3 ... 022.mp3 024.mp3 ...

There's no 023.mp3 ...

If i send a command to DFPlayer to play sample 001 to 022, it play 001.mp3 to 022.mp3 but,
if i ask to play file name 023, it play 024.mp3.

The DFPlayer doesn't care of files names, it play files as they are in folder structure.
You can name the files as you want, it doesn't care.

It's a pain to organize the mp3 on sdcard.

something else,
i always have a "clap" sound at startup playing sample,
It i put volume to 0 (0-30) i always have this "clap".
If your sample start immediately, probably no hear this "clap" but it there is a silent before, a "bad clap" is announcing the sample.

Is anyone know a samples player module, cheap and i2c controlled ?
SPI, no needed.
Serial, humm....
But I2C can be a good solution.

hi
i purchased this muodle and test it times and times but dont work. i dont know whats problem!! :frowning:
please help me

I can't.
Why ?

Tell me more, tell me all.

SD card format, SD card files.
Wires, speaker, arduino, sketch...

i used a sd card that writed on that micro sd TM,2GB without any other thing .similar this attached pic:
format of file is 001.mp3,002.mp3,003mp3,...
sd card forma:fat/fat32
speaker : 0.5 watt,8ohm
i use switch command based on second pic without any other controller.
power supply: 3.3-5.5 v examined
notice ; when the player supplied by 4V and higher voltage blue LED is lights and busy pin is 2.2V to 3v

images.jpg

Is your speaker ok ? try it.

  • What is your 5v power ? How many "mA" . I use a 1A 5V to power the DFP.
  • Try another SDcard.
  • Try .wav files.
    Try this mp3 : "DL.FREE.FR"

I use DFP with arduino only.
Can you try it with arduino ?

tnx downloaded it
i dont have arduino
i try with other speaker and sd micro for next two days and go back again
tnx u again :wink:

first excuse me for bad english :cold_sweat:
i tested module again and again with this micros:
1: 4gb gigastone
2: 2gb taiwan
3: 2gb team
4: erased !
but reaction of module:
1: led off,busy 1, no sound
2: led on,busy 0, no sound
3: led on,busy 0, no sound
4: led on,busy 0, low voice (zzzziiizz)
by these result can i conclude that module is ok or damaged?
notice: i run without controller but tomorrow try it. and module dont react to increasing volume

hi friends
i send to module a cmd for playing those attached files with uart port but dont hear any clear voice
please help me,please

Hum, i don't know why your DFP doesn't work.
Mine work great.

What is your power Supply ?
Have you try to format your mSD with : "HP USB Disk Storage Format Tool" ?
Is you speaker works ?

Im currently working on a project to play random audio tracks when no sound is detected, the random track played when there is no sound MUST start from the beginning. When sound is detected the DFPlayer must stop playing or pause. The DFPlayer is connected to the Arduino via serial connection. Ive spent 3 days playing with the serial code but cant get it to work, the DFPlayer works fine stand alone but not via serial can someone please help. Ive included my code but have removed all the code to send via serial if someone can help its driving me mad.

int soundSensorpin=A4;
int soundReading=0;
int soundThreshold=300;
int relay1pin=9;
int relay2pin=10;

void setup() {
 
    // initialize the button pin as a input:
pinMode(relay1pin, OUTPUT);
pinMode(relay2pin, OUTPUT);
pinMode(soundSensorpin, INPUT);

 // initialize serial communication:
    Serial.begin(9600); 
    
      
       //setup code for player if needed 
       
    
     
}
   
    void loop() {
  static uint32_t ts = millis();
  static uint16_t counter = 0;

  // If the counter > 0 then count down by 1.  If it reaches 0 then switch back to music.
  if (millis() - ts > 0) {
    if (counter > 0) {
      counter--;
      if (counter == 0) {
        
        //code here needs to play random track starting from the beginning of track
      
       
        digitalWrite(relay1pin, LOW); // relay open
        digitalWrite(relay2pin, HIGH); // relay close
      }
    }
  }

  // If there is sound, then switch to speech, and set the counter to 1000.
  soundReading = analogRead(soundSensorpin);
  if (soundReading > soundThreshold) {
    counter = 5000;
   
   //code here needs to stop or pause player
  

    digitalWrite(relay1pin, HIGH); // relay close
    digitalWrite(relay2pin, LOW); // relay open
  }

}

u can find code, library and examples here

the problem of this module is that if you don't use the library above u have to calculate checksum for each serial string..

the serial connection need 100ohm resistor (3.3 volts vs. 5volts arduino) the manual states 1k ohm but i guess it's not correct

everytime after uploaded the code to arduino it needs to unplug the power to works with the new code

many times it doesnt' do what requested in the code

this module is not reliable, i prefer the WT5001M02-28P much more.

Hello, All!

Please tell me how to calculate the checksum?

I need a module from a total of seven control commands:

  1. Play.
    0X7E, 0xFF, 0x06, 0X03, 00, 00, 0x01, 0xFE, 0xF7, 0XEF

  2. Loop.
    0X7E, 0xFF, 0x06, 0X11, 00, 00, 0x01, ?? , ?? , 0XEF

  3. Pause.
    0X7E, 0xFF, 0x06, 0X0E, 00, 00, 0x00, ?? , ?? , 0XEF

  4. Volume level 0.
    0X7E, 0xFF, 0x06, 0X06, 00, 00, 0x00, ?? , ?? , 0XEF

  5. Volume level 10.
    0X7E, 0xFF, 0x06, 0X06, 00, 00, 0x0A, ?? , ?? , 0XEF

  6. Volume level 20.
    0X7E, 0xFF, 0x06, 0X06, 00, 00, 0x14, ?? , ?? , 0XEF

  7. Volume level 30.
    0X7E, 0xFF, 0x06, 0X06, 00, 00, 0x1E, ?? , ?? , 0XEF

I am familiar (thank you, Ironic62) with the format of these commands, but do not know how to calculate the checksum.

Help me, please ...

Thank you.

Denis.

@Denis

It's easy to calculate checksum if you understand hex well. Here is an example below.
FF+06+03+00+00+01=0109 0-0109=FE F7

FN-M16P Embedded MP3 Audio Module Datasheet.pdf (808 KB)

Hi guys,

Following your instructions (I'm greatly indepted to you, especially onesky), I could make my DFPlayer work quite easily. Now I can play .wav files, but what I would need is the Sounds overlapping. The Intercut Advertisement feature of the DFPlayer to stop a track, store the Position in the track, Play another file, then resume the paused file from the stored Position seems to me the perfect solution, but alas I cannot make it work. All the other serial commands I send seem to work with the Github library functions, but not the intercut.

I made a Directory ADVERT on the SD-Card like described in the spec, still no luck :frowning:

Has anyone experience with this particular feature?

Cheers and thanks!

Hi!

I recently bought a few of these and have come to realize that the RX and TX pins are swapped on my particular modules in comparison to the pin map image that's online, just in case anyone is having issues with their dfplayer mini - I hope to save you some time :slight_smile:

I have a problem.

It makes it even when softserial well as HWserial
When connecting RX hear the hum. After disconnecting the RX hum is mute.

Check here

I have had no trouble getting this module to work in random play mode with a Nano using the dfplayer_mini_mp3 library. My current card has two folders on it but the mp3_random command plays files from both folders.

I have a project in mind to provide sound ambience in a garden depending on whether it is day or night. I have no doubt that I could organise the files into two groups and get the software to play the files in each group sequentially depending on the light but (and here's the rub) I want to play the files randomly.

I have taken a look at dfplayerminimp3ad library but it does not have an ad-random command.

I could use the arduino random function in the sketch but I would prefer to use the built-in random of the dfplayer if possible.

Here's how I see it working:

An LDR and pullup resistor using analogRead can do the day/night detecting. Alternatively a shield with an LDR and comparator could be used via digitalRead.

Ideally it would entail putting the day files in one folder and the night files in another.
When the light reduces below the threshhold, the night folder would be randomly played, else the day folder would be randomly played.

My problem is how to tell the dfplayer which folder to use. The dfplayer manual says that up to ten folders can be serially selected but does not go into detail beyond saying user specified.

Can anyone please offer me details on how to select a specific folder and what folder naming conventions (if any) I need to adopt. I am a serial and library noob - please keep it simple.

I use this module. This is the same as dfplayer mini?

bbb.JPG