I know you weren't , I was just mucking around and being a little comical
so as not to fall into the pit on insanity that is "Electronics Troubleshooting",
I feel like i should start another topic called
"Everything was Working Fine, i swear , Now nothing works" 
I was literally prepping to get a few things up and running
Starting Connecting LED Strips and DFRobot and i figured
-
A Quick test should do it , I know it'll be fine but let's confirm, even though i've tested
this like 10 times in the past week
-
Then.......... "IT" HAPPENS !!

-
I'm Guilty of #5
Now let me explain it, There is a funny side to this
and there is a side
FOR BEGINNERS TO KNOW HOW TO SOLVE "Seemingly " UNSOLVABLE PROBLEMS
So there was a test project setup with 2 x WS2812B Strips, Last i know, they still work.
I hooked up my ESP32, I have a few of them, Some with USB-C Connectors others with mini USB the Type C Tend to Require CH340 Drivers and the mini USB tend to require CP2102
Side Topic
DATASHEETS
(For the benefit of others) I know you know this...)
This comes under the subject of USB to UART Controller Chips
Here is what a CP2102 and a CH340 Chip looks like

CP2102-serial-communications-guide.pdf (710.7 KB)
CH340 DataSheet.pdf (243.9 KB)
it's an interesting and quick read for those that want to understand just a little bit more about
- What the hell is a Driver
- What the hell is CH340 and CP2102 Anyway
- And why do i need a driver in the first place, why can't i just plug it in so it works.
Anyway....... that aside
I have several ESP32 Wroom32 Dev Boards and Several Arduino's MEGA, Nano and Uno
so I switch it on, the SD Card is all setup and loaded with files and............
it doesn't work
-
Checked the sketch, No problems there
-
Check the DFRobot Player, No initial obvious problems
-
Checked the LED's they seemed to work fine
-
Loaded a basic Blink Sketch to the ESP32's that worked fine
Even added Serial Output to give verbose "ON" , "OFF" for inbuilt LED Blinking.
-
The ESP32's Seemed to work fine and work properly
the problem was occuring when i got to this point in the DFRobot Initialization
Now i have a DFRobot Test Sketch
Feel Free to use it
it's pretty straight forward and nothing to write home about
The sketch assumes no LED's are being used and only relies on
DFRobot, ESP32 and Serial output
/*/////////////////////////////////////////////////////////////////////////////////////////
PROJECT INFORMATION
-----------------------------------------------------------------------------------------
CREATED BY : B.T.O. Electronics
DATE : June 2022
PROJECT : DFRobot Player Mini Audio Test Platform
VERSION : ESP32 WRoom V2.2
LAST EDIT : 8th August 2023
*//////////////////////////////////////////////////////////////////////////////////////////
/*/////////////////////////////////////////////////////////////////////////////////////////
WIRING INFORMATION
-------------------------------------------------------------------------------------------
GPIO 16 - Tx (Transmit Line) 16
GPIO 17 - Rx (Receive Line) 17
*//////////////////////////////////////////////////////////////////////////////////////////
/*//////////////////////////////////////////////////////////////////////////////////////////
AUDIO FILE INFORMATION
-------------------------------------------------------------------------------------------
0001 - Track 1.mp3
0002 - Track 2.mps
0003 - Track 3.mp3
0004 - Track 4.mp3
0005 - Track 5.mp3
0006 - Track 6.mp3
0007 - Track 7.mp3
*//////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
// Libraries to include
//-----------------------------------------------------------------------------------------
#include "DFRobotDFPlayerMini.h" //Controls DFRobot MP3 Player (Audio)
#include "SoftwareSerial.h" //Serial Communication Controller (EspSoftwareSerial)
///////////////////////////////////////////////////////////////////////////////////////////
/*/////////////////////////////////////////////////////////////////////////////////////////
SERIAL DATA LINE SETUP (RX/TX)
*///-----------------------------------------------------------------------------------------
SoftwareSerial mySoftwareSerial(17, 16); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
// BEGIN SETUP
///////////////////////////////////////////////////////////////////////////////////////////
void setup()
{ // OPENS the void setup
int value; //Controls the Serial Print Values
/*/////////////////////////////////////////////////////////////////////////////////////////
DF ROBOT MP3 PLAYER (AUDIO) SETUP
-------------------------------------------------------------------------------------------
Baud Rate Setup
*///---------------------------------------------------------------------------------------
mySoftwareSerial.begin(9600);
Serial.begin(115200);
/*//---------------------------------------------------------------------------------------
Audio Initialization Sequence - Serial Monitor Output
*///---------------------------------------------------------------------------------------
Serial.println();
Serial.println(F("======================================================"));
Serial.println(F(" CREATED BY : "));
Serial.println(F(" B.T.O. Electronics"));
Serial.println();
Serial.println(F(" PROJECT : DFRobot Player Mini Audio Test Platform"));
Serial.println(F("======================================================"));
Serial.println();
Serial.println();
Serial.println(F("======================================================"));
Serial.println(F(" WELCOME - DF ROBOT PLAYER STARTUP SEQUENCE"));
Serial.println(F("======================================================"));
Serial.println(F(" PLEASE WAIT - INITIALIZING DFROBOT PLAYER "));
Serial.println(F("______________________________________________________"));
Serial.println();
/*//---------------------------------------------------------------------------------------
IF ERROR - Serial Monitor Output
*///---------------------------------------------------------------------------------------
if (!myDFPlayer.begin(mySoftwareSerial))
{
Serial.println();
Serial.println(F("======================================================"));
Serial.println(F(" **** AN ERROR OCCURRED ****"));
Serial.println(F("======================================================"));
Serial.println(F(" ERROR - MP3 DID NOT START "));
Serial.println(F(" ERROR - MP3 DEVICE IS NOT PRESENT"));
Serial.println(F(" ERROR - SD CARD ISSUE"));
Serial.println(F("______________________________________________________"));
while (false);
}
/*//---------------------------------------------------------------------------------------
IF NO ERROR - Serial Monitor Output
*///---------------------------------------------------------------------------------------
Serial.println(F("======================================================"));
Serial.println(F(" AUDIO ONLINE - DFROBOT PLAYER STARTED SUCCESSFULLY"));
Serial.println(F("======================================================"));
Serial.println();
Serial.println(F("======================================================"));
Serial.println(F(" - SETTING DEFAULT AUDIO DEVICE"));
myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);
Serial.println(F(" - Default Device_SD --------> SET SUCCESSFULLY"));
/*//---------------------------------------------------------------------------------------
SET THE OVERALL SYSTEM VOLUME
*///---------------------------------------------------------------------------------------
Serial.println(F(" - Setting System VOLUME Controls"));
myDFPlayer.volume(25); // Value = From 0 to 30
Serial.println(F(" - Volume -------------------> SET SUCCESSFULLY"));
///////////////////////////////////////////////////////////////////////////////////////////
Serial.println(F("================================================================"));
Serial.println(F(" READING SD CARD ATTRIBUTES"));
Serial.println(F("================================================================"));
Serial.print(F(" - READ STATE = "));
Serial.print(myDFPlayer.readState()); //read mp3 state . Reading or Not Reading
value = myDFPlayer.readState();
Serial.println(F(" (1 = Reading/ 0 = NOT Reading)"));
//-----------------------------------------------------------------------------------------
Serial.print(F(" - STORAGE VOLUME CAPACITY = "));
Serial.print(myDFPlayer.readVolume()); //read current volume capacity
Serial.print(F(" MB"));
Serial.println(F(""));
//-----------------------------------------------------------------------------------------
// Serial.print(F(" - EQ SETTINGS = "));
// Serial.println(myDFPlayer.readEQ()); //read EQ setting
//-----------------------------------------------------------------------------------------
Serial.print(F(" - READ FILE COUNTS "));
Serial.println(myDFPlayer.readFileCounts()); //read all file counts in SD card //Produces 0
value = myDFPlayer.readFileCounts(); //read all file counts in SD card
//-----------------------------------------------------------------------------------------
Serial.print(F(" - READ CURRENT FILE NUMBER "));
Serial.println(myDFPlayer.readCurrentFileNumber()); //read current play file number
value = myDFPlayer.readCurrentFileNumber();
//-----------------------------------------------------------------------------------------
Serial.print(F(" - readFileCountsInFolder"));
Serial.println(myDFPlayer.readFileCountsInFolder(1)); //read file counts in folder SD:/03 PRODUCES ERROR
Serial.println(F("================================================================"));
Serial.println(F("================================================================"));
Serial.println(F(" BEGINNING SOUND AND LIGHT SEQUENCE"));
Serial.println(F("================================================================"));
Serial.println(F(" - DETAILS :"));
Serial.println("AUDIO ONLY - Started");
///////////////////////////////////////////////////////////////////////////////////////////
/*/////////////////////////////////////////////////////////////////////////////////////////
STARTUP - AUDIO SEQUENCE
-------------------------------------------------------------------------------------------
SUMMARY : MP3 (0003)
*///---------------------------------------------------------------------------------------
myDFPlayer.playMp3Folder(3); // Play MP3 File (0003)
//delay(3);
Serial.println("AUDIO FILE: <0005>");
Serial.println("AUDIO ONLY - Completed");
//-----------------------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////////////
} //Closes the Void Setup
void loop()
{ //Opens the Void Loop
} //Closes the Void Loop
As you can see there really is not a lot to it .
- I have included a few Diagnostics in there with Serial Verbose Output for the sake of ticking
a few boxes to know everything started properly, the Steps are as follows....
THIS PART...
Proves nothing more that
Serial was setup, and if i have Visual Confirmation of this then i knew Serial.begin()115200;
has started successfully
This is Step 1 - But still gives no indication of anything to do with the MP3 Player or SD Card

Then there is a stage that most of the time never happesn because there is no problem,
it's the stage that says this...
If myDFPlayer has not begun (as signified by ! (NOT) m then print out the following Errors.
FYI, These Error Messages
-
Were grabbed from the main website As Is and have not been attended to
Even though i have every intention of making them more specific
-
They DO NOT by any stretch Mean that the Device is not present
Nor that the SD Card has an issue . they don't actually check anything.
BUT THIS ERROR MESSAGE DID SHOW UP
and stopped at this point.
/*//---------------------------------------------------------------------------------------
IF ERROR - Serial Monitor Output
*///---------------------------------------------------------------------------------------
if (!myDFPlayer.begin(mySoftwareSerial))
{
Serial.println();
Serial.println(F("======================================================"));
Serial.println(F(" **** AN ERROR OCCURRED ****"));
Serial.println(F("======================================================"));
Serial.println(F(" ERROR - MP3 DID NOT START "));
Serial.println(F(" ERROR - MP3 DEVICE IS NOT PRESENT"));
Serial.println(F(" ERROR - SD CARD ISSUE"));
Serial.println(F("______________________________________________________"));
while (false);
}
/*//---------------------------------------------------------------------------------------
OK, so this is easy then
A TIP FOR BEGINNERS.....
When you encounter a seemingly Impossible problem
-
STAY CALM - This should always be a first step of confirmation as being stressed or upset
or sad ABSOLUTELY AND GREATLY will hinder your ability to think efficiently.
-
REVERT TO FUNDAMENTAL KNOWLEDGE AND TEACHINGS -
The Principle here is... When you learn something , Learn it well, Test it, Scrutinize it,
then Test it again, then say Oh yeah but what about this and then test it again and again
and over time keep challenging that knowledge . I have done this for some 40 years and
I have found that when you do this it solidifies your "Foundational Knowledge"
and as a result you are able to solve any problem .
This forum conveniently is a great place to gain this foundational knowledge for beginners.
-
Side Note of HOW NOT TO APPROACH THIS....
There will always be someone here who will say "That's not true, You're wrong, it's like this."
Now if you take this personally YOU LEARN NOTHING.
You see the point is.. YOU ARE SUPPOSED TO BE CHALLENGED ON WHAT YOU KNOW.
that is literally the point of knowing what you know.
If you want to learn something , But you don't want to be challenged, Expect to have many
problem in life that won't be solved.
You should approach this like this.....
Say someone says "You're an idiot, that's stupid where the hell did you get that from"
(granted this is an exaggerated example) but still valid because some people are like this,
if you say ""what the hell is your problem why are you so rude" THAT'S WRONG
if you say "I'm not wrong and i'll remind you to watch your tone" THAT'S WRONG
Taking this personally is irrelevant , FOCUS ON YOUR GOAL (To solve the problem)
Not to get into a heated debate.
so, Revert to your foundational knowledge , Get back to Basics, Go Step by Step
-
Lastly, i cannot stress how important it is to have a drink of water and healthy meal.
Seriously.. I can't count how many times i've done this..
You're stuck on a problem it's been hours, you're racking your brain and the solution won't come.
ANSWER : Stop and take a 20min break,
Have 1 or 2 Glasses of water or Juice
Have a HEALTHY Meal or some fruit or something
You go back you sit down and wham, Magically the answer hits you.
I'ts because you gave you body and your brain what it needs to work efficiently
No Stress
Nutrients
Hydration
No back to it....... so i'm getting this error and you would think...
-
Have a quick look at the code - Code is good, No much to look at as it is
-
Check if i can play the mp3 files on my PC so i take out the SD Card test it in computer,
it shows up normally in Disk Management and plays the files properly and the partition is
FAT32 - all good
-
You check the wiring, The wiring seems fine
-
Ok so i change out a few other DFRobot Players , Brand New.
Error still Happens
-
I Check the voltage Vcc and GND to the DFPlayer and i'm getting my 5V approx, all good
-
I checked the speaker outside of the circuit, the speakers works properly
-
So now the Tx and Rx are in Question.
I Hook up my Scopes to the lines , Both Rx and Tx seem to be behaving Correctly
and i can see Data packets being Transmitted
-
Checked that i didn't cross the Wiring of Rx and Tx (about 20 Times) Nope, Absolutely the right
way around
-
Touched the Housing of the DFRobot Player with my finger to see if it's hot (indicating short circuit). No, No S.C. and besides if there was there wouldn't be the presence of 5V
-
Tried running the sketch a few more times and fiddled around with the wiring a bit
and checked it some more..
NOW HERE IS THE WEIRD PART....
it then progresses to this part

so.... Great,, PROGRESS !
Or........ Not
See, to get to this section
-
No Error must occur because The condition of the DFRobotplayer.begin must be True.
if it's False (!) the Error would occur and not proceed.
-
To get to this stage DFRobotplayer.begin must have returned TRUE and secondly
-
It sets up the Device, If it didn't see the device and ` myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD); failed then the next line wouldn't
have been printed to the serial monitor. but it was.
Not only that...
But this next stage which was specifically integrated into these diagnostics so i had evidence
of the SD Card being read , Not just the DFPlayer starting up and then Assuming the card is read
or having to wait for the Audio confirmation.
All the rest of this completes
Serial.println(F("================================================================"));
Serial.println(F(" READING SD CARD ATTRIBUTES"));
Serial.println(F("================================================================"));
Serial.print(F(" - READ STATE = "));
Serial.print(myDFPlayer.readState()); //read mp3 state . Reading or Not Reading
value = myDFPlayer.readState();
Serial.println(F(" (1 = Reading/ 0 = NOT Reading)"));
//-----------------------------------------------------------------------------------------
Serial.print(F(" - STORAGE VOLUME CAPACITY = "));
Serial.print(myDFPlayer.readVolume()); //read current volume capacity
Serial.print(F(" MB"));
Serial.println(F(""));
//-----------------------------------------------------------------------------------------
// Serial.print(F(" - EQ SETTINGS = "));
// Serial.println(myDFPlayer.readEQ()); //read EQ setting
//-----------------------------------------------------------------------------------------
Serial.print(F(" - READ FILE COUNTS "));
Serial.println(myDFPlayer.readFileCounts()); //read all file counts in SD card //Produces 0
value = myDFPlayer.readFileCounts(); //read all file counts in SD card
//-----------------------------------------------------------------------------------------
Serial.print(F(" - READ CURRENT FILE NUMBER "));
Serial.println(myDFPlayer.readCurrentFileNumber()); //read current play file number
value = myDFPlayer.readCurrentFileNumber();
//-----------------------------------------------------------------------------------------
Serial.print(F(" - readFileCountsInFolder"));
Serial.println(myDFPlayer.readFileCountsInFolder(1)); //read file counts in folder SD:/03 PRODUCES ERROR
Serial.println(F("================================================================"));
Serial.println(F("================================================================"));
Serial.println(F(" BEGINNING SOUND AND LIGHT SEQUENCE"));
Serial.println(F("================================================================"));
Serial.println(F(" - DETAILS :"));
Serial.println("AUDIO ONLY - Started");
///////////////////////////////////////////////////////////////////////////////////////////
Now i know i can rely on 3 things here
READ STATE = 1 (Indicating the SD Card has ACTUALLY Been Read) Because it would be 0 if it wasn't, I've tested this by removing the card during reading
STORAGE VOLUME CAPACITY - Normally i see 512 here even though my SD Card is 16GB.
Haven't worked that out yet but the fact we have a value means something was read.
READ FILE COUNTS IN FOLDER - This return 7 which correct , and i have tested removing files
and it ALWAYS gives the correct number
So if nothing else , but Read File Counts in Folder , we know
Serial Started
Tx and Rx Lines work
There is the appropriate voltage
There are no Short Circuits
The SD Card is inserted correctly and setup properly
The files are on the card and in the correct format
The speaker has been tested to work and connected correctly
and yet we still hear no sound
and... THE BLUE LIGHT ON THE DFRobot Player does not light up
(Indicating that it's not reading from the card)
Now that's weird isn't it
so i go down the road of assuming the DFRobot is faulty
I crack out another 7 of them that i have in my stock
EVERY SINGLE ONE RETURNS THE SAME ERROR
something is weird
Murphy is Messing with me
so i decide to hook this test circuit up
I try this out
EVERYTHING WORKS PERFECTLY AND FLAWLESSLY
Now.....
Go work that one out

So here is what we ABSOLUTELY KNOW
-
We have a pinout of the DFRobot Player

-
Vcc - This works and is tested
-
Rx -
-
Tx
-
DAC_R - Never used , Not Relevant
-
DAC_I - Never used , Not Relevant
-
SPK_1 This works and is tested
-
GND - Grounds are common and tone out and have low resistance between them.
and the tone does not appear on any other pins
-
SPK_2 This works and is tested
-
BUSY - Never used , Not Relevant
-
USB - - Never used , Not Relevant
-
USB + - Never used , Not Relevant
-
ADKEY_2 - Never used , Not Relevant
-
ADKEY_1 - Never used , Not Relevant
-
IO_2 - Not connected or needed
-
GND - As Above
-
IO_1- Absolutely works and skips to next track Flawlessly
Now Regarding Rx and Tx
-
if the lines are faulty then we would not have gotten to the stage of reading the SD Card Attributes and the file count of 7 could not appear
-
I did test the lines with my Oscilloscope and Data Packets did appear
However i can't confirm YET if they were correct
I THINK 2 THINGS NEED TO HAPPEN HERE
- I need to thoroughly test and interrogate the Tx and Rx Pins of the DFRobot player because so far the only thing that makes sense is...
The Device is Not Faulty on the I/O Pins but is Faulty on Tx and Rx or one or the other.
- I need to build a Vero Board Test Circuit for future use to test the DFRobot Player
as a breadboard is unreliable
3, While i'm at it, I also suspect the ESP32 for no other reason other than "" It's Possible"
I have not yet tested the possibility that my pins 16 and 17 may be faulty
I Plan to also build a Vero Board Test Circuit to test Every Pin on the ESP32
as follows
The Pins that can have an LED Attached to them and just blink an LED
I will create a circuit with a standard LED on each pin
I will write a program to cycle through each pin and blink each LED 3 times to confirm working
with a delay of ... let's say 500ms (we'll see)
I can even use the Multi Tasking concepts that we are discussing here to have the lighting up of each data pin to be 1 Task
Overkill...?? YES
COOL..........YES
GOOD EXPERIENCE........ YES
Further to this , if i want to focus on specific pins to be set first
I Can apply priorities to do those first
As for the other pins , i'll have to see what their functionalies are and how to test them
But i think it'll be beneficial to have a test board for DFRobot and for ESP32
My gut feeling is for some reason , Maybe it's still the wiring
But ... this is one of those .... I've tested everything scenario's
All that is left now is.....
Have a rest, Pick it up tomorrow.
Feel free to share your thoughts