# How to use DY-SV5W mp3 player?

**URL:** <https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247>\
**Category:** Audio\
**Created:** [January 31, 2024, 1:00pm UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247 "2024-01-31T13:00:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![retro\_0](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@retro\_0](https://forum.arduino.cc/u/retro_0)\
**Post date:** [January 31, 2024, 1:00pm UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/1 "2024-01-31T13:00:45Z")

</div>

First of all, my project started with my colleague wanting to make a sound effect so that he can have fun with the kids when he's in a video class with them.

I don't know much about software programs… I tried using Arduino, so I used Arduino.

That's why I tried to use "DY-SV5W MP3 Player," which can be adjusted in volume, to avoid excessive volume when playing sound effects after connecting aux cable to the PC.

However, I wrote here because I was frustrated that the music wouldn't play even if I did the same thing as many examples or other people did on YouTube.

My plan is to build a device using buttons with 5 3pins, DY-SV5W Player and Arduino Micro.

I want to play a cheering button or sound effect that children will like every time I press each button, but I heard that the name is also important when saving it on the 16GB SD card.

Is it possible to operate it in an easy way?

 ![DY-SV5W Blue](https://europe1.discourse-cdn.com/arduino/original/4X/1/d/f/1df0c657d1d6046b3d1609a5a51e15d1bfb7cb3f.jpeg)

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2024, 1:36am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/2 "2024-02-01T01:36:03Z")

</div>

Can you show the work you did (circuit diagram, datasheets and code). Post the link to your reference here, and we will try to make it work.

A note: if you tried something that others made a working model, and yours did not work, you did not do "the same thing" and you need to pay closer attention to the details.

---

<div class="post-metadata">

**Author:** ![retro\_0](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@retro\_0](https://forum.arduino.cc/u/retro_0)\
**Post date:** [February 1, 2024, 3:31am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/3 "2024-02-01T03:31:37Z")

</div>

```arduino
#include <Arduino.h>
#include <SoftwareSerial.h>
#include "DYPlayerArduino.h"

DY::Player player;

const int buttonPin = 7;

void setup() 
{
  player.begin();
  player.setVolume(15); 
  pinMode(buttonPin, INPUT_PULLUP);
  Serial.begin(9600); 
}

void playMusic() 
{
  char path[] = "testsong.mp3";
  player.playSpecifiedDevicePath(DY::Device::Flash, path);
  Serial.println("Music played!");
  delay(5000); 
}

void loop() 
{
  if (digitalRead(buttonPin) == LOW) {
    playMusic();
    while (digitalRead(buttonPin) == LOW) 
{

    }
  }
}

```

First of all, for the process of playing music when the button is pressed, we focus only on playing music when the button connected to the microboard pin 7 is pressed.

Also, the DY board has an i/o channel, so I looked it up and found out that the instructions said to turn on 2 times to communicate rx and tx, so I tried with it open only twice.

I'm still drawing a circuit diagram with an image  
If possible, I will even upload it later.

I'm sure there's a lot to be desired because I'm using a translator  
Thank you for your interest.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2024, 3:58am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/4 "2024-02-01T03:58:39Z")

</div>

It looks like you are using the "play song by path" sketch... Do you have your files in the root director? Should the filenames be DOS 8.3? Filename would begin with "/" (root), be a 5-character, sequential number, and have ALL CAPITAL 3-character extension, for example "/00001.MP3"

---

<div class="post-metadata">

**Author:** ![retro\_0](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@retro\_0](https://forum.arduino.cc/u/retro_0)\
**Post date:** [February 1, 2024, 4:13am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/5 "2024-02-01T04:13:06Z")

</div>

The music name is 0001 and I've tried 4 digits, but I didn't know it should be 5 digits...

I will change "testsong.mp3" to "00001.mp3" in the code, change the name to 00001 and try it again, and I will answer you again.

Can the code work, if I try?  
It doesn't look like a problem, does it?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2024, 4:15am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/6 "2024-02-01T04:15:01Z")

</div>

> [@retro\_0](#):
>
> 00001.mp3

Not "mp3" but "MP3"... it is old DOS file naming called 8.3.

---

<div class="post-metadata">

**Author:** ![retro\_0](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@retro\_0](https://forum.arduino.cc/u/retro_0)\
**Post date:** [February 1, 2024, 7:31am UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/7 "2024-02-01T07:31:57Z")

</div>

> [@xfpd](#):
>
> Not "mp3" but "MP3"... it is old DOS file naming called 8.3.

If you don't mind, can you tell me more about it?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2024, 2:07pm UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/8 "2024-02-01T14:07:54Z")

</div>

> **[8.3 filename](https://en.wikipedia.org/wiki/8.3_filename)**
>
> An 8.3 filename (also called a short filename or SFN) is a filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.5. It is also used in modern Microsoft operating systems as an alternate filename to the long filename, to provide compatibility with legacy programs. The filename convention is limited by the FAT file system. Similar 8.3 file naming schemes have also existed on earlier CP/M, TRS-80, Atari, and some Data General and Di 8....

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2024, 6:23pm UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/9 "2024-02-01T18:23:35Z")

</div>

@retro_0 - As you use files with Arduino, all file names will need 8.3 naming in ALL-CAPITAL letters... and I believe the SD must be formatted FAT16.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 30, 2024, 6:24pm UTC](https://forum.arduino.cc/t/how-to-use-dy-sv5w-mp3-player/1218247/10 "2024-07-30T18:24:25Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
