

The DFPlayer Mini is a compact MP3 player module designed for standalone audio playback or integration into microcontroller-based projects. Manufactured by ESP32, this module can play audio files directly from a micro SD card and features a built-in amplifier for driving small speakers. It supports various audio formats, including MP3, WAV, and WMA, making it a versatile choice for audio playback applications.








The DFPlayer Mini is a feature-rich module with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.2V - 5.0V |
| Operating Current | 20mA - 30mA (idle), up to 100mA (playback) |
| Audio Formats Supported | MP3, WAV, WMA |
| Storage Media | Micro SD card (up to 32GB, FAT16/FAT32) |
| Communication Interface | UART (9600 bps default) |
| Output Modes | DAC (headphone/speaker), PWM |
| Built-in Amplifier | 3W mono amplifier |
| Dimensions | 22mm x 30mm |
The DFPlayer Mini has 16 pins, but only a subset is commonly used. Below is the pin configuration:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.2V - 5.0V) |
| 2 | GND | Ground |
| 3 | RX | UART receive pin (connect to TX of microcontroller) |
| 4 | TX | UART transmit pin (connect to RX of microcontroller) |
| 5 | SPK_1 | Speaker output (+) for mono speaker |
| 6 | SPK_2 | Speaker output (-) for mono speaker |
| 7 | DAC_R | Right channel audio output (for external amplifier or headphones) |
| 8 | DAC_L | Left channel audio output (for external amplifier or headphones) |
| 9-16 | Other Pins | Reserved for advanced features (not commonly used in basic applications) |
To use the DFPlayer Mini in a circuit, follow these steps:
VCC pin to a 3.3V or 5V power source and the GND pin to ground.SPK_1 and SPK_2. For stereo output, use DAC_L and DAC_R with an external amplifier.RX pin of the DFPlayer Mini to the TX pin of the microcontroller and the TX pin of the DFPlayer Mini to the RX pin of the microcontroller.Below is an example of how to control the DFPlayer 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 SoftwareSerial at 9600 bps
Serial.begin(9600); // Initialize Serial Monitor for debugging
// Send initialization command to DFPlayer Mini
mySerial.write(0x7E); // Start byte
mySerial.write(0xFF); // Version
mySerial.write(0x06); // Length
mySerial.write(0x09); // Command: Play track 1
mySerial.write(0x00); // Feedback
mySerial.write(0x00); // Parameter 1
mySerial.write(0x01); // Parameter 2 (track number)
mySerial.write(0xEF); // End byte
Serial.println("DFPlayer Mini initialized and playing track 1.");
}
void loop() {
// Add code here to control playback, volume, etc.
}
SoftwareSerial library is used to communicate with the DFPlayer Mini.10 and 11 with the desired pins for RX and TX on your Arduino UNO.0001.mp3) and placed in the root directory of the micro SD card.No Sound Output
SPK_1 and SPK_2.Module Not Responding
RX and TX connections between the DFPlayer Mini and the microcontroller.Distorted Audio
Q: Can I use the DFPlayer Mini without a microcontroller?
A: Yes, the DFPlayer Mini can operate in standalone mode by connecting buttons to specific pins for basic playback control.
Q: What is the maximum storage capacity supported?
A: The DFPlayer Mini supports micro SD cards up to 32GB formatted as FAT16 or FAT32.
Q: Can I control the volume programmatically?
A: Yes, the volume can be adjusted using UART commands from the microcontroller.
Q: Is an external amplifier required?
A: No, the DFPlayer Mini has a built-in 3W mono amplifier, but you can use an external amplifier for higher-quality audio or stereo output.
By following this documentation, you can effectively integrate the DFPlayer Mini into your projects and troubleshoot common issues.