Serial MP3 Player V1.0.1 Manual

Serial%20MP3%20Player%20v1.0.1%20Manual

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 10

Email: catalex_inc@163.com
1/10
Name: Serial MP3 Player manual
Version: v1.0.1
Date: Mar 17, 2015
©CATALEX
Email: catalex_inc@163.com
2/10
1 Description
The module is a kind of simple MP3 player device which is based on a high-quality MP3 audio
chip---YX5300. It can support 8k Hz ~ 48k Hz sampling frequency MP3 and WAV file formats.
There is a TF card socket on board, so you can plug the micro SD card that stores audio files. MCU
can control the MP3 playback state by sending commands to the module via UART port, such as
switch songs, change the volume and play mode and so on. You can also debug the module via USB
to UART module. It is compatible with Arduino / AVR / ARM / PIC.
Features
1. Support sampling frequency (kHz): 8 / 11.025 / 12 / 16 / 22.05 / 24 / 32 / 44.1 / 48
2. High quality
3. Support file format: MP3 / WAV
4. Support Micro SD card, Micro SDHC Card
5. 30 class adjustable volume
6. UART TTL serial control playback mode, baud rate is 9600bps
7. Power supply can be 3.2 ~ 5.2VDC
8. Control logic interface can be 3.3V / 5V TTL
9. Compatible with Arduino UNO / Leonardo / Mega2560 / DUE
Email: catalex_inc@163.com
3/10
2 Specification
Item
Min
Typical
Max
Unit
Power Supply(VCC)
3.2
5
5.2
VDC
Current(@VCC=5V)
/
/
200
mA
Logic interface
3.3V / 5V TTL
/
Supported Card Type
Micro SD card(<=2G);
Mirco SDHC card(<=32G)
/
File system format
Fat16 / Fat32
/
Uart baud rate
9600
bps
Dimensions
49X24X8.5
mm
Net Weight
5
g
Email: catalex_inc@163.com
4/10
3 Interface
Control interface: It is UART TTL interface. A total of four pins (GND, VCC, TX, RX), GND to
ground, VCC is the power supply, TX is the TX pin of the MP3 chip, RX is the RX pin of the MP3
chip.
TF card socket: The micro sd card can be plugged in it.
Playbck indicator: Green light. If it is ready to play or it is paused, it keeps lighting. If playing, it
blinks.
Headphone jack: It can be connected with the headphone or external amplifier.
Mounting holes: 4 screw mounting holes whose diameter is 2.2mm, so that the module is easy to
install, easy to combine with other modules.
Email: catalex_inc@163.com
5/10
4 Usage
4.1 About the commands
4.1.1 Asynchronous serial port control play mode:
Command bytes: $S VER Len CMD Feedback data $O
Mark
Byte
$S
0x7E
VER
0xFF
Len
0xxx
CMD
0xxx
Feedback
0xxx
data
$O
0xEF
4.1.2 Commonly Command bytes Descriptions:
Command
Command bytes without checksum(HEX)
Remark
[Next Song]
7E FF 06 01 00 00 00 EF
[Previous Song]
7E FF 06 02 00 00 00 EF
[Play with index]
7E FF 06 03 00 00 01 EF
Play the first song
7E FF 06 03 00 00 02 EF
Play the second song
[Volume up]
7E FF 06 04 00 00 00 EF
Volume increased one
[Volume down]
7E FF 06 05 00 00 00 EF
Volume decrease one
[Set volume]
7E FF 06 06 00 00 1E EF
Set the volume to 30 (0x1E is 30)
[Single cycle play]
7E FF 06 08 00 00 01 EF
Single cycle play the first song
[Select device]
7E FF 06 09 00 00 02 EF
Select storage device to TF card
[Sleep mode]
7E FF 06 0A 00 00 00 EF
Chip enters sleep mode
[Wake up]
7E FF 06 0B 00 00 00 EF
Chip wakes up
[Reset]
7E FF 06 0C 00 00 00 EF
Chip reset
[Play]
7E FF 06 0D 00 00 00 EF
Resume playback
[Pause]
7E FF 06 0E 00 00 00 EF
Playback is paused
[Play with folder and file name]
7E FF 06 0F 00 01 01 EF
Play the song with the directory:
/01/001xxx.mp3
7E FF 06 0F 00 01 02 EF
Play the song with the directory:
/01/002xxx.mp3
[Stop play]
7E FF 06 16 00 00 00 EF
[Cycle play with folder name]
7E FF 06 17 00 01 02 EF
01 folder cycle play
[Set single cycle play]
7E FF 06 19 00 00 00 EF
Start up single cycle play
7E FF 06 19 00 00 01 EF
Close single cycle play
Email: catalex_inc@163.com
6/10
[Set DAC]
7E FF 06 1A 00 00 00 EF
Start up DAC output
7E FF 06 1A 00 00 01 EF
DAC no output
[Play with volume]
7E FF 06 22 00 1E 01 EF
Set the volume to 30 (0x1E is 30)
and play the first song
7E FF 06 22 00 0F 02 EF
Set the volume to 15(0x0f is 15) and
play the second song
4.2 Use USB to Uart TTL module
(1) You need a USB to Uart TTL module (such as USB/Serial Adapter) to connect
Serial MP3 Player to PC. The hardware installation as show below:
(2) After the connection is completed, open the sscom32 serial tool that you can
down load from catalex net disk to send commands. About the specific commands,
please refer to 4.1.1 part.
(3) Click the EXT button and then you can manage the commands to be sent.
Email: catalex_inc@163.com
7/10
(3) Baud rate should be 9600. Tick HEX and HexData so that the command can be
received by the Serial MP3 Player and you can see the feedback information (refer to
the file YX5300-24SS Datasheet V1.0.pdf) in the blank of the window. Before
sending commands, you should select the [ComNum] and click [Open Com].
Email: catalex_inc@163.com
8/10
(4) Make sure your micro sd card is formatted as FAT16 or FAT32 and there is some
songs in it. May be you should creat folder “01” and “02”, and put some songs
with the name 001xxx.mp3 / 002xxx.mp3 / 003xxx.mp3 in the two folder. Some
commands need them.
(5) After power up, you should send the command [Select device] first. Serial MP3 Player
only supports micro sd card, so you should send “ 7E FF 06 09 00 00 02 EF ”.
Then you can send the command [Play with index] to play some song.
You can send the command [Set volume] to set the volume(0 ~ 30 class).
More operations ? Please refer to 4.1.1 part.
4.3 Use Arduino UNO R3
4.3.1 Project1: Simple test for the player.
Step1: Material preparation
1x Arduino UNO R3
1x USB Cable
1x Serial MP3 Player
1x Base Shield
4x Female to Female Dupont cables
Step2: Hardware install
(1)Plug the Base Shield which is just the I/O expansion board to Arduino UNO R3.
(2)Connect the modules and Base Shield with the cables:
Serial MP3 Player
Wire
Base Shield
GND
<--->
GND
VCC
<--->
5V
TX
<--->
D5
RX
<--->
D6
(3)Make sure your micro sd card is formatted as FAT16 or FAT32 and there is some songs in it.
May be you should creat folder “01” and “02”, and put some songs with the name 001xxx.mp3 /
002xxx.mp3 / 003xxx.mp3 in the two folder. Some commands need them.
Plug the micro sd card into the TF card socket on the Serial MP3 Player, and then plug the
headphone.
Email: catalex_inc@163.com
9/10
Step3: Power on
Use the USB cable to connect the Arduino UNO R3 and PC.
Step4: Upload the demo code
Download the demo code (SerialMP3PlayerDemoforArduino-1.0.zip), and unzip it to your code
project folder such as ../Arduino-1.0/MyProject. And then upload the code to your arduino UNO R3.
Step5: Enjoy yourself
Push the reset button on the Base Shield to play the first song in the micro sd card.
Step6: Power off
Unplug USB cable.
4.3.2 Project2: Use some modules to control the player. Enjoy!
Step1: Material preparation
1x Arduino UNO R3
1x USB Cable
1x Serial MP3 Player
1x Base Shield
1x Touch Sensor
1x Rotary Angle Sensor
10x Female to Female Dupont cables
Step2: Hardware install
(1)Plug the Base Shield which is just the I/O expansion board to Arduino UNO R3.
(2)Connect the modules and Base Shield with the cables:
Wire
Base Shield
GND
<--->
GND
VCC
<--->
5V
TX
<--->
D5
RX
<--->
D6
Touch Sensor
Wire
Base Shield
GND
<--->
GND
VCC
<--->
5V
SIG
<--->
D2
Rotary Angle Sensor
Wire
Base Shield
GND
<--->
GND
VCC
<--->
5V
SIG
<--->
A0
Email: catalex_inc@163.com
10 /10
(3)Make sure your micro sd card is formatted as FAT16 or FAT32 and there is some songs in it. May
be you should creat folder “01” and “02”, and put some songs with the name 001xxx.mp3 /
002xxx.mp3 / 003xxx.mp3 in the two folder. Some commands need them.
Plug the micro sd card into the TF card socket on the Serial MP3 Player, and then plug the
headphone.
Step3: Power on
Use the USB cable to connect the Arduino UNO R3 and PC.
Step4: Upload the demo code. If you have download in Project1, skip this step.
Download the demo code (SerialMP3PlayerDemoforArduino-1.0.zip), and unzip it to your code
project folder such as ../Arduino-1.0/MyProject. And then upload the code to your arduino UNO R3.
Step5: Enjoy yourself
Push the reset button on the Base Shield. In the process that the Rotation Angle Sensor is
rotated from the 'Min' side to the 'Max' side, the volume is gradually greater. If you touch the Touch
Sensor,it will play or pause.
About more specific commands, please refer to 4.1.1 part.
Step6: Power off
Unplug USB cable.
5 Part List
1x Serial MP3 Player Module
Documents download link: http://pan.baidu.com/s/1hqilpB2

Navigation menu