Shop Learn
My New Favorite MP3 Module — Parallax Forums

My New Favorite MP3 Module

ercoerco Posts: 20,137
edited 2022-02-19 01:53 in General Discussion

I've used the Catalex YX5300 MP3 module many times, and written about it in SERVO magazine. But there's a new chip in town, or new to me anyway, which requires neither a micro SD card nor an amplifier. The DY-SV17F is cheap (~$2.37 each shipped if you buy ten) 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 serial commands, so a vanilla BS2 can play too. Sorry BS1, you max out at 2400 baud.

Multiple modes are available but I'm primarily interested in UART control, where only 3 lines are needed to control the player with your micro: +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 EQualizer 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 clean only if pin 12 is 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 4 posts down.

3) My BS2 Homework Board was resetting on max volume (power spikes) until I put a 1000 uF filter cap across the connector on top of the breadboard between Vdd and Vss.

Here's my video showing both a BS2 and _another micro _controlling it.

All of the various UART commands can be found in the datasheet. Some BS2 examples sending data from pin 15:

Play: SEROUT 15,84,[$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 15,84,[$AA,$06,$00,$B0] no argument

Set EQ to jazz-3: SEROUT 15,84,[$AA,$1A,$01,$03,$C8] ' bolded for reference only

Play file 5: SEROUT 15,84, [$AA,$07,$02,$00,$05,$B8] ' bolded for reference only

Add a 100 ms pause between serial commands. Simple BS2 code to play files in numerical order attached.

This module has lots of input pins and several modes to support triggering via external pushbuttons in lieu of UART control. So a BS1 could probably trigger several sounds using high/low commands. Some detail at:

bs2
340B

Comments

  • Cluso99Cluso99 Posts: 18,057

    Interesting module for sure :sunglasses:

  • PublisonPublison Posts: 12,316

    I have been using the Catalax in a few projects with good results, but not having to use a SD card and on board amp sounds like I need to check these out.

  • ercoerco Posts: 20,137

    They are definitely worth trying IMO. I just ordered ten more, I keep think up new projects to use them in.

  • ercoerco Posts: 20,137
    edited 2022-02-18 22:53

    Update: BUSY pin 12 works fine using a 10K pullup resistor to +5V in conjunction with a 220 ohm resistor on the serial line. These are integrated into the BS2 Homework board.

  • PublisonPublison Posts: 12,316

    @erco said:
    Update: BUSY pin 12 works fine using a 10K pullup resistor to +5V in conjunction with a 220 ohm resistor on the serial line. These are integrated into the BS2 Homework board.

    Good to know 😊

  • GenetixGenetix Posts: 1,669

    erco,

    Were you the one who annotated that picture?

  • ercoerco Posts: 20,137

    @Genetix said:
    erco,

    Were you the one who annotated that picture?

    Yes, there is very little info on this module. I started at https://electropeak.com/learn/interfacing-dy-sv17f-audio-mp3-player-module-with-arduino/ where the guy showed connecting BUSY to 5V, which I know now is wrong.

  • JonnyMacJonnyMac Posts: 8,057

    I ordered a few of those dudes to play with, but would like to find the raw parts to build them into a project.

  • ercoerco Posts: 20,137

    I'll give you two whenever we meet up for lunch at Torrance Electronics!

  • I got mine today, and after parsing the docs, came to realize that the module has several different modes that are configured via the CON (configure) pins. Here's the table:

    To configure and hook up for UART mode:
    CON 1 and CON 2 connect to GND on the module, and CON 3 connects to 5V (via 10K resistor), as erco notes above.

    To make it easy and stand-alone, 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, like above. Then connect the speaker to those pins and run erco's code.

    The edges of the board are castellated, so it's obviously intended to be installed as a module - could be useful!

  • I ordered 5. They came today. Now I have to play. Thanks for the notes Erco!

Sign In or Register to comment.