Go Down

Topic: MP3-TF-16P aka DFPlayer Mini .. another cheap sound module (Read 10053 times) previous topic - next topic


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.
Code: [Select]
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:
       //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) {
      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



Aug 24, 2014, 01:19 am Last Edit: Aug 24, 2014, 01:53 am by onesky Reason: 1
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.



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 

In pursuit of top quality and professional services.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131