DF robot MP3 save last mp3 played before shut off?

Hi,

I am currently waiting for my df robot mp3 player to arrive in the mail so I unable to test hence why I am posting. The mp3 player has the ability to cycle between mp3 tracks but I was wondering if for example 0001.mp3 is played then 0002.mp3 is played, on the next power cycle will it play 0002.mp3 (whatever the last mp3 file was) or does it reset back to 0001.mp3. I am confident a microcontroller such as a nano or pico could solve this issue but I would love to keep it as simple as possible.

You could save the state to eeprom and the read the state from eeprom upon booting up

https://www.arduino.cc/en/Tutorial/LibraryExamples/EEPROMWrite

1 Like

I don't really follow what you mean by 'cycle'.

You can specify exactly which track you want it to play. At any time. Or set it to play all of them sequentially. Or randomly. Or play all in a particular folder, or randomly within that folder.

Have you looked at its manual?
https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

@Terrypin @LanGenz

@D-TECH222 is asking what will happen if the DFplayer is used in isolation, no Arduino. They know the described behaviour is possible if an Arduino is used. They want to know what the standalone behaviour of the DF player would be.

@D-TECH222 I do not know but I suspect it will begin at track 1 every time it is powered up. I can test for you but may not find the time to do that before your player arrives.

OK, thanks Paul, understood.

@D-TECH222
Just applying power to the module, with a populated uSD card inserted does nothing, as expected. You need to use the AD KEY Mode to use the player without an Arduino. See the spec for details, about ¼ of the way down:
https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

I assume that's what @D-TECH222 is doing: connecting a 51K resistor between AD1 and ground to instruct the module to "loop all".

Questions is, I think, what happens if you let it play until track N begins, then cycle the power, does it go back to track 1 or continue to play from track N or N+1 or what?

Maybe. I didn’t get that pertinent detail from the opening post!

Looking at that AD KEY Mode documentation I'd expect it to reset on each power up. And it needs a low-going edge to execute any of those commands.

Testing with 51k confirmed that a LOW was needed and play started at track 1. After playing three of my short test tracks I removed power, re-applied it, took ADKEY1 low, and it again started playing track 1.

A little additional circuitry could avoid having to press the low-going button. Maybe a brief RC delay then an NPN transitor to make the necessary connection to GND. Or, for up to four such commands, a CMOS 4016.

1 Like

Hey terry thanks for testing and confirming my suspiscions. I will most likely employ a atiny85 or a basic microcontroller to read the state using the track number query and write it to eeprom to same it for the next power cycle.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.