Hi! I realise this issue has been discussed elsewhere. There is a solved thread regarding a Nano, but I don’t understand the solution and am using a Uno anyway.
To get started I want to play an MP3 file using the PlayMp3 sketch from the DFPlayer_Mini_Mp3 library examples.
I also tried the GetStarted example of the DFRobotDFPlayerMini library.
Since I’m blind, I will verbalise the circuit rather than posting a diagram.
I have a Uno R3 linked to the computer via USB.
The pins of the DFPlayer are connected as follows:
(leftmost) goes to 5V, 2. goes to GND, 3. goes to RX, 4. goes to TX, 5. is connected via breadboard to an 8 Ohm speaker, the other end of the speaker goes to GND
The SD-Card in the player is formatted to FAT 32. The file is named 001.mp3 and located in a folder named 01, as per documentation.
When uploading, the speaker emits a few short clicks and a buzz of about one second. When disconnecting and reconnecting only the clicks are emitted.
What could be the problem here? I would really appreciate some advice. Thanks!
Sorry, the module only has six pins.
Since I can't see which pin is which, I had ChatGPT describe them for me from left to right.
VCC, GND, TX, RX, speaker 1, speaker 2
On an Uno (and Nano) the Tx and Rx pins are hard wired to the USB interface. You should be able to use them for the DF Player but you may run into issues if still connected to USB, and you lose your Serial monitor functionality which is so useful in debugging.
Better have a separate SoftwareSerial instance to connect the DF Player. Use one of the many examples out there.
Also remember to connect Tx of the Arduino to Rx of the player, and vice versa.
I apologize. There was a misunderstanding at my end. I was given an sd-card reader believing it to be the DFPlayer Mini MP3.
I now have the correct item. Thanks to your reply, I knew how to wire it.
However, the title of this thread still holds.
When I upload the GetStarted example from the DFRobotDFPlayerMini library, nothing happens.
When I upload the FullFunction sketch from the same library, I hear a short burst of one file, then a longer passage from another file, where the volume quickly shifts up and down. Play ends before the file is complete.
At least that seams to show that I wired the circuit correctly, but what might be the problem here?
I realise my last Question was too vaguely put to be answered. Sorry about that. It reminds me of a guy asking me at a party: „You know about computers? I’ve got trouble with Windows. Any idea what it could be?“
Anyway, I got the DFPlayerMini to work, but I do now have a specific problem with it.
I set the volume in the setup function, then play a file (still in setup), and then play several files in the loop function.
The volume level is applied only to the first track. The other tracks are played in what I assume is the player’s default volume, which is also applied if no volume is set. It sounds like 30 (max).
Placing another volume command in the loop has the effect of no track being played after the first one from setup.
I’d be glad of any advice.