MP3-TF-16P - A bad batch or User Error?

Hi,

Hardware: Arduino Nano and MP3-TF-16P
Libraries: SoftwareSerial.h DFRobotDFPlayerMini.h Arduino.h
Code: Standard "GetStarted" Example code included with the DFRobotDFPlayerMin libary

I've been using the MP3-TF-16P (DFMini) for some time in a number of projects without issue.

I have created some PCBs which use the MP3-TF-16P's for sound effects. The PCB includes the 1k resistor on the serial line. I tested the PCBs with some MP3-TF-16P I had and its works fine.

I ordered a batch of new MP3-TF-16P's for use in the same boards but they will not playback using track numbers, only the myDFPlayer.next() command works.

Looking at the monitor output I get a "Stack Wrong!" message, which I'm not sure what it means and a google returns loads of seeming unrelated articles on the error.

My existing MP3-TF-16P's have a blue LED and the new have red LEDs, if that means anything.

Am I missing something or could the hardware be damaged?

Thanks in advance,

Paul

Get Wrong Stack

You could start with searching in the libraries (SoftwareSerial.h, DFRobotDFPlayerMini.h and Arduino.h, but probably the second) for the text “Stack Wrong!”. The code just before that may tell you when and/or why that message is given.

PS.: I assume you see it during compilation?

PS.: Can you see any differences between the old and the new MP3 modules?

Hi,

There are no issues with the code compiling, the error is outputted to the Serial monitor via the following code included in the Getstarted sketch which comes with the library.

void printDetail(uint8_t type, int value){
switch (type) {
case WrongStack:
Serial.println(F(“Stack Wrong!”));
break;
}

I have looked at the libraries but can’t see the error referenced (I have attached the libraries and GetStarted sketch).

The sketch works fine with the existing PCBs and MP3 modules, the new ones are issue. I’m wondering if the error is related to the MP3 modules not responding correctly to the Arduino. I just can’t seem to find any details on the error.

Other than the different coloured LEDs the modules look identical.

GetStarted.ino (3.6 KB)

Identical issue with mine from Amazon. All three of my MP3-TF-16P modules work with next() or randomAll() but nothing with calls like play(#) or volume(#). It almost seems related to having issues sending the number for the track, volume, etc. Anything with a number seems to fail/not function. I found a post where someone also identifies issues with this model responding to some serial commands: TheBackShed.com - Forum

For kicks, I turned on DEBUG mode on in the DFRobotDFPlayerMini library. (Line 6 in file DFPlayerMini_Fast.h) and was able to get some interesting info. In the console I get a respose to the command similar to this (I believe):
7E FF 06 40 00 00 03 FE B8 EF

Here's some examples with debug on:

21:54:57.031 -> DFRobot DFPlayer Mini Demo
21:54:57.031 -> Initializing DFPlayer ... (May take 3~5 seconds)
21:54:57.031 -> 
21:54:57.071 -> sending:7E FF 6 C 1 0 0 FE EE EF 
21:54:57.071 -> received:7E FF 6 41 0 0 0 FE BA EF 
21:54:57.231 -> received:FF received:7E FF 6 3F 0 0 2 FE BA EF 
21:54:58.030 -> DFPlayer Mini online.
21:54:58.030 -> 
21:54:58.030 -> sending:7E FF 6 6 1 0 1 FE F3 EF 
21:54:58.150 -> received:7E FF 6 40 0 0 3 FE B8 EF 
21:54:58.551 -> 
21:54:58.551 -> sending:7E FF 6 4 1 0 0 FE F6 EF 
21:54:58.631 -> received:7E FF 6 41 0 0 0 FE BA EF 
21:54:58.671 -> 
21:54:58.671 -> sending:7E FF 6 5 1 0 0 FE F5 EF 
21:54:58.791 -> received:7E FF 6 41 0 0 0 FE BA EF 
21:54:58.791 -> 
21:54:58.791 -> sending:7E FF 6 7 1 0 0 FE F3 EF 
21:54:58.911 -> received:7E FF 6 41 0 0 0 FE BA EF 
21:54:58.911 -> 
21:54:58.911 -> sending:7E FF 6 9 1 0 2 FE EF EF 
21:54:59.111 -> Playing next
21:54:59.111 -> received:7E FF 6 40 0 0 3 FE B8 EF 
21:54:59.431 -> 
21:54:59.431 -> sending:7E FF 6 1 1 0 0 FE F9 EF 
21:55:00.431 -> Played next
21:55:00.431 -> Playing 1
21:55:00.431 -> received:7E FF 6 41 0 0 0 FE BA EF 
21:55:00.431 -> 
21:55:00.431 -> sending:7E FF 6 3 1 0 1 FE F6 EF 
21:55:01.425 -> Played 1
21:55:01.425 -> Playing random
21:55:01.461 -> received:7E FF 6 40 0 0 3 FE B8 EF 
21:55:01.461 -> received:7E FF 6 4C 0 0 2 FE AD EF 
21:55:01.461 -> 
21:55:01.461 -> sending:7E FF 6 18 1 0 0 FE E2 EF 
21:55:02.489 -> Played random

In the documentation, I see that they have some notes, but nothing for the 03 response:
Module is busy = 7E FF 06 40 00 00 00 xx xx EF
A frame data are not all received = 7E FF 06 40 00 00 01 xx xx EF
Verification error = 7E FF 06 40 00 00 02 xx xx EF

I don't mean to bump an old thread, but wanted to see if anyone came to a solution on this issue.

Otherwise, does anyone know where to buy traditional/genuine DFPlayer with the YX5200 chipset?

Thanks!

Hi,

I gave up and went for a player with the YX5200 chipset.

You can still get them on Amazon:
https://www.amazon.co.uk/ALMOCN-YX5200-DFPlayer-Supporting-Arduino/dp/B08H4NF3FV/ref=mp_s_a_1_1_sspa?dchild=1&keywords=yx5200&qid=1624429293&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyRVlFRkw1MksxQklWJmVuY3J5cHRlZElkPUEwODc2NDQzRDk1QVRHRjAyUk0zJmVuY3J5cHRlZEFkSWQ9QTAwMzA1MjczTTBCSllKREFMUkpOJndpZGdldE5hbWU9c3BfcGhvbmVfc2VhcmNoX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

Confirmed that that Amazon product does function as expected! I will be returning the other non-authentic version. Thanks!

It's a different firmware: do not send the checksums. There are some other differences too. But the good news is that it is actually possible to make it work.