Close

Choosing an MP3 Player for Arduino

A project log for Open Tag

The best game of laser tag you've never played. Choose your class - from a sniper to a pyro, and customize your own game of laser tag!

opentagopentag 11/15/2021 at 05:240 Comments

I would like to add better sounds to the laser tag game. Right now, I have sounds from a piezo, but I'd like to have more complicated sounds than a single tone from a Piezo. I'm planning on offloading that to a stand alone chip. I've been researching options, and have come up with the following criteria:

  1. Clear tutorial. I don't want to have to dig through data sheets to find out how to use this thing, as I don't have a lot of time to work on this
  2. Cheap. I don't want to spend a lot of money.
  3. Easy to add / change different sound files
  4. Onboard audio amplifier is a plus. I can add one, but having everything on one chip would be simpler, as I'm not sure how loud it should be.

Here are the options I've found:

DY-SV5W Voice Playback Module

DY-SV5W

(Picture from AlliExpress)

This has an SD card slot to hold the files (which to me, is preferable to downloading onto a chip), and has instructions on all of the commands here. There is a "cheat sheet" of all of the raw commands here. And, to top it all off, someone has written a library for all the commands, linked here, called DYPlayer for arduino. The DY-SV5W is on the list of tested modules for the library, so it should work. 

Purchase link to one on AlliExpress is here. There are probably cheaper ones. that's the one I found during my research. Speakers are here. Other option is here.

I got this one hooked up to the prototype laser tag, using an ATmega4809 (I used up all the serial ports on the ATmega328p), and the examples from the library on Github (again, here) made it super simple to get a sound playing on the speaker. Since this was easy to get set up, I'll probably go with this for adding better sounds to the laser tag game. I'll need to find/make the mp3 files for the different sounds I want, but that will be something for the future. For now, the hardware works. 

Prototype with sound module

I looked into other modules, and they are listed here in case I ever want to go back and use them.

Mini MP3 Module

 Tutorial showing how to add a sound amplifier is here.

Tutorial does not show how to get sounds on the device.

AlliExpress link is here

DY-SV17F Module

Tutorial is here.

Tutorial does not show how to get sounds onto the device. It also doesn't show how to change the modes of operation, which are listed in the instructions here. It needs to be set to UART mode, unless you want to control it differently. 

AlliExpress link is here.

 Another Module

This is the one I purchased: https://www.aliexpress.com/item/32782488336.html?spm=2114.12057483.0.0.26012e93zs9XzW

SD card: https://www.aliexpress.com/item/32740307068.html?spm=a2g0o.productlist.0.0.35216e60SJNYbQ&algo_pvid=76f3a6ba-9b18-426e-9d8a-78ebd4eb2cd8&algo_expid=76f3a6ba-9b18-426e-9d8a-78ebd4eb2cd8-0&btsid=0b0a555b16155217782943757e6d2b&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

Discussions