The DFPlayer Mini MP3 Player (Manufacturer Part ID: DFR0299) is a compact and cost-effective MP3 player module designed by DFRobot. It is capable of playing audio files directly from a micro SD card, USB drive, or through UART serial communication. The module features a built-in amplifier, making it suitable for driving small speakers directly, and supports a variety of audio formats such as MP3, WAV, and WMA.
This versatile module is widely used in applications such as:
Below are the key technical details of the DFPlayer Mini MP3 Player:
Parameter | Specification |
---|---|
Operating Voltage | 3.2V to 5.0V |
Operating Current | 20mA to 30mA |
Audio Formats Supported | MP3, WAV, WMA |
Storage Media | Micro SD card (up to 32GB), USB drive |
Communication Interface | UART (9600 bps default) |
Built-in Amplifier | 3W (for 4Ω speakers) |
Output Modes | DAC (headphone/speaker), PWM |
Dimensions | 22mm x 30mm x 11mm |
The DFPlayer Mini has 16 pins, but only a subset is commonly used. Below is the pinout and description:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.2V to 5.0V). |
2 | RX | UART serial communication input (connect to TX of microcontroller). |
3 | TX | UART serial communication output (connect to RX of microcontroller). |
4 | DAC_R | Right channel audio output (for external amplifier or headphones). |
5 | DAC_L | Left channel audio output (for external amplifier or headphones). |
6 | SPK_1 | Speaker output 1 (connect directly to a speaker). |
7 | SPK_2 | Speaker output 2 (connect directly to a speaker). |
8 | GND | Ground connection. |
9-16 | Other Pins | Reserved for advanced features (e.g., IO control, ADKEY, USB, etc.). |
Below is an example of how to use the DFPlayer Mini with an Arduino UNO to play an audio file:
#include "SoftwareSerial.h"
// Define RX and TX pins for SoftwareSerial
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
mySerial.begin(9600); // Initialize SoftwareSerial at 9600 baud
Serial.begin(9600); // Initialize Serial Monitor for debugging
delay(1000); // Allow time for DFPlayer Mini to initialize
// Send initialization command to DFPlayer Mini
mySerial.write(0x7E); // Start byte
mySerial.write(0xFF); // Version
mySerial.write(0x06); // Length
mySerial.write(0x09); // Command: Play
mySerial.write(0x00); // Feedback
mySerial.write(0x00); // Parameter 1
mySerial.write(0x01); // Parameter 2 (track number)
mySerial.write(0xEF); // End byte
}
void loop() {
// No actions in loop for this example
}
mySerial(10, 11)
with the appropriate pins if using different connections.0001.mp3
) and placed in the root directory of the micro SD card.No Sound Output:
Module Not Responding:
Distorted Audio:
Micro SD Card Not Detected:
Q: Can I use the DFPlayer Mini without a microcontroller?
A: Yes, the module can operate in standalone mode using ADKEY pins to trigger playback.
Q: What is the maximum storage capacity supported?
A: The DFPlayer Mini supports micro SD cards up to 32GB.
Q: Can I control the playback volume?
A: Yes, the volume can be adjusted via UART commands or by using ADKEY inputs in standalone mode.
Q: Is it possible to play audio files in a specific folder?
A: Yes, the DFPlayer Mini supports folder-based playback. Use UART commands to specify the folder and file.
This concludes the documentation for the DFPlayer Mini MP3 Player. For further assistance, refer to the official DFRobot documentation or community forums.