DFRobot's "DFPlayer Mini" is a fantastic little player that powers many of my modules (Exposi'Son, Ambi'Son, Boita'Son). However, it comes with a number of small quirks that are actually easy to master. Some of the lines below aren't relevant to your specific device, but I preferred to gather everything in a single document.
If a problem persists, contact me!
Warning: Please follow my instructions to the letter, down to the capitalization and spaces! Yes, the DFPlayer is that picky...
The Basics
- Formatting! Always format your microSD card or USB drive before use, in "FAT16" or "FAT32". And name it "SD"!
- File formats! MP3 preferred, or WAV (16-bit / 48 kHz maximum).
- File naming!
- Name your files 0001, 0002, etc. (with .mp3 or .wav at the end, of course).
- Name your files in a folder on your computer, in the correct order, before transferring them to your microSD card or USB drive. NEVER rename them once they're on your storage device.
- Loading! Transfer the files onto the card one at a time, from first to last.
Important
- On PC: enable the "Show hidden files and folders" option and delete them.
- On macOS:
- Open Finder > Applications > Utilities > Terminal.
- Copy/paste
Press the "Enter" key.dot_clean /Volumes/SD - Yes, the Terminal will say it didn't work, but it actually did ;)
Eject your storage device and insert it into your module. Test it!
Issues, Fixes & Tips
- The microSD card reader doesn't work and/or gets hot? Unplug everything immediately! Switch to a different power supply, microSD card, and headphones if necessary.
- If you don't like the looped playback on the Exposi'Son (long press >1s): use very long files (30 minutes or 1 hour, for example) containing your sound at the beginning, followed by silence. If the user does a long press, the player will loop, but it won't be noticeable.
- The DFPlayer plays files in their numerical order rather than by name: If you want to play file 3, it won't play 0003, but the 3rd sound on your card. So you need to have 2 files before that 0003. If those first 2 files are useless to you, just put any audio files in slots 0001 and 0002.
- A "robotic" sound? Use an MP3 file format, or a WAV in 16-bit / 48 kHz maximum.
- "Clicks" or noises at the end of or between files? Convert your files to MP3 (high quality: 320 kbit/s) using NCH's "Switch" (free).
- A file issue? Reformat your microSD or USB drive in "FAT" or "exFAT".
- Sounds mixed up or out of order? Format your storage device in "exFAT".
- Files still out of order? NEVER rename the files once they're on your storage device. Rename them before transferring them.
- Files still out of order? Sometimes you want the first file and the last one plays instead. It happens. Just put the first file (0001) at the end and shift all the others. Simple as that.
- Noises or humming? A few possibilities:
- Try switching your power supply or storage device to a different brand.
- This issue happens with certain microSD cards. To confirm it, turn on the module and play a file at minimum volume. If there's a buzz when the card is in, eject it "hot". If the bug stops, your card is the problem. Switch to a different model.
- It's odd, but the DFPlayer or its socket sometimes have dirty connectors, which generates noise. Even though I clean them carefully during assembly, I recommend disconnecting, cleaning them again, and reconnecting them several times, in the right direction!
- On the Ambi'Son, the Nano can power accessories up to 250 mA. This is enough for many things, but not for the most power-hungry ones, such as relays, screens, etc. I recommend installing a second power supply dedicated to accessories, with a common ground shared with the module.
- A "pop" sound at startup? This unwanted noise occurs when the Arduino initializes the DFPlayer. Simply replace:
with:myDFPlayer.begin(mySoftwareSerial)
The second parameter (myDFPlayer.begin(mySoftwareSerial, true, false)true) enables acknowledgments, and the third (false) disables the reset that causes the noise. Simple and effective! - An issue with the IDE recognizing the Nano? Use version 1.0.3 of the "DFRobotDFPlayerMini.h" library, and try the "ATmega328P" boards with or without "Old bootloader".
- A component connected to the Nano isn't working properly? Some components or accessories need a stable power supply before starting up. I therefore recommend adding a
delay();of a few milliseconds to a few seconds in your code, on the first line of yoursetup()function. For example,delay(2000);. This gives accessories time to start up properly before being called in the code. - The Ambi'Son module gets hot? Yes, according to my measurements, the Nano reaches 40 to 60 °C near the LEDs (the component beneath the board heats up while regulating voltages). No need to worry, the Nano can safely heat up to 70 °C. If you're concerned, you can stick a heat sink on the hottest spot.
- If a problem persists, contact me!