logo elektroda
logo elektroda
X
logo elektroda

DFPlayer Mini - a short description of a cheap MP3 player

grala1 
Hello all.
I would like to introduce you to a cheap Chinese MP3 player - DFPlayer Mini.
The cost of such a player is less than $ 1.5.
DFPlayer mini has the ability to play music in MP3 or WAV format from the built-in micro SD card reader, you can also play music by connecting a USB flash drive to the player. The storage medium should not be larger than 32GB and should be FAT16 or FAT32 format.
This player has the ability to control both by connecting goldpins and through the UART interface with a speed of 9600 bps.
It has dimensions of 20.5 x 20.5 x 13 mm.


I became interested in the player after reading the article of one of the forum users, where he described a changer emulator he had created for cars of the VAG group.
https://www.elektroda.pl/rtvforum/topic3380561.html
The player was ordered directly from China, after 3 weeks it was in my hands.
Basic "analog" control is shown in the picture below.

This way, you can turn on the next / previous track, turn it down / up.
You can connect a small speaker directly to the player - I used 1.5W 8?.
Unfortunately, the device has an output only for one loudspeaker, but you can get stereo through the DAC_R, DAC_L outputs where you should connect them through an amplifier or you can connect headphones here.
The device can be powered from 5V, power consumption less than 15mA, increases when you connect a USB device.
Tracks recorded on a storage medium should be properly named - e.g. 001, 002 etc. Tracks should be grouped in folders that are also numbered - 01, 02, etc.
The maximum number of folders is 99 and the maximum number of songs in a folder is 255.
If we do not use the control that turns on the appropriate track number, we will only use the previous / next track, then tracks and folders can be named freely.
Below is the player pinout

As for communication via UART, use the settings as in the picture below.

It should be remembered that although the device is powered from 5V, the UART voltage level is 3.3V and for this reason, a 1k? resistor should be added between the Tx of the device sending the commands and the Rx of the player (if we use the 5v standard in the device sending the commands, at 3.3V the resistor is redundant). I used a 10k? resistor because I had one at hand.

The video below (sorry for not the best quality) shows sending commands using the COM Port Toolkit program and the USB-UART converter based on the FT232 chip.
[movie: 6bf572119f] https://filmy.elektroda.pl/83_1511229427.mp4 [/ movie: 6bf572119f]
The basic commands are:
- next 0x7E FF 06 01 00 00 00 EF
- previous 0x7E FF 06 02 00 00 00 EF
- quieter 0x7E FF 06 04 00 00 00 EF
- louder 0x7E FF 06 02 00 00 00 EF
The above commands do not include checksums, they can be sent without sums or with a checksum.
How to calculate the checksum?
We count it in hexadecimal.
The command with the checksum for switching on the next track is:
7E FF 06 01 00 00 00 FE FA EF
where FE FA is the checksum.
We need to add FF + 06 + 01 + 00 + 00 + 00 = 106 together
0-106 = FA EF which gives our checksum.
When sending a command to the device, you can request a response and it will be clear that the command has been understood.
In the video below, a short presentation of the player control through the AVR processor which supports the buttons (NEXT, PREV, VOL +, VOL-) here, then sends the appropriate commands, receives from the device information about the current SD card or connected USB drive and sends the command 0x7E FF 06 01 00 00 00 EF for sequential playback of tracks. There is also a remote control via IR.
[movie: 6bf572119f] https://filmy.elektroda.pl/18_1511229716.mp4 [/ movie: 6bf572119f]
The disadvantages that I noticed with this player are the inability to connect a second loudspeaker, no possibility of scrolling, no memory of the track being played after turning off the power and the volume set, no possibility to play songs in the order with "analog" control (feeding the mass to the appropriate goldpins) - after the end of playback track, you have to force the next track to play, this problem can be avoided when controlling via UART.

The player can be used to build a watch where you can hire it to play the bugle call at the full hour or as a wake-up call, an MP3 doorbell, etc.
Below is the documentation for the DFPlayer mini.

About Author
grala1 wrote 9757 posts with rating 4845 , helped 1477 times. Live in city Kalisz. Been with us since 2006 year.

Comments

Marek_Ertew 21 Nov 2017 18:09

Allow me to attach a handful of comments to expand the description. 1. The module can act as a card reader. After connecting it to the computer, the playback is interrupted and the inserted SD card is... [Read more]

ditomek 22 Nov 2017 13:12

How about the sound quality? Can the module be used to build a stationary mp3 (as another element of a stereo system)? [Read more]

grala1 22 Nov 2017 13:20

I am not an audiophile but for me the sound is ok in the loudspeaker and headphones, I tested it in the car and it sounds quite good to me. As I wrote earlier, one of the users made a car changer emulator... [Read more]

Marek_Ertew 22 Nov 2017 18:54

I cannot complain about the sound quality. Only interference occurs when uC is sending data to the module. This is how I used uC powered by 5V and gave a 2k resistor on the uC-> module data line. However,... [Read more]

grala1 22 Nov 2017 19:16

I have 10k and I can't hear any noise. As for reading the current position, you can set a timer that will count from the moment of information from the player that a new track is coming and reset... [Read more]

silelis 05 Dec 2017 12:42

I have two questions regarding this module: 1) Is there a 10 ohm resistor on the USB D + and D + lines ??? Usually, I have encountered such a solution, is it here on the module? 2) What size capacitors... [Read more]

grala1 05 Dec 2017 12:48

I do not use any resistors at the USB connector and no capacitors at the speaker output. [Read more]

silelis 11 Dec 2017 23:31

I have a question regarding the naming of folders and files on the medium. The datasheet says that they must be in the form 001, 002, 003, 00N, where the name of the first directory need not be 001,... [Read more]

wojdyl1 14 Feb 2018 10:30

Hello, encouraged by a simple mp3 player, I bought this module. I connected according to the instructions (from the very beginning of the post). 3.3V battery power, 0.5W 8 ohm speaker, and unfortunately... [Read more]

grala1 14 Feb 2018 11:36

Try to supply 5V. If this does not help, disconnect the speaker and then check if the diode goes out. I had the same and it looked like the speaker was overloading the module. [Read more]

Marek_Ertew 14 Feb 2018 12:35

@ wojdyl1 , I bet that the amplifier and speaker overload the 3.3V stabilizer, the voltage drops out and therefore everything turns off. Try to connect speakers with an amplifier to the line output,... [Read more]

wojdyl1 14 Feb 2018 13:46

Thank you very much for the hint, I checked and everything is correct, the loudspeaker was too heavy on the module. Now I plugged in the earpiece and everything started to work. Thank you again. ... [Read more]

Marek_Ertew 14 Feb 2018 22:07

The player has two audio outputs that work simultaneously. One is a stereo line output (poor performance), the other is a mono output through the built-in amplifier (separate circuit on the PCB). Your... [Read more]

wojdyl1 19 Feb 2018 14:13

it turned out that the power supply did not give the correct current and therefore the module could not cope, and only with a low load you could listen to something. I installed the batteries on the phone... [Read more]

umbrella2 13 Mar 2018 21:12

Hi. I wanted to assemble a toy for my little ones on this particular layout, but I have a problem. I wish I could run 36 songs with 36 buttons. I can see that direct control can be done via ADKEY1 and... [Read more]

Tomek515 07 Nov 2018 15:22

Could this module be used in such a way that after applying voltage it would automatically play the path? Maybe you can recommend something else ready that could perform such functions [Read more]

Bogdan 6 01 Jan 2019 02:14

And here you have my program for operating this MP3 with a selection of folders for the remote control, you have to read the remote control codes yourself using arduino /*****************************************************************************************\ ... [Read more]

jankus 21 Aug 2022 21:26

Hello! I have a different kind of problem. I did so that it uses resistors to recreate certain folders / files in a folder. It works fine, but ... the problem is that if you hold a certain button longer,... [Read more]

Justyniunia 25 Jan 2025 07:46

Hi. Since the module is described here - I am not creating a new topic. I have 3 questions. If I only have one short sound on the memory card, is it: 1. when the module is powered up, will it... [Read more]