The Ultimate MP3 Player
This is a work-in-progress project.
Introduction
Build the ultimate MP3 player - ultimate, becuase you might not want to buy any other mp3 player anymore!
Let’s see the components needed:
- Attiny85
- Dfplayer
Ok, I am a cheater with this Dfplayer-thing, but don’t worry, it won’t be so easy. We will do it step by step.
- Learn programming Attiny85 (see this earlier post)
- Control Dfplayer with Attiny85
- Make it portable: use joule thief
Ok, so let’s do the thing.
Playing with DFplayer
Dfplayer uses an SD card to store music. It supports FAT16 , FAT32 file system, maximum support 32G of the TF card, support 32G of U disk, 64M bytes NORFLASH.
https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
DFPlayer can work in 3 modes:
- serial
- AD KEY
- IO mode
Now, for our purposes use serial mode. In serial mode we can control DFPlayer with some sort of byte commands. It leads us
quite quick to create a lib for it, but fortunately we can find many. Let’s see some! (In Arduino IDE: Tools -> Manage Libraries -> Search for DFPlayer) You should
choose DFRobotDFPlayerMini
.
Pinout
Lets set up the following pinout:
(Nano) D11 - 1K Ohm resistor - RX
(Nano) D10 - TX
(Nano) GND - GND
(Nano) 5V - VCC
(Stereo Jack) R - SPK_1
(Stereo Jack) L - SPK_2
(Stereo Jack) GND - GND
Find code here: dfplayer_test.ino
Sketch uses 5356 bytes
- not bad, we will have 8k in case of Attiny85.
(to be continued…)