Skip to content

DF Player Pro

Fermion: DFPlayer Pro - A mini MP3 Player with On-board 128MB Storage (Breakout).

https://www.dfrobot.com/

https://wiki.dfrobot.com/DFPlayer_PRO_SKU_DFR0768

Specs

  • 2 Channel
  • 3W Amp
  • Virtual USB Driver (works as soundcard)
  • 128MB storage
  • MP3, WAV and others
  • UART
  • 3.3V / 5V
  • Dimensions: 23x24,5mm

Tips

Remove Voice Prompt

The voice prompt can be turned off using AT command:

AT+PROMPT=OFF

AT commands (like setting volume or playmode) are stored, when setting and then powering down the player.

File Order

Warning

The order of the files on the internal storage is determind by the order, in which the files have been transferred to the player! They are not ordered by file number or alphabetically.

Control Button Setup

Connecting Key with GND (for example with a simple push button) lets you control the following functions, depending on the resitor used:

Key Resistor in Series Click Long-press
K0 0R Pause & Play
K1 3K Last Volume +
K2 6.2K Next Volume -
K3 9.1K Switch Play Mode
K4 15K Fast Forward 10s
K5 24K Pause & Play Next
K6 33K Volume - Volume -
K7 51K Volume + Volume +
K8 100K Fast Rewind 10s
K9 220K Play the first song, set volume to 10

AT Commands

Tip

You can use for example an Arduino Uno board as a USB to UART interface, by bridging GND and RESET on the Arduino board and connecting your device with the ArduinoTX to RX and RX to `TX.

/**
 * @brief Test Connection
 */
AT  //Test Connection

/**
 * @brief Set/Query Volume(Volume:0-30)(Power-down save) 
 * @param -n:Volume -n
 *        +n:Volume +n
 *         n:Designate volume to n
 *         ?:Query volume
 */
AT+VOL=-5  //Volume -5

AT+VOL=?   //Query volume
returnVOL = [10]   //The current volume is 10

/**
 * @brief Control playback mode
 * @param  1:repeat one song
 *         2:repeat all
 *         3:play one song and pause
 *         4:Play randomly
 *         5:Repeat all in the folder
 *         ?:query the current playback mode
 */
AT+PLAYMODE=1   //Switch to repeat-one-song mode 

AT+PLAYMODE=?   //Query current playback mode 
ReturnPLAYMODE =1  //Current playback mode: repeat one song

/**
 * @brief Control playing
 * @param    PP:Play & Pause
 *         NEXT:next
 *         LAST:last
 */
AT+PLAY=NEXT   //last

/**
 * @brief Playing time control 
 * @param -n:Fast Rewind n S
 *        +n:Fast Forward n S
 *         n:Start playing from the Nth second
 */
AT+TIME=-5   //Fast Rewind 5S

/**
 * @brief Query playback information 
 * @param  1:Query the file number of the currently-playing file
 *         2:Query the total number of the files
 *         3:Query the time length the song has played
 *         4:Query the total time of the currently-playing file
 *         5:Query the file name of the currently-playing file
 */
AT+QUERY=1   //Query the file number of the currently-playing file

AT+QUERY=5  //Query the file name of the currently-playing file
Returntest.mp3    //The currently-playing file is "test.mp3"


/**
 * @brief Play the file of the specified number 
 * @param        n:File number(Play the first file if there is no such file)
 */
AT+PLAYNUM=5                       //Play file No. 5 

/**
 * @brief Play the specific file
 * @param File path
 */
AT+PLAYFILE=/DF_REC/test.MP3        //Play the test.mp3 under DF_REC once 

/**
 * @brief Amplifier On/OFF command
 * @param    ON, OFF
 */
AT+AMP=ON   //Turn on amplifier 

/**
 * @brief Delete currently-playing file
 */
AT+DEL

/**
 * @brief Set baud rate (power-down save, valid after re-powering on)
 * @param    9600、19200、38400、57600、115200
 */
AT+BAUDRATE=115200  //Set baud rate to 115200

/**
 * @brief Prompt tone ON/OFF command (Power-down save)
 * @param    ON, OFF
 */
AT+PROMPT=ON   //Turn on prompt tone 

//LED Prompt On/Off Command(Power-down save) 
/**
 * @brief LED Prompt ON/OFF command (Power-down save)
 * @param    ON, OFF
 */
AT+LED=ON   //Turn on LED Prompt