Not terribly original, but my Father In Law wanted a small unit that could play rhythm 'files' to accompany him when playing his electric organ. I thought the easieast way I could do this (as all the old dedicated rhythm playback chips seemed to have long since been discontinued) was to load an MP3 player with some 'beats' that he could select and then play back. This morphed into this project.
The MusicBox plays files from either a MicroSD card, or USB disk. It can accommodate up to 9999 tracks, in MP3 format. The DF Player can potentially use other file formats, but I never tried so can't vouch for this. Tracks can be played in either Sequential, Repeat or Random modes. The last played track is selected on power on, if the unit was playing a track when powered off, the track is loaded and played automatically when next powered up.
I use this as a source for a Medium Wave transmitter to provide an audio source for my vintage valve radios so that my 1954 valve clock radio can wake me up in the morning. The software has been refined over a period of time and while not very 'tidy' it is very stable and I've built up the feature list to suit my needs, as much as my Father In Law's.
The hardware required is not much above a PIC16F1829, DF Player module, LCD and a few switches. If you are looking to use my PCB with loudspeakers, the loudspeakers I used are quite specific, other than that and the low drop out regulator, pretty much everything else is not critical. I have uploaded the DF Player manual. It is difficult to make much sense out of, and seemd to contradict itself regularly, but it may help someone figure things out if trying to use it in another project.
The Eagle schematic and PCB files are just within the limits of the free version of Eagle so can be adjusted without needing to purchase the full version. They are also just small enough to be produced at minimal cost by a Chinese PCB production house.
As with my calculator project, I had to order a number of PCBs and still have a few available that I would happily pass on for the cost of production plus P&P.
Nice Project. Have a similar for a future build in mind: a gcb copy of a "tonuino" which is a mp3 player with a rfid-reader/writer where for example a kid could play it's stroy of choice by presenting a rfid tag or card.
Do you mind if I use your mp3-player-code as a basis?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't mind at all. Most of the software has been optimised for playback of a large number of tracks, in a random sequence.
I have almost certainly improved many parts of the code to improve the handling of the delays before a track starts since this code was uploaded. If you run into any issues drop me a message and I'll send you the newest version.
Something else that I added later was some code which requests from the DfPlayer the number of tracks on the loaded SD card or USB disk. If that is of interest, again, let me know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your reply. This cuts down some development time.
Due to the fact that the rfid-reader is not supported by Great Cow BASIC at the moment and i don't have a clue how to program that spi-protocol i have to modify one rfid-reader a little to see if i can get it to work at the serial uart.
So no project done on a weekend, though :)
But your enhancements of the code are of course of interest.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not terribly original, but my Father In Law wanted a small unit that could play rhythm 'files' to accompany him when playing his electric organ. I thought the easieast way I could do this (as all the old dedicated rhythm playback chips seemed to have long since been discontinued) was to load an MP3 player with some 'beats' that he could select and then play back. This morphed into this project.
The MusicBox plays files from either a MicroSD card, or USB disk. It can accommodate up to 9999 tracks, in MP3 format. The DF Player can potentially use other file formats, but I never tried so can't vouch for this. Tracks can be played in either Sequential, Repeat or Random modes. The last played track is selected on power on, if the unit was playing a track when powered off, the track is loaded and played automatically when next powered up.
I use this as a source for a Medium Wave transmitter to provide an audio source for my vintage valve radios so that my 1954 valve clock radio can wake me up in the morning. The software has been refined over a period of time and while not very 'tidy' it is very stable and I've built up the feature list to suit my needs, as much as my Father In Law's.
The hardware required is not much above a PIC16F1829, DF Player module, LCD and a few switches. If you are looking to use my PCB with loudspeakers, the loudspeakers I used are quite specific, other than that and the low drop out regulator, pretty much everything else is not critical. I have uploaded the DF Player manual. It is difficult to make much sense out of, and seemd to contradict itself regularly, but it may help someone figure things out if trying to use it in another project.
The Eagle schematic and PCB files are just within the limits of the free version of Eagle so can be adjusted without needing to purchase the full version. They are also just small enough to be produced at minimal cost by a Chinese PCB production house.
As with my calculator project, I had to order a number of PCBs and still have a few available that I would happily pass on for the cost of production plus P&P.
Nice Project. Have a similar for a future build in mind: a gcb copy of a "tonuino" which is a mp3 player with a rfid-reader/writer where for example a kid could play it's stroy of choice by presenting a rfid tag or card.
Do you mind if I use your mp3-player-code as a basis?
I don't mind at all. Most of the software has been optimised for playback of a large number of tracks, in a random sequence.
I have almost certainly improved many parts of the code to improve the handling of the delays before a track starts since this code was uploaded. If you run into any issues drop me a message and I'll send you the newest version.
Something else that I added later was some code which requests from the DfPlayer the number of tracks on the loaded SD card or USB disk. If that is of interest, again, let me know.
Thank you for your reply. This cuts down some development time.
Due to the fact that the rfid-reader is not supported by Great Cow BASIC at the moment and i don't have a clue how to program that spi-protocol i have to modify one rfid-reader a little to see if i can get it to work at the serial uart.
So no project done on a weekend, though :)
But your enhancements of the code are of course of interest.