

The DF Player Mini is a compact MP3 player module designed for audio playback in embedded systems. It can play audio files directly from a micro SD card or USB drive and features a built-in amplifier for driving small speakers. The module supports various audio formats, including MP3, WAV, and WMA, making it a versatile choice for projects requiring sound output. Its small size and ease of integration make it ideal for applications such as DIY audio systems, talking devices, alarms, and interactive installations.








The DF Player Mini has 16 pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.2V to 5.0V DC). |
| 2 | RX | UART receive pin for serial communication. |
| 3 | TX | UART transmit pin for serial communication. |
| 4 | DAC_R | Right channel DAC output for external amplifier. |
| 5 | DAC_L | Left channel DAC output for external amplifier. |
| 6 | SPK_1 | Positive terminal for speaker connection (built-in amplifier). |
| 7 | SPK_2 | Negative terminal for speaker connection (built-in amplifier). |
| 8 | GND | Ground connection. |
| 9 | IO_1 | General-purpose input/output pin 1. |
| 10 | IO_2 | General-purpose input/output pin 2. |
| 11 | ADKEY_1 | Analog key input 1 for button control. |
| 12 | ADKEY_2 | Analog key input 2 for button control. |
| 13 | BUSY | Output pin indicating playback status (HIGH = busy, LOW = idle). |
| 14 | USB+ | Positive terminal for USB drive connection. |
| 15 | USB- | Negative terminal for USB drive connection. |
| 16 | RESET | Reset pin to restart the module. Active LOW. |
Below is an example of how to control the DF Player Mini using an Arduino UNO:
#include "SoftwareSerial.h"
// Define RX and TX pins for SoftwareSerial
SoftwareSerial mySerial(10, 11); // RX = pin 10, TX = pin 11
void setup() {
mySerial.begin(9600); // Initialize software serial communication
Serial.begin(9600); // Initialize hardware serial for debugging
Serial.println("Initializing DF Player Mini...");
delay(1000);
// Send initialization command to DF Player Mini
mySerial.write(0x7E); // Start byte
mySerial.write(0xFF); // Version
mySerial.write(0x06); // Length
mySerial.write(0x09); // Command: Select device
mySerial.write(0x00); // Feedback
mySerial.write(0x02); // Parameter: SD card
mySerial.write(0xEF); // End byte
Serial.println("DF Player Mini initialized.");
}
void loop() {
// Play the first track on the SD card
mySerial.write(0x7E); // Start byte
mySerial.write(0xFF); // Version
mySerial.write(0x06); // Length
mySerial.write(0x03); // Command: Play track
mySerial.write(0x00); // Feedback
mySerial.write(0x00); // High byte of track number
mySerial.write(0x01); // Low byte of track number (track 1)
mySerial.write(0xEF); // End byte
Serial.println("Playing track 1...");
delay(5000); // Wait for 5 seconds before repeating
}
No Sound Output:
Module Not Responding to Commands:
Playback Stops Unexpectedly:
Q: Can I use the DF Player Mini without a microcontroller?
A: Yes, the module can be controlled using AD key inputs or by connecting buttons to the ADKEY_1 and ADKEY_2 pins.
Q: What is the maximum speaker power supported by the built-in amplifier?
A: The built-in amplifier supports up to 3W output for a 4Ω speaker.
Q: Can I use a USB drive instead of a micro SD card?
A: Yes, the module supports USB drives, but you must connect the USB+ and USB- pins to the appropriate terminals.
Q: How do I reset the module?
A: Pull the RESET pin LOW momentarily to reset the module.
This concludes the DF Player Mini documentation.