#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.

———————————————–
UPDATE UPDATE UPDATE
———————————————–
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

—————————————————————————————————-
STOP! READ THIS IF YOU VALUE YOUR MP3 PLAYER MODULE
—————————————————————————————————-
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:
https://github.com/RalphBacon/MP3-Player-DFPlayer)

1. The DFrobot Wiki for the DFPlayer
http://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299

2. Link to the Mini DF Player Manual – more technical but essential if you want to know the commands
https://github.com/RalphBacon/MP3-Player-DFPlayer

3. Link to the sketch used in the demo:
https://github.com/RalphBacon/MP3-Player-DFPlayer

——————————-
Further information
——————————-
1. A massive amount of extra information from Yerke, via the Banggood forum (link was recently down but may reappear)
http://forum.banggood.com/forum-topic-59997.html

2. How to insert an advert track and then resume playing the original
http://www.dfrobot.com/forum/viewtopic.php?f=2&t=1524

3. More on where I go the music for this demo
http://www.purple-planet.com/using-our-royalty-free-music/4583818250

4. The DFPlayer library (not used in this video but easy to use)
https://github.com/DFRobot/DFPlayer-Mini-mp3

All this can be found in Github:
https://github.com/RalphBacon/MP3-Player-DFPlayer

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:
—————————————————————–
https://www.youtube.com/c/RalphBacon
——————————————————————
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)

36 Comments

Tinggalkan Balasan ke Joseph Sai Batalkan balasan

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