# Can't Use DFPlayer Mini Player Sensor on Arduino Uno

**URL:** <https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667>\
**Category:** General Electronics\
**Created:** [December 8, 2021, 5:12pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667 "2021-12-08T17:12:31Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 8, 2021, 9:27pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/21 "2021-12-08T21:27:28Z")

</div>

Any chance of getting a photo of the front of that DFMini player?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 8, 2021, 9:29pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/22 "2021-12-08T21:29:11Z")

</div>

![WhatsApp Image 2021-12-08 at 11.28.09 PM](https://europe1.discourse-cdn.com/arduino/original/4X/8/7/3/8737738551b3fa8c9b3c9342e90484e8d287c743.jpeg)  
Does this communication means that the Module and arduino are working ?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 8, 2021, 9:30pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/23 "2021-12-08T21:30:03Z")

</div>

I have another Arduino Mega Board ? but in the Website it states that it is 3.3-5V Module  
Here is the Website : [MP3 Mini Player for Arduino or Microcontrollers - RAM Electronics](https://ram-e-shop.com/product/kit-mp3-m87/)

---

<div class="post-metadata">

**Author:** ![anon73444976](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon73444976](https://forum.arduino.cc/u/anon73444976)\
**Post date:** [December 8, 2021, 9:31pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/24 "2021-12-08T21:31:25Z")

</div>

> [@kareemafifi](#):
>
> Does this communication means that the Module and arduino are working ?

If it say it's looping, I guess it is

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 8, 2021, 10:21pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/25 "2021-12-08T22:21:32Z")

</div>

No the Arduino Uno is just fine- its that DFMini Mp3 player where the problem lies- we have to get power to it. Do you happen to have another DFMini module or do you have anyway to put a separate power supply to just the DF Mini? If you happen to have a multimeter can you check the voltage is going to the DFMini player you have from the Arduino Uno?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 8, 2021, 10:52pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/26 "2021-12-08T22:52:40Z")

</div>

Okay , hopefully , i will be able to measure the voltage . I have read somewhere that the Mp3 initial is the blue light off , and when we press play /pause button , the light is turned on . Dont know whether this is true or not . But if true , how can i modify the code for it to play ?  
Although in some youtube videos , the Df player just starts when connected

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 8, 2021, 11:38pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/28 "2021-12-08T23:38:39Z")

</div>

[![](https://europe1.discourse-cdn.com/arduino/original/4X/e/8/6/e86bed2e818bfb62394d330057634143a7d46851.jpeg "20211208 182306") ](https://www.youtube.com/watch?v=m1ihcVmGMxc)

The music begins when the program begins, there is no play button. I have a Red LED, but this DF Mini Mp3 is a knockoff from AliExpress.

(There is an oopsie in the video- the RX/TX lines are one pin off. I was too far forward (pins were actually on 11 and 12). The resistor belongs on Pin #10.)

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 6:03pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/29 "2021-12-09T18:03:20Z")

</div>

Hi ,  
Thank you for your reply , I have switched the RX and TX pins on the Arduino , and the Blue Light Finally starts blinking , but still it is not Solid Blue Light. And there is no sound  
Where do you think is the problem ?  
There is only one time that i had run the code ,and it actually gives solid blue , but after that after i recompile the code and re upload , it just blinks !!!  
Also , The TX Led on the Arduino Board is on for about 20 seconds and then is off .Hope this info helps

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 9, 2021, 8:43pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/30 "2021-12-09T20:43:58Z")

</div>

Ok- This is good! We know we have a working DFMini. So I want you to do 2 steps first to troubleshoot.

1. Disconnect the speaker from the DF Mini and run the program without the speakers attached to the Mini. Does anything change with the LED?

I want you to run that first to see if speakers are drawing too much power. I don't think they are, because:

1. A blinking LED means the SD Card cannot find the file in the SD Card. So go into File Explorer and check that file. Here's an issue I encounter. You only need to name the file 0001, not 0001.mp3 because often the computer will add ANOTHER .mp3 extenstion- making your file name:  
0001.mp3.mp3  
and the SD Card can't find it due to that. So deep dive into that card and make sure that the file name is correct. Also be sure that the sound file is not super short- a file of less than 2-3 seconds will cause problems. You may want to make 0001 a full song to make sure it plays properly.  
Hope that helps!

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 9:14pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/31 "2021-12-09T21:14:40Z")

</div>

Okay , good News . I have changed the Code a little bit from a Video on Youtube and now the Blue Light is a Solid One !!! . But There is Still no Sound .  
I will attach a photo of the files on the SD Card .And will attach the code .  
I have also run a couple of Commands to identify the State of my Player

 ![WhatsApp Image 2021-12-09 at 11.10.56 PM](https://europe1.discourse-cdn.com/arduino/original/4X/2/6/6/2669cffac8fcc422cbde7cade8dca3b502bd9d1f.jpeg)  
Here is the Code

```cpp
#include <SoftwareSerial.h>
#include <DFPlayerMini_Fast.h>

SoftwareSerial mySerial(10, 11); // RX, TX
DFPlayerMini_Fast myMP3;
# define Start_Byte 0x7E
# define Version_Byte 0xFF
# define Command_Length 0x06
# define End_Byte 0xEF
# define Acknowledge 0x00 //Returns info with command 0x41 [0x01: info, 0x00: no info]
void setup()
{
  Serial.begin(9600);
  mySerial.begin(9600);

  myMP3.begin(mySerial);
  
  Serial.println("Setting volume to max");
  myMP3.volume(20);
  delay(20);

  
  Serial.println("Playing track 1 for 5 sec");
 // myMP3.resume();
  //myMP3.playNext();
  playFirst();
   Serial.println("Is it Playing");
  Serial.println(myMP3.isPlaying()); ->1
Serial.print("----------------");
 Serial.println( myMP3.currentVolume()); ->20
Serial.println(myMP3.currentEQ()); ->0
Serial.println(myMP3.currentMode()); ->0
Serial.println(myMP3.currentVersion()); ->5
Serial.println(myMP3.numUsbTracks()); ->0
Serial.println( myMP3.numSdTracks()); ->6
Serial.println(myMP3.numFlashTracks()); ->0 
Serial.println(myMP3.currentUsbTrack()); ->1
Serial.println(myMP3.currentSdTrack()); ->1
Serial.println(myMP3.currentFlashTrack()); ->1

  //delay(1000);
  //myMP3.resume();
  //delay(1000);
  //myMP3.pause();
  
  
  
  /*
 //delay(1000);
  Serial.println("Sleeping for 5 sec");
  myMP3.sleep();
  delay(5000);

  Serial.println("Waking up");
  myMP3.wakeUp();

  Serial.println("Looping track 1");
  myMP3.loop(1);
  */
}
void playFirst()
{
  execute_CMD(0x3F, 0, 0);
  delay(500);
  setVolume(20);
  delay(500);
  execute_CMD(0x11,0,1); 
  delay(500);
}
void setVolume(int volume)
{
  execute_CMD(0x06, 0, volume); // Set the volume (0x00~0x30)
  delay(2000);
}
void execute_CMD(byte CMD, byte Par1, byte Par2)
// Excecute the command and parameters
{
// Calculate the checksum (2 bytes)
word checksum = -(Version_Byte + Command_Length + CMD + Acknowledge + Par1 + Par2);
// Build the command line
byte Command_line[10] = { Start_Byte, Version_Byte, Command_Length, CMD, Acknowledge,
Par1, Par2, highByte(checksum), lowByte(checksum), End_Byte};
//Send the command line to the module
for (byte k=0; k<10; k++)
{
mySerial.write( Command_line[k]);
}
}
void loop()
{
}

```

The Value of the Serial Monitor is next to the Printing Statement  
Also the Songs are 3-4 Minutes each audio File  
Thank you very much

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 9, 2021, 9:30pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/32 "2021-12-09T21:30:27Z")

</div>

So are you saying the DFMini lights up with the file you have posted above- but not with the DFMini example file? Can you rerun the DF Mini Example to see if it works now?  
It looks like you have your files in a folder 01. Can you take them out of that folder and have them just on the card itself? Neither program calls for it in that Folder 01.

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 9:40pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/33 "2021-12-09T21:40:30Z")

</div>

When i try the Code of DF Mini Example , The USB disconnect sound is heared , and the speaker was like buzzing .  
When i try with the latest code stated above , the DF Player Blue Light is On , but there is no sound .  
I have removed the folder mp3 as you have mentioned above (which contained 3 audio files)  
and now the serial monitor prints these :  
Serial.println( myMP3.currentVolume()); -\>20  
Serial.println(myMP3.currentEQ()); -\>0  
Serial.println(myMP3.currentMode()); -\>0  
Serial.println(myMP3.currentVersion()); -\>5  
Serial.println(myMP3.numUsbTracks()); -\>0  
Serial.println( myMP3.numSdTracks()); -\>3  
Serial.println(myMP3.numFlashTracks()); -\>0  
Serial.println(myMP3.currentUsbTrack()); -\>1  
Serial.println(myMP3.currentSdTrack()); -\>1  
Serial.println(myMP3.currentFlashTrack()); -\>1

Where do you think is the problem ?

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 9, 2021, 10:34pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/34 "2021-12-09T22:34:01Z")

</div>

> [@kareemafifi](#):
>
> When i try the Code of DF Mini Example , The USB disconnect sound is heared , and the speaker was like buzzing .

Sorry, I don't understand what this means. What is the "USB Disconnect sound"? and the speaker buzzing. Have you heard any more noise out of the speaker? Can you check the speaker connections?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 10:51pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/35 "2021-12-09T22:51:57Z")

</div>

What i mean is that when i run the code of the library ( The Arduino as if it disconnects from the computer and resets ( ejecting a USB sound is heared )  
Like this sound

[![](https://europe1.discourse-cdn.com/arduino/original/4X/6/0/f/60f5ad226416bac176afb4f0c30cabe5a972fc29.jpeg "Windows 10 USB connected/disconnected sounds effect") ](https://www.youtube.com/watch?v=FWz0Tgntl3E)

There is a cracking sound from the speaker .  
Will also upload a photo of the connection

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/9/1/2918cbe4f47a38e19248a358c80f4d043d41de61.jpeg)

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 9, 2021, 11:10pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/36 "2021-12-09T23:10:32Z")

</div>

![image](https://europe1.discourse-cdn.com/arduino/original/4X/b/1/3/b131403a0c3189642586ae4d3c63bdd92e1f11c8.png)

Quick and dirty trick here- let's see if we get anything. Take a double male Dupont wire and on the right side of the DF Mini ( the one with no wires currently) touch the pins to IO\_2 and GND ( the 6th and 7th DF Mini pins from the top). With either program going, does anything happen? It should trigger the next .mp3 file to play.

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 11:23pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/37 "2021-12-09T23:23:19Z")

</div>

Well , i did as you said , and when i Re opened the Serial Monitor it prints like this  
Serial.println( myMP3.currentVolume()); -\>20  
Serial.println(myMP3.currentEQ()); -\>0  
Serial.println(myMP3.currentMode()); -\>0  
Serial.println(myMP3.currentVersion()); -\>5  
Serial.println(myMP3.numUsbTracks()); -\>-1  
Serial.println( myMP3.numSdTracks()); -\>-1  
Serial.println(myMP3.numFlashTracks()); -\>0  
Serial.println(myMP3.currentUsbTrack()); -\>2  
Serial.println(myMP3.currentSdTrack()); -\>2  
Serial.println(myMP3.currentFlashTrack()); -\>2  
Still There is no sound !  
Do you think the problem is in the speaker or where ?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 9, 2021, 11:46pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/38 "2021-12-09T23:46:17Z")

</div>

So just to understand , does this mean that the player is working correctly as well as the arduino ?

---

<div class="post-metadata">

**Author:** ![kareemafifi](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kareemafifi](https://forum.arduino.cc/u/kareemafifi)\
**Post date:** [December 10, 2021, 9:32am UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/39 "2021-12-10T09:32:52Z")

</div>

I know are almost there , just there is something missing . Really appreciate your work with me in solving the issue  
Do you think i should ground the all pins on the right ?

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 10, 2021, 4:16pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/40 "2021-12-10T16:16:04Z")

</div>

Its got to be something in either the file nomenclature or the speaker. We know the Arduino is communicating with the DF Mini, we know the DF Mini LED is now solid so its on and working, its just not playing the file. We have noise to the speaker when you disconnect, and an 8ohm 0.5w should be well within specs to be played by the DF Mini. My guess now would be blown speaker or speaker wiring. If you can, try to buy a speaker like mine in the video- so easy to just plug in the Dupont wires and go. Keep trying!

---

<div class="post-metadata">

**Author:** ![halloweenrick](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@halloweenrick](https://forum.arduino.cc/u/halloweenrick)\
**Post date:** [December 10, 2021, 4:16pm UTC](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667/41 "2021-12-10T16:16:46Z")

</div>

Whoops forgot to add the pins on the right should have nothing to do with it, don't worry about grounding or messing with those.

Could you try to run the DFMiniFast example again? In the one you've posted above with all the Serial Monitor println- it never says "Play" anywhere in the program. Instead it uses PlayFirst- which I'm not familiar with. If you run the DF Mini Fast example and "Play" doesn't appear in the Serial Monitor- then I would think its the file nomenclature as it can't find the file. Reread the DFRobot Wiki on formatting the SD card- it has to be FAT32 format and in root.

[Previous page](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667.md?page=1)

[Next page](https://forum.arduino.cc/t/cant-use-dfplayer-mini-player-sensor-on-arduino-uno/933667.md?page=3)
