Hi there, new to the forum so apologies if this is posted in the wrong location, or wrong format. I have been using code samples from here to futher my learning with all aspects of the arduino but struggling with the DFPlayer Mini.
A play with it a few weeks ago it seemed straightforward, sound was very quiet so I tried to wire in a amp board (LM386), didn't have a lot of luck, it did suggest the use of a capacitor for better sound, I purchased the PAM8403 Board as it seemed to include the necessary capacitor. Still no luck but the problem may now be my original connecting of the DFPlayer Mini as even when I cut out the amp boards I always get the message "Connecting to DFPlayer Mini failed!" The forum suggests I must have the RF TX pins the wrong way around, I haven't. A suggestion on FB said connected both Grd, which I did but made no difference. I also swapped the DFPlayer out for a new one in case any previous attempt had caused an issue with the board.
At this stage no amp board just trying it get things working before I then moved back on to finding a suitable amp board. I've also removed it from the bread board and connected directly from pins to speaker/arduino and same results. Thank you.
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
// Use pins 2 and 3 to communicate with DFPlayer Mini
static const uint8_t PIN_MP3_TX = 2; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 3; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);
// Create the Player object
DFRobotDFPlayerMini player;
void setup() {
// Init USB serial port for debugging
Serial.begin(9600);
// Init serial port for DFPlayer Mini
softwareSerial.begin(9600);
// Start communication with DFPlayer Mini
if (player.begin(softwareSerial)) {
Serial.println("OK");
// Set volume to maximum (0 to 30).
player.volume(30);
// Play the "0001.mp3" in the "mp3" folder on the SD card
player.playMp3Folder(1);
} else {
Serial.println("Connecting to DFPlayer Mini failed!");
}
}
void loop() {
}
How do I lay the schematics out, do I need to go to any specific software to draw them or just sketch on paper and upload? sorry new to the forum in terms of posting a question.
On the DFPlayer Board. Down the left side I have top pin going to 5v on Arduino. Next pin goes to pin 3 on Arduino. Next pin to resistor then to pin 2 on Arduino. Next pin and last pin to speaker. On the left and right side the gnd is connected to gnd's on Arduino.
Apologies I thought the speaker was in the photo, it’s a 3 Watt 4 Ohm Single Mini Speaker. The resistor is a 1k, that’s in the picture I always assumed the lines on it meant something to someone who knows lol, I only know it’s 1k as a bunch of them are attached to a label tab saying so.
Thanks. You missed the powering of the UNO. It can be more than important.
No Arduino should be used as power supply, no matter how the Arduino is powered. The UNO 5 volt should not be used for powering speakers. Get a separate power supply for the DFPlayer.
I actually use a bench top variable power supply but was getting the same results, I took the project to work to have one last try and take the photos and post for help and only then have I plugged it straight in to the Arduino 5v. (I thought it would be easier if I had eliminated the additional power supply as the result was the same)
I did not see a question, so I am guessing "quiet" is your question.
It is possible your DFPlayerMini volume is set to something low (range is 0 to 30).
The speaker will have a part in it. A sturdy speaker will be weak. A cheap "passive buzzer" will be louder.
Another part is the fidelity (bits used in sampling). I can get a reasonable volume "beep" out of low-bit-rate, digital tones, but high bit rate sound like a mosquito.
Try connecting the DFPlayerMini in "I/O Mode"... no Arduino needed. Just a few connections: VCC, GND, SPK+, SPK-, and a jumper wire to ground IO_1 or IO_2. This will give you volume control and NEXT/PREV file selection. Search "DFPlayerMini I/O Mode"
You can test with the UNO powering everything although indeed an Arduino is not a power supply. (From what I read the system will draw something like 200 to 300mA anyway - electrical input of the whole circuit, about 1 to 1.5 W, including the Uno - so you’ll be far from the 3W limit of your speaker)
Those are your instructions, not your wires. How do we know you connected the wires correctly? You mentioned the breadboard was gone; that implies soldered connections, which is a good idea, but now close-up photos of the solder joints are needed.
Of course, it could be the software, but until someone can try it, that is still unknown.
I connected the pins from the player to the Arduino, using the wire that’s are plugs on one end and pins on the other. My connections are correct from the right pin to the right pin. There is only 2 wires that from go from the sound board to ports on the Arduino, not including the power and ground wires. The program always says connection failed.