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:

erco

Senior Member
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

Jack Burns

New Member
Erco - Thanks for taking the time to share this information with us, and for keeping us updated with your latest discoveries.
 

Rampz

Well-known member
Yep agree great looking product Erco, another item to add to the list of boards to play with.
 

Jeff Haas

Senior Member
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!
 

Jeff Haas

Senior Member
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).
 

steliosm

Senior Member
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...
 

hippy

Technical Support
Staff member
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.
 

Jeff Haas

Senior Member
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.
 

steliosm

Senior Member
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.
 

erco

Senior Member
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.

 
Top