ArduinoTroubleshooting

DFPlayer Pro repeating "MUSIC"

userHead RichardS 2023-11-08 00:18:05 315 Views0 Replies

I have several DFPlayer Pros and I'm running into the same problem.
The DFPlayer Pro on power up repeats the word “MUSIC"

 

I appreciate the help.


I have an adjustable power supply supplying power to the board with a 100pF cap before going into the DFPlayer.

I have varied the voltage from 4 to 5 volts with the same result.

 

I am using a 4 Ω 3W speaker as was recommended on the wiki. I am only using the right speakers.
I want the speaker to operate at 50% output, I have reduced the output to 5% while it repeats “MUSIC”

 

The DFPlayer is typically connected to a nano which connects over serial.

I have removed the nano and now only the DFPlayer is connected.

On the image below the D10 and D11 wires lead to an empty header at the moment.

 

Because the nano is not connected it is currently not affecting the board at all.

The code below is what is on the nano:
 

#include <DFRobot_DF1201S.h>

#include <SoftwareSerial.h>

#include <FastLED.h>


 

SoftwareSerial DF1201SSerial(10, 11);  //RX  TX

const int buttonPin = 2;

const int leddatapin = 6;

const int numLEDinStrip = 30;

int buttonState = 0;

bool done = false;

DFRobot_DF1201S DF1201S;


 

CRGB leds[numLEDinStrip];


 

void setup() {

  delay(5000);

  Serial.begin(115200);

  DF1201SSerial.begin(115200);

  while (!DF1201S.begin(DF1201SSerial)) {

    Serial.println("Init failed, please check the wire connection!");

    delay(3000);

  }

  DF1201S.setVol(5);

  Serial.println("Setting Volume");

  delay(2000);

  DF1201S.switchFunction(DF1201S.MUSIC);

  Serial.println("Setting Function");

  delay(2000);

  DF1201S.setPlayMode(DF1201S.SINGLE);

  Serial.print("Setting Play Mode: ");

  Serial.println(DF1201S.getPlayMode());

  delay(2000);

  DF1201S.setPrompt(true);

  Serial.println("Setting prompt");


 

  FastLED.addLeds<WS2812B, leddatapin, RGB>(leds, numLEDinStrip);

  for (int i = 0; i < numLEDinStrip; i++) {

    leds[i] = CRGB::Black;

  }

  Serial.println("====================================================");

}


 

void loop() {

  buttonState = digitalRead(buttonPin);

  if (buttonState == HIGH && done == false) {

    Serial.println("Open");

    DF1201S.next();

    for (int i = 0; i < numLEDinStrip; i++) {

      leds[i] = CRGB(120, 120, 120);

    }

    FastLED.show();

    done = true;

  } else if (buttonState == LOW && done == true) {

    DF1201S.pause();

    done = false;

    for (int i = 0; i < numLEDinStrip; i++) {

      leds[i] = CRGB::Black;

    }

    Serial.println("Closed");

    FastLED.show();

  }

}