Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use DF Player Mini: Examples, Pinouts, and Specs

Image of DF Player Mini
Cirkit Designer LogoDesign with DF Player Mini in Cirkit Designer

Introduction

The DF Player Mini is a compact MP3 player module designed for embedded audio applications. It can play audio files directly from a micro SD card and supports popular audio formats such as MP3, WAV, and WMA. The module features a built-in amplifier, making it capable of driving small speakers directly. It can be controlled via serial communication, making it an excellent choice for projects requiring audio playback, such as interactive displays, voice alerts, or IoT devices.

Explore Projects Built with DF Player Mini

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered MP3 Player with Seeed Studio nRF52840 and OLED Display
Image of MP3 player: A project utilizing DF Player Mini in a practical application
This circuit is an MP3 player system controlled by a Seeed Studio nRF52840 microcontroller. It includes a DFPlayer MINI for audio playback, a 0.96" OLED display for visual feedback, and multiple pushbuttons for user interaction. The system is powered by a 3.7V LiPo battery and outputs audio through a 3.5mm audio jack.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based RFID Music Player with Arcade Button Controls
Image of Robot Music Player: A project utilizing DF Player Mini in a practical application
This circuit features an ESP32 Devkit V1 microcontroller interfaced with a DFPlayer Mini MP3 player module, an RFID-RC522 reader, a piezo speaker, and two arcade buttons. The ESP32 controls audio playback through the DFPlayer Mini, which is connected to the speaker, and uses the RFID reader to trigger specific audio tracks based on RFID tag data. The arcade buttons are used to control playback and adjust volume, while a rocker switch and battery mount provide power management.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Audio Player with LED Indicators and Battery Charging
Image of Device Classification Pil (LED): A project utilizing DF Player Mini in a practical application
This circuit features an ESP32 Mini microcontroller connected to a DFPlayer Mini MP3 module for audio playback, with a loudspeaker attached for sound output. The ESP32 controls two LEDs (green and red) and reads an analog value from a potentiometer. Power management is handled by a TP4056 charging module connected to an 18650 battery, providing power to the ESP32 and other components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled MP3 Player Circuit
Image of Hrl_d: A project utilizing DF Player Mini in a practical application
This circuit connects an Arduino 101 microcontroller to a DFPlayer Mini MP3 player module. The Arduino controls the DFPlayer Mini via digital pins D11 (PWM/MOSI) and D10 (PWM/SS) for serial communication, allowing it to send commands and data to play audio files. The 5V and GND pins from the Arduino provide power to the DFPlayer Mini, and no external resistors are involved in the communication or power circuits.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with DF Player Mini

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of MP3 player: A project utilizing DF Player Mini in a practical application
Battery-Powered MP3 Player with Seeed Studio nRF52840 and OLED Display
This circuit is an MP3 player system controlled by a Seeed Studio nRF52840 microcontroller. It includes a DFPlayer MINI for audio playback, a 0.96" OLED display for visual feedback, and multiple pushbuttons for user interaction. The system is powered by a 3.7V LiPo battery and outputs audio through a 3.5mm audio jack.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Robot Music Player: A project utilizing DF Player Mini in a practical application
ESP32-Based RFID Music Player with Arcade Button Controls
This circuit features an ESP32 Devkit V1 microcontroller interfaced with a DFPlayer Mini MP3 player module, an RFID-RC522 reader, a piezo speaker, and two arcade buttons. The ESP32 controls audio playback through the DFPlayer Mini, which is connected to the speaker, and uses the RFID reader to trigger specific audio tracks based on RFID tag data. The arcade buttons are used to control playback and adjust volume, while a rocker switch and battery mount provide power management.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Device Classification Pil (LED): A project utilizing DF Player Mini in a practical application
ESP32-Based Audio Player with LED Indicators and Battery Charging
This circuit features an ESP32 Mini microcontroller connected to a DFPlayer Mini MP3 module for audio playback, with a loudspeaker attached for sound output. The ESP32 controls two LEDs (green and red) and reads an analog value from a potentiometer. Power management is handled by a TP4056 charging module connected to an 18650 battery, providing power to the ESP32 and other components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Hrl_d: A project utilizing DF Player Mini in a practical application
Arduino-Controlled MP3 Player Circuit
This circuit connects an Arduino 101 microcontroller to a DFPlayer Mini MP3 player module. The Arduino controls the DFPlayer Mini via digital pins D11 (PWM/MOSI) and D10 (PWM/SS) for serial communication, allowing it to send commands and data to play audio files. The 5V and GND pins from the Arduino provide power to the DFPlayer Mini, and no external resistors are involved in the communication or power circuits.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Interactive kiosks and displays
  • Voice alerts and notifications in embedded systems
  • Audio playback in IoT devices
  • Educational and DIY electronics projects
  • Toys and sound effects systems

Technical Specifications

Below are the key technical details of the DF Player Mini:

Parameter Value
Operating Voltage 3.2V - 5.0V
Operating Current 20mA - 30mA
Supported Audio Formats MP3, WAV, WMA
Storage Media Micro SD card (up to 32GB)
Communication Interface UART (Serial)
Output Power (Speaker) 3W (4Ω speaker, 5V supply)
Output Power (Headphone) 30mW (32Ω headphones)
Dimensions 22mm x 20mm x 3.5mm

Pin Configuration and Descriptions

The DF Player Mini has 16 pins, but only a subset is commonly used in most applications. Below is the pinout and description:

Pin Name Description
1 VCC Power supply input (3.2V - 5.0V).
2 GND Ground connection.
3 RX Serial data input (connect to TX of microcontroller).
4 TX Serial data output (connect to RX of microcontroller).
5 SPK_1 Speaker output (+). Connect to one terminal of a speaker.
6 SPK_2 Speaker output (-). Connect to the other terminal of a 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 (e.g., IO control, ADKEY, BUSY, etc.).

Usage Instructions

Connecting the DF Player Mini

To use the DF Player Mini in a circuit, follow these steps:

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Speaker Connection: For direct speaker output, connect a 4Ω or 8Ω speaker to the SPK_1 and SPK_2 pins.
  3. Microcontroller Interface: Connect the RX pin of the DF Player Mini to the TX pin of your microcontroller (e.g., Arduino UNO) and the TX pin of the DF Player Mini to the RX pin of the microcontroller.
  4. Micro SD Card: Insert a formatted micro SD card (FAT32) containing audio files into the module's SD card slot.

Important Considerations

  • Ensure the micro SD card is formatted as FAT16 or FAT32 and contains audio files in supported formats.
  • Use a level shifter or resistor divider if interfacing with a 5V microcontroller to avoid damaging the module.
  • Avoid connecting both the speaker and DAC outputs simultaneously to prevent overloading the module.

Example Code for Arduino UNO

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 SoftwareSerial at 9600 baud
  Serial.begin(9600);   // Initialize hardware Serial for debugging

  // Send initialization commands to DF Player Mini
  sendCommand(0x3F, 0, 0); // Reset the module
  delay(1000);             // Wait for the module to reset
  sendCommand(0x06, 0, 15); // Set volume to 15 (range: 0-30)
  Serial.println("DF Player Mini initialized.");
}

void loop() {
  // Play the first track on the SD card
  sendCommand(0x03, 0, 1); // Play track 1
  delay(5000);             // Wait for 5 seconds

  // Pause playback
  sendCommand(0x0E, 0, 0); // Pause playback
  delay(2000);             // Wait for 2 seconds

  // Resume playback
  sendCommand(0x0D, 0, 0); // Resume playback
  delay(5000);             // Wait for 5 seconds
}

// Function to send commands to the DF Player Mini
void sendCommand(uint8_t command, uint8_t param1, uint8_t param2) {
  uint16_t checksum = 0xFFFF - (0xFF + 0x06 + command + param1 + param2) + 1;

  // Send command packet
  mySerial.write(0x7E);         // Start byte
  mySerial.write(0xFF);         // Version
  mySerial.write(0x06);         // Length
  mySerial.write(command);      // Command
  mySerial.write(0x00);         // Feedback (0x00 = no feedback)
  mySerial.write(param1);       // Parameter 1
  mySerial.write(param2);       // Parameter 2
  mySerial.write(highByte(checksum)); // Checksum high byte
  mySerial.write(lowByte(checksum));  // Checksum low byte
  mySerial.write(0xEF);         // End byte
}

Notes on the Code

  • The sendCommand function constructs and sends the command packet required to control the DF Player Mini.
  • Replace 10 and 11 in SoftwareSerial with the desired pins for RX and TX if needed.
  • Ensure the baud rate is set to 9600 for proper communication.

Troubleshooting and FAQs

Common Issues

  1. No Sound Output:

    • Ensure the speaker is properly connected to the SPK_1 and SPK_2 pins.
    • Verify that the audio files are in a supported format and stored on a properly formatted micro SD card.
  2. Module Not Responding:

    • Check the wiring between the microcontroller and the DF Player Mini.
    • Ensure the RX and TX pins are correctly connected (crossed with the microcontroller's TX and RX).
  3. Distorted Audio:

    • Use a power supply with sufficient current capacity (at least 1A recommended).
    • Avoid overdriving the speaker by keeping the volume within a reasonable range.
  4. Micro SD Card Not Detected:

    • Ensure the card is formatted as FAT16 or FAT32.
    • Check that the card is properly inserted into the slot.

Tips for Troubleshooting

  • Use a multimeter to verify power supply voltage and connections.
  • Test the module with a simple setup (e.g., power and speaker only) to isolate issues.
  • Use the Serial monitor to debug communication between the microcontroller and the module.

By following this documentation, you should be able to successfully integrate the DF Player Mini into your projects and troubleshoot common issues effectively.