Introduction: Control MP3 Player Using Arduino Programmed by XOD

About: Electrical Engineer

In this tutorial, we will use XOD software to program Arduino Nano to control The Catalex YX5300 Serial MP3 player module.

Basic Operation:

1-Pin 5 and Pin 6 will be configured as soft RX and TX UART in arduino Nano and connected to TX and RX of MP3 module.
2-If any of the 6 pushbuttons pressed, The Arduino will send 8 bytes command through the soft UART to MP3 module.

3-The MP3 player will take the action like "play, resume, pause" once it received all the 8 bytes.

Check the attached datasheet for MP3 player for more information.

Step 1: Hardware Parts

The hardware parts needed are :

1-Arduino Nano.

2-Catalex Serial MP3 Player Module YX5300.

3-Speaker with axillary input or headphone.

4-Micro SD card.

5-Six mini pushbuttons switches.

6-Breadboard wires.

7-Breadboard.

You might need an SD card reader to copy your MP3 files to your SD card if your laptop doesn't have a card reader.

Step 2: Circuit Digram

We will connect our circuit as shown in the attached wiring diagram.

Pins Connections:

TX of MP3 module --D5

RX of MP3 module—D6

PB1—D7

PB2—D8

PB3—D9

PB4—D10

PB5—D11

PB6—D12

VCC—5 volt

GND—GND

Step 3: Micro SD Card Setup

1-Format the Micro SD or Mirco SDHC card as FAT16 or FAT32.

2-Create folder “01” and “02”.

3-Put some songs with the name 001xxx.mp3 /002xxx.mp3 / 003xxx.mp3 in the two folders. Some commands need them. This is mentioned in the datasheet for the mp3 module, however, keeping the file name without changing didn't affect cause any problem.

4-Plugin the micro SD card into the TF card socket on the Serial MP3 Player.

Step 4: What Is XOD

XOD is a free open source and powerful visual programming software for microcontrollers.

It uses a graphical interface that represents hardware and computing elements as nodes that can be wired together to allow data flow between the objects.

Download and Install XOD software on your PC from the link below.

https://xod.io/

Run XOD.

Go to file.

Click on add library.

Search for "catalex" and double click on "hushamjawad1982/catalex-mp3" library to download.

Follow the steps in the video.

Microcontroller Contest

Participated in the
Microcontroller Contest