MP3
MP3
Up to 320 kbps
8 kHz to 48 kHz
Up to 32 GB
3.3V to 5V
Typically <50mA
35mm x 25mm
Approximately 5 grams
Applications
| The Mini DF Player is suitable for a wide range of IoT applications, including |
Smart home devices (e.g., voice assistants, audio alarm systems)
Wearable electronics (e.g., smart watches, fitness trackers)
Automation systems (e.g., industrial automation, robotics)
Consumer electronics (e.g., portable audio players, speakers)
Documentation and Resources
A detailed datasheet is available for the Mini DF Player, providing technical specifications, pinouts, and application notes.
A comprehensive user manual is available, covering assembly, configuration, and programming of the module.
Example code is provided for popular microcontrollers, such as Arduino and Raspberry Pi, to help users get started with their projects.
Ordering Information
The Mini DF Player is available for purchase from various online retailers and electronics suppliers. Be sure to check the product description and datasheet for specific ordering information, including package quantity, pricing, and lead time.
Mini DF Player DocumentationThe Mini DF Player is a compact, low-cost MP3 player module designed for use in IoT projects. It supports microSD cards and can play MP3 files stored on the card. This module is ideal for applications such as audio guidance systems, toys, and interactive exhibits.Pinout:VCC: 3.3V to 5V power supply
GND: Ground
RX: Serial data input (3.3V logic level)
TX: Serial data output (3.3V logic level)
DAC_R: Right channel audio output
DAC_L: Left channel audio output
SPK_+: Speaker positive terminal
SPK_-
Speaker negative terminalCommunication Protocol:The Mini DF Player communicates using a serial protocol at a baud rate of 9600. The module responds to a set of commands sent through the serial interface.Commands:`0x01`: Play the next track
`0x02`: Play the previous track
`0x03`: Play the first track
`0x04`: Play the last track
`0x05`: Pause playback
`0x06`: Resume playback
`0x07`: Volume up
`0x08`: Volume down
`0x09`: Play a specific track (followed by a 2-byte track number)Code Examples:### Example 1: Basic MP3 Playback using ArduinoThis example demonstrates how to play an MP3 file on the Mini DF Player using an Arduino board.
```c
#include <SoftwareSerial.h>#define RX_PIN 2 // Serial receive pin
#define TX_PIN 3 // Serial transmit pinSoftwareSerial dfPlayerSerial(RX_PIN, TX_PIN);void setup() {
Serial.begin(9600);
dfPlayerSerial.begin(9600);
}void loop() {
// Play the first track on the microSD card
dfPlayerSerial.write(0x03);
delay(1000);
}
```
### Example 2: Controlling the Mini DF Player using Python and Raspberry PiThis example demonstrates how to control the Mini DF Player using a Raspberry Pi and Python.
```python
import serial# Open the serial connection
ser = serial.Serial('/dev/ttyUSB0', 9600)# Play the next track
ser.write(b'x01')
ser.flush()# Pause playback
ser.write(b'x05')
ser.flush()# Resume playback
ser.write(b'x06')
ser.flush()
```
### Example 3: Playing a Specific Track using ESP32 and MicroPythonThis example demonstrates how to play a specific track on the Mini DF Player using an ESP32 board and MicroPython.
```python
import machine
import utime# Define the serial pins
RX_PIN = 16
TX_PIN = 17# Initialize the serial connection
uart = machine.UART(0, 9600, tx=TX_PIN, rx=RX_PIN)# Play track 5
uart.write(b'x09x05x00')
utime.sleep_ms(1000)
```
These examples demonstrate the basic usage of the Mini DF Player module. You can use these examples as a starting point to develop more complex applications that integrate audio playback with other IoT components.