DY-SV17F MP3 Module

erco

Senior Member
2/16/22 Edit: added shuffle to attached program.
2/19/22 Edit: fixed BUSY conflict, see next post for updated hookup circuit


Starting a new thread on the DY-SV17F module I mentioned in Jeff Haas' thread on the YX5300 MP3 player. Unlike the YX5300, the DY-SV17F requires neither a micro SD card nor an amplifier. It's cheaper ([~$2 if you buy ten](https://www.aliexpress.com/item/4000531948607.html)) and has 4MB flash memory and a 5W audio amp onboard. It has a micro USB connector to load your MP3/WAV files through a USB cable, quick & easy. Control the player using 9600 baud SEROUT commands, running the 08M2 at 8 MHz.

Multiple modes are available but I'm primarily interested in UART control, where only 3 lines are needed to connect your Picaxe to the player, +5V, ground and serial data. 4MB is sufficient for many projects. For reference that's the size of a typical 3-minute song. You can have as many smaller files as you like, using the usual names, 0001xxx.mp3, 0002xxx.mp3 etc.

The module has 5 **EQ**ualizer settings for normal, pop, rock, jazz and classic! I can't confirm the 5-watt rating of the amplifier, but it's PLENTY loud on my tiny 8-ohm pillow speaker. BTW the 5W spec is for a 4-ohm speaker. As my video shows, I put two series LEDs in parallel with the speaker and they flicker with the sound.

Download the datasheet at https://electropeak.com/learn/interfacing-dy-sv17f-audio-mp3-player-module-with-arduino/# from https://electropeak.com/learn/interfacing-dy-sv17f-audio-mp3-player-module-with-arduino/

Issues:
1) It's a little finnicky about how the files are loaded, some of mine played out of numerical order when I copied them randomly and renamed on the board. This long recommended method works: _Empty the storage device.
Make sure there aren't any trash files on the storage device. **(I did a quick format)**
Copy the files in the order they should be played (it helps to have them named sequentially, sort by name and copy the files, usually they will be copied in sequence order_ but Jeff Hass recommends the utility DriveSort.

2) Pin 12 is a dual-use pin, initially used to set the mode, then to provide a BUSY output signal. I tried it and it does give a busy-low output but it generated motorboat noise in the audio output. The audio is good only if it's tied directly to +5V. So for now, no busy output, your program has to know how long each file is and act accordingly. (Edit: solved, see next post)

Here's my video showing both an 08M2 and another micro controlling it.


All of the various UART commands can be found in the datasheet. Some Picaxe examples sending data from pin c.2:

Play: serout c.2,T9600_8,($AA,$02,$00,$AC) has no argument, the final AC is a checksum for all the other values AA+02+00 (bust out Windows' calculator in programmer mode)

Next: serout c.2,T9600_8,($AA,$06,$00,$B0) no argument

Set EQ to jazz- 3: serout c.2,T9600_8,($AA,$1A,$01,$03,$C8) ' bolded for reference only

Play file 5 : serout c.2,T9600_8,($AA,$07,$02,$00,$05,$B8) ' bolded for reference only

Add a 100 ms pause between serial commands. Starter 08M2 code attached.

This module has lots of input pins and several modes to support triggering via external pushbuttons in lieu of UART control. Some detail at:

 

Attachments

Last edited:
Progress update: BUSY out works now after tweaking the circuit above. Previously there was noise during playback unless BUSY was disabled by connecting directly to +5V. I originally had the Picaxe serial output wired directly to the player's serial in, which ultimately caused the noise. That worked fine on a Parallax board, which has integral 220 ohm resistors. Adding a 220 or 330 ohm resistor solved the noise problem with Picaxe, likely a 5V/3.3V mismatch. Now adding a 10K pullup resistor on the module's BUSY pin 12 to +5V pin 13 gives a proper active high BUSY output signal, ~3V during playback and 0.2 V normally.

25268

 

Attachments

Erco - Thanks for taking the time to share this information with us, and for keeping us updated with your latest discoveries.
 
Yep agree great looking product Erco, another item to add to the list of boards to play with.
 
Got mine today - I learned that you need the 10K resistor even if you're not using the Busy line. The docs are a little hard to understand, but the module is configured for different modes based on how the CON (configure?) pins are set up.

To configure and hook up:
CON 1 and CON 2 connect to GND on the module, and CON 3 connects to 5V (via 10K resistor) - and that sets the module for UART mode. I just soldered a small 10K to the bottom between the 5V and CON 3 pins, and ran a wire from GND across to CON 1 and CON 2, which you can see in Erco's video.

Then connect:
5V - 5V
GND - GND
C.2 to RX pin on the module.
Plug a speaker into the SPK pins and run Erco's code.

Easy-peasy!
 
The datasheet (linked above) indicates it needs 5V to operate. The module can provide 3.3V on one of its pins.

And in reference to DriveSort, someone pointed me toward this YouTube tutorial on using it to sort the FAT on an SD card (using a much more expensive MP3 player).
 
Ok then, I just ordered a few to test if I can power them with 3.3v.
I will update the thread as soon as I have the results. Will take some time...
 
CON 1 and CON 2 connect to GND on the module, and CON 3 connects to 5V (via 10K resistor)
Just to note that the datasheet I looked at shows CON3/BUSY connected via 10K to 3V3 rather than 5V.

I would presume the chip is rated for 3V3. I would suggest an inline resistor between 5V PICAXE TX out and module RX at least, and a resistor divider to drop 5V to 3V3 would be recommended.
 
There are several modules that use the same chipset, but with different features. The basic one Erco shows has no additional hardware. I bought a more elaborate one with DIP switches and SD card support. The DIP switches allow you to toggle the CON pins on and off using resistors on the board - so no additional parts needed, and the SD card support gets you past the 4MB storage limit.
 
Ok then, I just ordered a few to test if I can power them with 3.3v.
I will update the thread as soon as I have the results. Will take some time...

Managed to get around testing this after I received the modules. For the test I used the "I/O Independent mode 0" with the examples files stored on the modules from the factory and the speaker used was a small 8ohm 0.5w.
I was able to get reliable playback of the sound files down to about 2.8v. At 2.7v the playback was distorted and often ended up in noise. The module worked great at 3.0v and of course at 3.3v, which was my initial concern.
 
Merry Christmas to all! I used this module in a Christmas gift for my daughter. It needed to run a motor during sound play. Had to be battery powered, 3X AA. Module drain was nearly 20 mA at idle so I had to disconnect battery power. Quick Christmas eve build (I like pressure), I had originally planned to slam in a Picaxe timer. But ultimately no Picaxe, instead I used a tiny 5V relay to switch battery power. Relay is initially triggered by button press, then held on by the module's 3.3V busy signal, which releases the relay after the sound cycle. You can hear the relay click off at the end.

 
Long time update: I just used this chip for the first time in standalone mode (no micro, 8 pushbuttons directly trigger 8 sounds) and it was quite particular about how the mode buttons were connected. Worked great after finding below info at: https://www.electro-tech-online.com/threads/image-light-and-music.165267/

For direct button control, connect CON1 to the GND pin, CON2 to the 3.3V pin and add a 10K resistor between CON3/Busy and GND; that's "Independent Mode 0".
(See the datasheet for other modes. CON1 & CON2 can connect directly to GND or 3,3V, CON3 also works as the Busy output so needs a resistor in line with the ground or 3.3V connection.)

A switch contact to GND or logic ground on IO0 will then trigger file 0001.mp3 to play.
(Or IO1 to play file 0002.mp3 etc).

If you wanted it to play as long as the movement sensor was triggered, use mode 1
 
Thanks for the tip Erco. I have been using those modules myself too with great results. Would be great if they would also support playing files from a USB flash drive instead of the onboard flash.
 
Would be great if they would also support playing files from a USB flash drive instead of the onboard flash.

I like these BECAUSE they don't require a microSD card, which would cost more than this whole module and probably increase the size. Also because these have a built-in amplifier and connect directly to a speaker.

The only drawback I'm aware of is that they draw 13mA on standby, so they still need an OFF switch.
 
I was hoping to avoid microSD due to the nightmares I still get with the DFPlayer mini - you need to have a compatible uSD card, most of the times my uSD cards end up really messed up. I know I can use USB on the DFPlayer, but I was hoping to move away from that module, too many clones are sold now and some of them don't support serial commands.
 
I've used the DFPlayer in many designs. Commercial ones that are used daily and are often powered off (at times) mid playback. I have never had a single complaint or request for a new uSD card. We tend to buy the cheapest and smallest branded cards available from Amazon too. The players we get are sourced from AliExpress often bought in batches of 50. In any delivery we might get one or two with bad soldering on the header pins that is easily rectified. I can only remember one that failed to work totally due to the audio amp being faulty. I saved that one, removed the amp chip and used it for a design that uses the pre-amp left and right outputs only. Finally I've never had any problems with the serial not working, that's the only control method I use.
 
Can the Track data be read from the module ? (ie: which track name is playing)
I have yet to find one that allows for this, this for me would be a great feature.
Does anyone know of such a module ?
I like many have used the DF player for many years now and this has always been the only issue ive found
Rgds
Neil
 
Back
Top