#40 Let the music play! Arduino based MP3 Player for music (or announcements)

#40 Let the music play! Arduino based MP3 Player for music (or announcements)

Let the music play! This module can most certainly be used as a custom, Arduino-controlled player of music, in a pub or restaurant, for example, but it could equally be used to give out warning messages or instructions “3D printer has run out of material!” in a factory or workshop. The possibilities are endless. All you have to do is record your .mp3 or .wav files, put them onto a micro SD card, referred to as a TF TransFlash card in the documentation and you’re good to go.

We’re not using any libraries in this demo, so that you can see exactly how the commands are sent to the MP3 player and how the optional responses are returned too. It also demonstrates how easy it is to send out those commands via the SoftwareSerial library; why not the standard Serial port? Watch the video to find out!

However, you may feel more comfortable using the DFRobot MP3 Player library so I’ve included that in the links below. Just be aware that we have not experimented with that library in the video, but it looks very easy to use and takes away all the work, aka pain, in creating the command strings.

The library contains some examples that should get you going nicely too.

Just to clarify some queries some viewers had: YES you can play SPECIFIC tracks (that is, you can, if you want, play track 6 then track 1, then track 123). However, I haven’t demonstrated that here (we just play them sequentially) but if you look at the code for the Wireless Rain Receiver (video #48) you’ll see an example where I play different tracks depending on the level of rain detected.

Many thanks to Purple Planet for their music – link below

Music: http://www.purple-planet.com

The RX and TX from the Arduino Uno or Nano will be 5V and will damage the MP3 player which requires 3.3V on these pins. All explained in the video!

I’ve included as many links below as I could find and I *strongly* recommend you print out the ones I’ve marked as you’ll be referring to them often!

Essential reading – recommended print
(Note: ALL these links etc can be found here:

1. The DFrobot Wiki for the DFPlayer

2. Link to the Mini DF Player Manual – more technical but essential if you want to know the commands

3. Link to the sketch used in the demo:

Further information
1. A massive amount of extra information from Yerke, via the Banggood forum (link was recently down but may reappear)

2. How to insert an advert track and then resume playing the original

3. More on where I go the music for this demo

4. The DFPlayer library (not used in this video but easy to use)

All this can be found in Github:

If you like this video please give it a thumbs up, share and if not already subscribed please do so

And my channel is here:
How can I remember this? Memory tip: “See” Ralph Bacon, geddit?

As always Thanks for Watching!
#40 Let the music play! Arduino based MP3 Player for music (or announcements)

#40 Let the music play! Arduino based MP3 Player for music (or announcements)


Add a Comment

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *