Hello,
Im trying to make run a DF Player mini with my Arduino Nano33 IoT with no success.
I'm pretty sure the hardware connections are OK because when I try to make it run with an Arduino UNO, I have no issues.
The connection is as follows:
- I have a common GND for the Nano and the DF Player.
- Vcc for the Nano comes from the USB of my laptop.
- Vcc for the DF Player comes from an external supply (6V, 2A).
- I connected SPK_1 and SPK_2 to the speaker.
- I connected RX and TX to pins 4 and 5 (Tried RX to pin 5 / TX to pin 4 and the opposite, to make sure).
As I said, with this connections in an UNO, everything works fine.
This is my code:
#include "wiring_private.h"
#include "DFRobotDFPlayerMini.h"
Uart mySerial (&sercom0, 4, 5, SERCOM_RX_PAD_1, UART_TX_PAD_0); // Conecto Tx del DFPlayer al pin 4 y Rx del DFPlayer al pin 5 y creo una comunicación serie por ahí.
DFRobotDFPlayerMini myDFPlayer;
void setup() {
mySerial.begin(9600);
myDFPlayer.begin(mySerial);
myDFPlayer.volume(20);
myDFPlayer.play(1);
}
void loop() {
if (myDFPlayer.available()) {
myDFPlayer.play(1);
}
}
The only difference is that with UNO I use SoftwareSerial library and that with Nano33 IoT I use "wiring_private.h".
Does anybody know where am I wrong?


I connected RX and TX to pins 4 and 5 (Tried RX to pin 5 / TX to pin 4 and the opposite, to make sure).
So you are trying to connect a 3V3 system with a 5V system. this is not a good thing with nothing in between to limit the signal. You could have already damaged your Nano33 IoT.
What you should have done is to connect the Vcc line on the DF Player to 3V3 not 6V. A supply of 6V is too much anyway according to the data sheet. What this means is that the output from the DF Player is a 6V signal, the maximum your nano can take as an input is 3V3, so the chances are it is blown. Test the pins you are using with a LED and resistor to see if it still works as an output. Then test it works as an input by setting the internal pull up resistors and reading the pin when you pull it down to ground with a wire.
If it still works then connect the Vcc to 3V3.
I use "wiring_private.h".
Why? What advantage does this give you?
I've checked the pins as you suggested and they are fine (I'm a lucky man).
Then I've put a logic level converter between the Nano and the DFPlayer to make sure that no 5V "attack" the Nano, but still no results.
I was using "wiring_private.h" because I thought I needed it in rder to create a second serial communication. Any way, I've tried to test with the RX and TX pins and still no results.
My code for this test was:
#include "DFRobotDFPlayerMini.h"
DFRobotDFPlayerMini myDFPlayer;
void setup(){
Serial.begin(9600);
myDFPlayer.begin(Serial);
myDFPlayer.volume(20);
myDFPlayer.play(1);
}
void loop(){
static unsigned long timer = millis();
if (millis() - timer > 3000) {
timer = millis();
myDFPlayer.next(); //Play next mp3 every 3 second.
}
}
I'm quite sure I'm not communicating with the DF Player, but don't know why.
Any ideas?
Sorry not without looking at the serial signals with an oscilloscope.