Arduino Hands-On: Mini MP3 Player Using the YX5200-24SS Chip

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search

Experiment: MP3 Player Open-source Mini MP3 Player with SD Card Music DF Player Module (YX5200-24SS Chip) The YX5200-24SS is an MP3 chip offering a serial interface and excellent hard decoding for MP3 and WMV formats. It supports software-driven operations for TF cards, USB drives, and external FLASH storage. Additionally, it is compatible with both FAT16 and FAT32 file systems. By using simple serial commands, you can play specific music tracks and perform various functions without engaging in complex low-level programming. Its ease of use, stability, and reliability are the standout features of thisproduct.

YX5200-24SS Serial Voice Chip Specifications: MP3 File Format: Supports all bit rates 11172-3 and ISO13813-3 layer audio decoding, Sampling Support (KHZ): 8/11.025/12/16/22.05/24/32/44.1/48, supports music styles like Normal, Lazz, Classic, Pop, ROCK, etc. USB Interface: Standard 2.0 UART Interface: Standard serial port, TTL level, adjustable baud rate Input Voltage: 3.3-5V Rated Current: 15mA (without USB drive) Dimensions: 8.4*8mm Package: SSOP24 Operating Temperature: -40°C to 80°C Humidity: 5% - 95%

Key Features: Supports Sampling Rates (KHz): 8/11.025/12/16/22.05/24/32/44.1/48 24-bit DAC output, dynamic range support of 90dB, signal-to-noise ratio support of 85dB Full support for FAT16, FAT32 file systems, maximum support for 32G TF cards and USB drives Multiple control modes: parallel control mode, serial mode, key control mode Broadcast language interlude function, can pause the background music being played Audio data sorted by folders, supports up to 100 folders, each folder can be assigned up to 1000 songs Supports line-in function Supports microphone amplification and paging function Supports sound card function and also supports inline control headphone function 30-level adjustable volume, 10 adjustable EQ settings Supports external NORFLASH and NANDFLASH. Onboard default support for NORFLASH


Application Areas:

Automotive navigation voice prompts Highway transportation inspectors, toll booth voice reminders Railway and bus safety inspection voice prompts Voice alerts for power, communications, and financial operations rooms Vehicle access gates for verification voice prompts Border channel voice prompts Multi-channel voice alarm or voice navigation device operation Electric sightseeing buses with safety announcements Electromechanical equipment failure alarms Fire alarm voice prompts Automatic playback devices for scheduled playback


The Mini MP3 Player Module is a compact and affordable MP3 module that can be directly connected to a speaker. When combined with a power supply battery, speaker, and buttons, it can function independently or be controlled via a serial port by an UNO board or any microcontroller with a serial interface. This module integrates robust hard decoding for MP3, WAV, and WMA formats. The software supports TF card operation and is compatible with FAT16 and FAT32 file systems. With straightforward serial commands, you can play specific music tracks and execute other functions without delving into complex low-level programming. It is easy to use, stable, and reliable.


Module Operating Modes

1.Serial Mode The module supports asynchronous serial communication mode, receiving control commands through the serial port. AD Key Mode: The module also supports AD key control mode, which replaces the traditional matrix keyboard connection method. This approach takes full advantage of the MCU's increasingly powerful AD functionality. The design is simple yet sophisticated, and our module is pre-configured with 2 AD ports and a resistor network to accommodate 20 keys. Some Points to Note When Using the Module: DFPlayer Mini can read MP3 & WAV file formats, but it cannot play files shorter than 1 second. All music files must be placed in the /mp3 folder. Music file names must consist of 4 characters, such as 0001.mp3, 0002.mp3...0255.mp3. There are no restrictions on music file names longer than 4 characters, for example, 0001_Bruno_Mars_Count_On Me.mp3 is acceptable. Even if you delete a file from the SD card, the DFPlayer Mini may still be able to play it. I successfully played the desired music files only after reformatting the SD card.

The Delay(sec) command instructs the Arduino on how long the music should play. If the specified duration is too short and a subsequent command is issued to play another track, the Arduino will halt the current playback and move on to the next song. The mp3_play (74) command plays the 0074.mp3 file. Do not directly supply the DFPlayer Mini with 5V from Arduino; make sure to provide separate power to the DFPlayer Mini to avoid loud noise from the speaker. During testing, the average current consumption is around 150mA, and the module may get hot, so it's important to monitor and control the current. It was discovered that using different libraries for this module results in completely different control statements.


TAG:Music Player Module;YX5200-24SS Chip;electronic components