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

How to Use YX5300 MP3 Player Module: Examples, Pinouts, and Specs

Image of YX5300 MP3 Player Module
Cirkit Designer LogoDesign with YX5300 MP3 Player Module in Cirkit Designer

Introduction

The YX5300 MP3 Player Module is a compact and versatile audio playback module manufactured by Yuanze Semiconductor. It is designed to simplify the integration of audio functionality into electronic projects. The module supports MP3 and WAV audio formats and features a built-in microSD card slot for audio file storage. It can be controlled via UART serial communication, making it compatible with microcontrollers like Arduino, Raspberry Pi, and other embedded systems.

Explore Projects Built with YX5300 MP3 Player Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
A-Star 32U4 Mini Controlled MP3 Player with Loudspeaker
Image of Speaker: A project utilizing YX5300 MP3 Player Module in a practical application
This circuit integrates an A-Star 32U4 Mini microcontroller with an MP3 Decoder Player Module to create a basic MP3 player system. The microcontroller is likely used to control playback functions such as mode selection and track navigation, as indicated by the connections to the Mode, Repeat, Prev/V--, and Next/V++ pins of the MP3 module. The Loudspeaker is connected to the MP3 module to output the audio signal.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered MP3 Player with Amplified Dual Speakers
Image of bluethooth speaker( 2 speaker): A project utilizing YX5300 MP3 Player Module in a practical application
This circuit is a portable audio playback system powered by two 18650 Li-ion batteries, which are charged and protected by a TP4056 module. The MP3 module provides audio signals to a 5V amplifier board, which then drives two speakers. A push switch is used to control the power to the MP3 module and amplifier.
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 YX5300 MP3 Player Module 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
Arduino Nano Controlled Joystick Interface with Audio Playback
Image of sign language to speech converter using joystick module: A project utilizing YX5300 MP3 Player Module in a practical application
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module and a DFPlayer Mini MP3 player module. The joystick provides input to the Arduino, which controls the playback of audio files from the DFPlayer Mini that outputs sound through a connected loudspeaker. The circuit is powered by a 9V battery connected to the Arduino's VIN and GND pins, with the Arduino providing regulated 5V to power the other components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with YX5300 MP3 Player Module

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 Speaker: A project utilizing YX5300 MP3 Player Module in a practical application
A-Star 32U4 Mini Controlled MP3 Player with Loudspeaker
This circuit integrates an A-Star 32U4 Mini microcontroller with an MP3 Decoder Player Module to create a basic MP3 player system. The microcontroller is likely used to control playback functions such as mode selection and track navigation, as indicated by the connections to the Mode, Repeat, Prev/V--, and Next/V++ pins of the MP3 module. The Loudspeaker is connected to the MP3 module to output the audio signal.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of bluethooth speaker( 2 speaker): A project utilizing YX5300 MP3 Player Module in a practical application
Battery-Powered MP3 Player with Amplified Dual Speakers
This circuit is a portable audio playback system powered by two 18650 Li-ion batteries, which are charged and protected by a TP4056 module. The MP3 module provides audio signals to a 5V amplifier board, which then drives two speakers. A push switch is used to control the power to the MP3 module and amplifier.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MP3 player: A project utilizing YX5300 MP3 Player Module 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 sign language to speech converter using joystick module: A project utilizing YX5300 MP3 Player Module in a practical application
Arduino Nano Controlled Joystick Interface with Audio Playback
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module and a DFPlayer Mini MP3 player module. The joystick provides input to the Arduino, which controls the playback of audio files from the DFPlayer Mini that outputs sound through a connected loudspeaker. The circuit is powered by a 9V battery connected to the Arduino's VIN and GND pins, with the Arduino providing regulated 5V to power the other components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Audio playback in IoT devices
  • Voice prompts and notifications in embedded systems
  • Interactive kiosks and vending machines
  • Educational and hobbyist projects
  • Alarm and alert systems

Technical Specifications

The following table outlines the key technical details of the YX5300 MP3 Player Module:

Parameter Specification
Operating Voltage 3.2V to 5.0V
Communication Interface UART (9600 bps default baud rate)
Audio Formats Supported MP3, WAV
Storage MicroSD card (up to 32GB, FAT16/FAT32)
Output Stereo audio output, built-in amplifier
Power Consumption < 20mA (idle), < 100mA (playback)
Dimensions 45mm x 36mm x 7mm

Pin Configuration and Descriptions

The YX5300 module has a total of 6 pins. The table below describes each pin:

Pin Name Description
1 VCC Power supply input (3.2V to 5.0V). Connect to the 5V pin of your microcontroller.
2 GND Ground connection. Connect to the ground of your circuit.
3 TX UART Transmit pin. Sends data to the microcontroller.
4 RX UART Receive pin. Receives data from the microcontroller.
5 SPK1 Speaker output 1. Connect to one terminal of a speaker.
6 SPK2 Speaker output 2. Connect to the other terminal of a speaker.

Usage Instructions

How to Use the YX5300 in a Circuit

  1. Power the Module: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Connect to a Microcontroller:
    • Connect the TX pin of the YX5300 to the RX pin of the microcontroller.
    • Connect the RX pin of the YX5300 to the TX pin of the microcontroller.
  3. Audio Output:
    • For speaker output, connect a small speaker (4Ω or 8Ω) to the SPK1 and SPK2 pins.
    • Alternatively, use the stereo audio output pins (if available) for external amplifiers or headphones.
  4. Insert a microSD Card:
    • Format the microSD card to FAT16 or FAT32.
    • Load MP3 or WAV files onto the card and insert it into the module's slot.
  5. Control the Module:
    • Use UART commands to control playback, volume, and track selection.

Important Considerations and Best Practices

  • Ensure the microSD card is properly formatted and contains supported audio files.
  • Use a level shifter if your microcontroller operates at 3.3V logic levels to avoid damaging the module.
  • Avoid connecting high-power speakers directly to the module; use an external amplifier if needed.
  • Keep the UART communication baud rate at 9600 bps unless reconfigured.

Example Code for Arduino UNO

Below is an example of how to control the YX5300 module using an Arduino UNO:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial mp3Serial(10, 11); // RX = Pin 10, TX = Pin 11

void setup() {
  mp3Serial.begin(9600); // Initialize serial communication with the module
  Serial.begin(9600);    // Initialize serial monitor for debugging

  delay(500); // Allow the module to initialize

  // Send command to play the first track
  playTrack(1);
}

void loop() {
  // Add your logic here (e.g., play next track, pause, etc.)
}

// Function to send a command to play a specific track
void playTrack(uint16_t trackNumber) {
  uint8_t command[] = {0x7E, 0xFF, 0x06, 0x03, 0x00, 
                       (uint8_t)(trackNumber >> 8), 
                       (uint8_t)(trackNumber & 0xFF), 0xEF};
  sendCommand(command, sizeof(command));
}

// Function to send a command to the YX5300 module
void sendCommand(uint8_t *command, uint8_t length) {
  for (uint8_t i = 0; i < length; i++) {
    mp3Serial.write(command[i]);
  }
}

Notes on the Code

  • The playTrack() function sends a command to play a specific track by its number.
  • The command format follows the YX5300 protocol, which uses a fixed structure for UART communication.
  • Ensure the RX and TX pins are correctly connected to the Arduino.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Sound Output:

    • Verify the speaker connections to SPK1 and SPK2.
    • Check that the microSD card is properly inserted and contains supported audio files.
    • Ensure the module is receiving power (3.2V to 5.0V).
  2. Module Not Responding to Commands:

    • Confirm the RX and TX connections between the module and microcontroller.
    • Ensure the UART baud rate is set to 9600 bps.
    • Check for loose or incorrect wiring.
  3. Audio Playback is Distorted:

    • Use a speaker with the recommended impedance (4Ω or 8Ω).
    • Avoid overdriving the module by connecting high-power speakers directly.
  4. MicroSD Card Not Recognized:

    • Format the card to FAT16 or FAT32.
    • Ensure the card capacity does not exceed 32GB.

FAQs

Q: Can the YX5300 play audio files in formats other than MP3 or WAV?
A: No, the module only supports MP3 and WAV formats.

Q: What is the maximum number of tracks the module can handle?
A: The module can handle up to 255 tracks in a single folder.

Q: Can I use the YX5300 with a 3.3V microcontroller?
A: Yes, but you should use a level shifter to safely interface the UART pins.

Q: Is it possible to control the volume programmatically?
A: Yes, the module supports UART commands to adjust the volume.

Q: Does the module support playback from USB drives?
A: No, the YX5300 only supports playback from microSD cards.