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

How to Use DFRobot DFPlayer Mini: Examples, Pinouts, and Specs

Image of DFRobot DFPlayer Mini
Cirkit Designer LogoDesign with DFRobot DFPlayer Mini in Cirkit Designer

Introduction

The DFRobot DFPlayer Mini is a compact and cost-effective MP3 player module designed for embedded audio applications. It can play audio files directly from a micro SD card and features a built-in amplifier, making it suitable for standalone or microcontroller-based projects. The module supports various audio formats, including MP3, WAV, and WMA, and offers multiple control modes such as serial communication, AD key control, and GPIO control.

Explore Projects Built with DFRobot DFPlayer 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!
Arduino-Controlled MP3 Player Circuit
Image of Hrl_d: A project utilizing DFRobot DFPlayer 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
Battery-Powered MP3 Player with Seeed Studio nRF52840 and OLED Display
Image of MP3 player: A project utilizing DFRobot DFPlayer 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 DFRobot DFPlayer 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
Arduino Nano Controlled MP3 Player with Real-Time Clock
Image of azanbox: A project utilizing DFRobot DFPlayer Mini in a practical application
This circuit features an Arduino Nano microcontroller that controls a DFPlayer Mini MP3 player module and keeps track of time with an RTC DS3231 module. Audio output is handled by a loudspeaker connected to the DFPlayer Mini, and the system is powered via a USB connection with power distribution managed by wire connectors.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with DFRobot DFPlayer 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 Hrl_d: A project utilizing DFRobot DFPlayer 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
Image of MP3 player: A project utilizing DFRobot DFPlayer 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 DFRobot DFPlayer 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 azanbox: A project utilizing DFRobot DFPlayer Mini in a practical application
Arduino Nano Controlled MP3 Player with Real-Time Clock
This circuit features an Arduino Nano microcontroller that controls a DFPlayer Mini MP3 player module and keeps track of time with an RTC DS3231 module. Audio output is handled by a loudspeaker connected to the DFPlayer Mini, and the system is powered via a USB connection with power distribution managed by wire connectors.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Voice prompts in IoT devices
  • Audio playback in interactive installations
  • Alarm systems with custom sound effects
  • Educational projects and DIY audio systems
  • Embedded systems requiring pre-recorded audio

Technical Specifications

Key Technical Details

  • Operating Voltage: 3.2V to 5.0V
  • Operating Current: 20mA to 30mA
  • Audio Formats Supported: MP3, WAV, WMA
  • Storage Medium: Micro SD card (up to 32GB, FAT16/FAT32 format)
  • Output Modes:
    • DAC output for external amplifier
    • Built-in 3W mono amplifier for direct speaker connection
  • Control Modes:
    • Serial communication (UART)
    • AD key control
    • GPIO control
  • Sampling Rate: 8kHz to 48kHz
  • Dimensions: 22mm x 20mm x 3.3mm

Pin Configuration and Descriptions

The DFPlayer Mini has 16 pins, but not all are required for basic operation. Below is the pinout:

Pin Name Description
1 VCC Power supply input (3.2V to 5.0V).
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 output (built-in amplifier).
7 SPK_2 Negative terminal for speaker output (built-in amplifier).
8 GND Ground connection.
9 IO_1 GPIO control pin 1.
10 IO_2 GPIO control pin 2.
11 ADKEY1 Analog key input for control.
12 ADKEY2 Analog key input for control.
13 BUSY Output pin that indicates playback status (LOW = playing, HIGH = idle).
14 USB+ USB positive data line (not commonly used).
15 USB- USB negative data line (not commonly used).
16 RESET Reset pin to restart the module.

Usage Instructions

How to Use the DFPlayer Mini in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source and GND to ground.
  2. Speaker Connection: For direct speaker output, connect a small 3W speaker to SPK_1 and SPK_2. For external amplification, use DAC_L and DAC_R.
  3. Microcontroller Interface: Connect the RX and TX pins to the UART pins of a microcontroller (e.g., Arduino UNO).
  4. Micro SD Card Preparation:
    • Format the card as FAT16 or FAT32.
    • Store audio files in the root directory or folders. File names should be numeric (e.g., 0001.mp3, 0002.mp3).
  5. Control Mode: Use serial commands, GPIO, or AD key inputs to control playback.

Important Considerations and Best Practices

  • Use a decoupling capacitor (e.g., 100µF) between VCC and GND to stabilize the power supply.
  • Avoid connecting both the speaker and DAC outputs simultaneously to prevent damage.
  • Ensure the micro SD card is properly formatted and files are named correctly.
  • Use a logic level shifter if interfacing with a 3.3V microcontroller to avoid damaging the module.

Example: Using DFPlayer Mini with Arduino UNO

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

  // Send initialization commands to DFPlayer 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)
}

void loop() {
  // Play the first audio file (0001.mp3)
  sendCommand(0x03, 0, 1); // Play track 1
  delay(5000);             // Wait for 5 seconds

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

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

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

  // Construct the command packet
  uint8_t packet[] = {
    0x7E,        // Start byte
    0xFF,        // Version
    0x06,        // Length
    command,     // Command
    0x00, param1, // Parameter 1
    param2,      // Parameter 2
    (uint8_t)(checksum >> 8), // Checksum high byte
    (uint8_t)(checksum & 0xFF), // Checksum low byte
    0xEF         // End byte
  };

  // Send the packet to the DFPlayer Mini
  for (uint8_t i = 0; i < sizeof(packet); i++) {
    mySerial.write(packet[i]);
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Sound Output:

    • Ensure the speaker is properly connected to SPK_1 and SPK_2.
    • Verify that the audio file format is supported (MP3, WAV, or WMA).
    • Check the micro SD card for proper formatting (FAT16/FAT32) and file naming.
  2. Module Not Responding:

    • Confirm that the RX and TX pins are correctly connected to the microcontroller.
    • Check the power supply voltage (3.2V to 5.0V).
    • Use a logic level shifter if interfacing with a 3.3V microcontroller.
  3. Playback Stops Unexpectedly:

    • Ensure the micro SD card is securely inserted.
    • Check for corrupted audio files or a damaged micro SD card.
  4. Distorted Audio:

    • Verify that the speaker impedance matches the module's specifications.
    • Avoid exceeding the maximum volume level (30).

FAQs

  • Can I use a USB drive instead of a micro SD card? No, the DFPlayer Mini does not support USB drives for audio playback.

  • What is the maximum speaker power supported? The built-in amplifier supports up to 3W speakers.

  • Can I control the module without a microcontroller? Yes, you can use AD key control or GPIO pins for basic functionality.