i'm using DFPlayer mini with arduino pro mini. It worked very well for few days. But now it issn't possible to connecting to DFPlayer.
I get follow serial output:
DFRobot DFPlayer Mini Demo
Initializing DFPlayer ... (May take 3~5 seconds)
Unable to begin:
1.Please recheck the connection!
2.Please insert the SD card!
I already checked the wiring, replaced the player, replaced the arduino and using some micro sd cards. but led of dfplayer didn'tn turn on.
How can i check if dfplayer it working/starting up without using arduino? I using a switch between IO1 and IO2 to play the first song. but LED didn't turn on.
How can i check if dfplayer it working/starting up without using arduino? I using a switch between IO1 and IO2 to play the first song. but LED didn't turn on.
The first switch must be between ground and IO1 (previous track)
The second switch must be between ground and IO2 (next track)
Even a buzzing noise is a good sign. There are rules about the file name and folder name on the SD card which must be observed. Also there are restriction on the recording format.
What is the folder names and filenames on the SD card that you are using to test ?
I've used this Sparkfun sketch to dump such information from the SD card. See the header comments for the pins used on the SDcard module:
/*
 SD card test
 created 28 Mar 2011
 by Limor Fried
 modified 9 Apr 2012
 by Tom Igoe
 Hookup for the SparkFun microSD shield
 on a SparkFun RedBoard/Arduino Uno R3
 MOSI - 11
 MISO - 12
 CLK - 13
 CS - 8
*/
// include the SD library:
#include <SPI.h>
#include <SD.h>
// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;
// The Sparkfun microSD shield uses pin 8 for CS
const int chipSelect = 80;
void setup()
{
 // Open serial communications and wait for port to open:
 Serial.begin(9600);
 while (!Serial) {
  ; // wait for serial port to connect. Needed for Leonardo only
 }
 Serial.print("\nInitializing SD card...");
 // Note that even if it's not used as the CS pin, the hardware SS pin
 // (10 on most Arduino boards, 53 on the Mega) must be left as an output
 // or the SD library functions will not work.
 pinMode(8 , OUTPUT);
 pinMode(10, OUTPUT);
 // we'll use the initialization code from the utility libraries
 // since we're just testing if the card is working!
 if (!card.init(SPI_HALF_SPEED, chipSelect)) {
  Serial.println("initialization failed. Things to check:");
  Serial.println("* is a card is inserted?");
  Serial.println("* Is your wiring correct?");
  Serial.println("* did you change the chipSelect pin to match your shield or module?");
  return;
 } else {
  Serial.println("Wiring is correct and a card is present.");
 }
 // print the type of card
 Serial.print("\nCard type: ");
 switch (card.type()) {
  case SD_CARD_TYPE_SD1:
   Serial.println("SD1");
   break;
  case SD_CARD_TYPE_SD2:
   Serial.println("SD2");
   break;
  case SD_CARD_TYPE_SDHC:
   Serial.println("SDHC");
   break;
  default:
   Serial.println("Unknown");
 }
 // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
 if (!volume.init(card)) {
  Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
  return;
 }
 // print the type and size of the first FAT-type volume
 uint32_t volumesize;
 Serial.print("\nVolume type is FAT");
 Serial.println(volume.fatType(), DEC);
 Serial.println();
 volumesize = volume.blocksPerCluster();  // clusters are collections of blocks
 volumesize *= volume.clusterCount();   // we'll have a lot of clusters
 volumesize *= 512;              // SD card blocks are always 512 bytes
 Serial.print("Volume size (bytes): ");
 Serial.println(volumesize);
 Serial.print("Volume size (Kbytes): ");
 volumesize /= 1024;
 Serial.println(volumesize);
 Serial.print("Volume size (Mbytes): ");
 volumesize /= 1024;
 Serial.println(volumesize);
 Serial.println("\nFiles found on the card (name, date and size in bytes): ");
 root.openRoot(volume);
 // list all files in the card with date and size
 root.ls(LS_R | LS_DATE | LS_SIZE);
}
void loop(void) {
}
Do you use the SDCard Module on DFPlayer or another pure SD-Card Module ?
Until yesterday it works with normal filenames. i already renamed it to 0001.mp3 0002.mp3
The same with folder "mp3" but nothing works.
SD Card was formatted again with FAT32 and Default Size.
Here the actual result:
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT32
Volume size (bytes): 3122659328
Volume size (Kbytes): 3049472
Volume size (Mbytes): 2978
Files found on the card (name, date and size in bytes):
SYSTEM~1/Â Â 2018-05-16 13:49:24
 WPSETT~1.DAT 2018-05-16 13:49:24 12
 INDEXE~1   2034-13-16 13:49:30 76
MYCROL~1.MP3Â 2001-12-26 19:15:16 110417
SONG5~1.MP3Â 2000-10-15 17:59:38 163122
CATCH_~1.MP3Â 2001-12-26 18:59:42 128731
BGSOUND.MP3Â 2001-12-29 18:50:50 117366
RAVE-B~1.MP3Â 2001-12-29 17:53:06 117249
HAPPY_~1.MP3Â 2001-12-26 19:05:56 110868
In the meanwhile i format the sd with SDFormatter and adding one mp3 file.
I use the IO2 Switch and hear the sound. but after sound was ending, i hear the same buzz noise.
After them i wire it to arduino. But serial connection do still not establish.
I've used both a DFRobot DFplayer Mini and a pure SD card reader in my tests recently. The test I gave you to try was actually for a pure SD card reader.
All ones have the same issue. Only the first one wich i used few days didn‘t make noises, so i think i brick it..
The SD Card works fine.. i tested it with sc card reader (see sd card test thread)
I use two different sd cards on DFplayer and both makes no difference.
At last i tested it again with 0001.mp3 in mp3 folder and i was able to playing this song with IO2 Switch and sometimes it was possible to read Serial Interface with arduino. Arduino detects 6 files but only one mp3 file exists (maybe the system information folder will be the reason for this).
But after each play finished it makes the buzz noise. sounds like the same if you have a bad tv antenna without signal.
I orded new df players and 3.3v power transformers. I will check it out next week.
You'll see it is much clearer about the naming rules for files. (see 1.4)
It is always better to make an exact model of the SD card in a folder on a PC file system, then format the SD card, then copy the entire folder, without change, to the SD card. Do not then edit the SD card with the PC.
The mp3 player has a very primitive handling of the SD card file system and does not necessarily respect things like deleted file marks, file names (especially long file names) etc.
An SD card and reader can have quite a significant power consumption (I've seen 200mA mentioned here ) so a voltage divider may not be ideal for powering it.
If the document quoted in post #10 here is current, then all that appears to be required for 5volt compatibility is this:
Note: When using a 5V MCU, please attach a 1K resistor between the TX and RX ports.
i tested it with new DFPlayer and new speakers. Now i found the reason:
it didn't work with 3.3v > i get only buzz noises
it works fine with 5 v but the 9v battery converter that contains in most arduino-starter kits didn't work clean or didn't have enough voltatge/watt
it works fine with usb power over FTDI-connector, so DFPlayer would get power over arduino VCC
System Information Folder maybe make some issues too, i deleted it and copy some mp3 files to root directory of sd card - it makes no differences if you using 0001.mp3 or blubb.mp3
but now the interesting part: I delete two mp3 files and windows display only 4 mp3 files but dfplayer detect 6 mp3 files and play all of them. so i think dfplayer looking for file sectors and didn't use the MFT or Index of FAT.
i Will check it out again with raw power pin of arduino and a 9v battery directly
Webfeger:
. . .
but now the interesting part: I delete two mp3 files and windows display only 4 mp3 files but dfplayer detect 6 mp3 files and play all of them. so i think dfplayer looking for file sectors and didn't use the MFT or Index of FAT.
. . .
It does look like the file system handling on the DFplayer is very primitive. If you format the SDcard in Windows (quick format) does the DFplayer still find old deleted files ?
i format the sd card complete again and now everything works fine.
The cables and pins sometime make some issues so i soldered all wires to verify everything works fine. System Information Folder dont make issues anymore.
Now it works great with raw input and vcc output (5v) for DFPlayer.