I am designing a box that uses arduino to play music files.
For the prototype, I've used DFPlayer Mini with an Arduino Mini Pro. But from what I can tell, the only way to add a music file into this configuration is via uploading the music directly onto the flash card used by DFPlayer, then putting the card back in.
For product reasons, I would rather avoid that. I would prefer to write an app on the computer that takes care of uploading the music onto the box, via a USB cable or bluetooth or something like that, and the box takes care of the lower-level details like naming the files appropriately and writing them onto the flash card.
These are the designs I've thought about, at a high-level, along with my unresolved question for each:
-
Instead of DFPlayer, find another MP3 module which allows the client to write music to the flash card -- then arduino can handle the details of receiving the music data from the computer via USB and writing it onto the flash card. Is there such a "ready to go" MP3 module out there -- i.e., one that provides an interface for the client to upload music music files?
-
Use an MP3 module that comes without a flash card at all, but instead receives the MP3 data as serial input, decodes it, and either sends it directly to a speaker, or back to the client, who will be responsible for driving the speaker. With this configuration, arduino will receive music data from the computer, write it to the flash card, then forward the data to the MP3 unit when it wants to play a sound file. Is there such an MP3 module?
-
Have the decoding happen on the computer before uploading onto the box. Then arduino can receive the decoded samples over USB, store them on a flash card, and use them to drive the speaker when playing the sound files. I did some cursory research and it seems like it may be tricky to get decent quality bit rates that way. If the bit-rate issue can be solved, this option is preferable to requiring the user to write directly to the flash card, but I'd still prefer 1 or 2 above.
Aside from information on the specific questions above, I'd be thankful for any pointers to difficulties with these designs that I might have missed, or suggestions for alternative designs, or general advice on how to go about implementing them.
Thanks in advance!