Help with pro Micro Board power supply

I am making a simple mp3 using a Diymore Pro Micro Board (32U4) and a mini dfplayer, but I'm having problems with the power supply:

the mini dfplayer works as standalone when powered by the pc and power socket, but if I use it together with the pro micro it works if connected directly to the pc with the USB port, but does not turn on (not even the LED) if powered with the same voltage and current but through the Vcc/Raw pin (tried with both).

i searched around a bit and found out that it may be a problem with the code (about serial command depending on the serial monitor on ARDUINO IDE?) but usually those problems had the on board LED turn on at least

what may the problem be?

code if needed

#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

int serial1 = 8;
int serial2 = 9;

SoftwareSerial mySoftwareSerial(serial1, serial2); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);

void setup()
{
  pinMode(serial1, INPUT);
  pinMode(serial2, OUTPUT);

  mySoftwareSerial.begin(9600);
  Serial.begin(115200);

  Serial.println(F("Initializing DFPlayer ..."));

  if (!myDFPlayer.begin(mySoftwareSerial)) {
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
  }
  else
  {
    Serial.println(F("DFPlayer Mini online."));
  }

  myDFPlayer.volume(30);  //Set volume value. From 0 to 30
  myDFPlayer.play(1);  //Play the first mp3
}

void loop()
{
  if (myDFPlayer.available()) {
    printDetail(myDFPlayer.readType(), myDFPlayer.read()); //Print the detail message from DFPlayer to handle different errors and states.
  }
}

void printDetail(uint8_t type, int value) {
  switch (type) {
    case TimeOut:
      Serial.println(F("Time Out!"));
      break;
    case WrongStack:
      Serial.println(F("Stack Wrong!"));
      break;
    case DFPlayerCardInserted:
      Serial.println(F("Card Inserted!"));
      break;
    case DFPlayerCardRemoved:
      Serial.println(F("Card Removed!"));
      break;
    case DFPlayerCardOnline:
      Serial.println(F("Card Online!"));
      break;
    case DFPlayerPlayFinished:
      Serial.print(F("Number:"));
      Serial.print(value);
      Serial.println(F(" Play Finished!"));
      break;
    case DFPlayerError:
      Serial.print(F("DFPlayerError:"));
      switch (value) {
        case Busy:
          Serial.println(F("Card not found"));
          break;
        case Sleeping:
          Serial.println(F("Sleeping"));
          break;
        case SerialWrongStack:
          Serial.println(F("Get Wrong Stack"));
          break;
        case CheckSumNotMatch:
          Serial.println(F("Check Sum Not Match"));
          break;
        case FileIndexOut:
          Serial.println(F("File Index Out of Bound"));
          break;
        case FileMismatch:
          Serial.println(F("Cannot Find File"));
          break;
        case Advertise:
          Serial.println(F("In Advertise"));
          break;
        default:
          break;
      }
      break;
    default:
      break;
  }
}

The player needs more power than the board can supply, use an external power supply like a battery pack or a wall wart.

1 Like

What kind of power supply are you using? Did you connect GND as well? I can not help you further with hardware issues.

However, the Pro Micro has a free serial port on pins 0 and 1 that you can use for the DF player instead of SoftwareSerial. From that perspective it differs from the Uno/Mega/Nano).

1 Like

Thanks i did not know of the 0 and 1 pins.
The gnd Is connected and seeing as i don't have a Power supply at home i Simply cut off the broken part of a phone charger and used that connected to a pc socket, then to a phone charger

Thats the weird part, the music played while the only Power source was the USB for programming the board, but not while powered With the Power socket

Then the power socket is under powered or defective. I was assuming you didn;t want to use USB which always works.

After testing again, i can confirm the issue should be With the program, as i tried again all possibile combinations of device-power source, and even powering both the board and the dfplayer works by using the Power socket only if the dfplayer Is set up as stand alone (With the Adkey PIN going to ground)

How should i change the program?
Simply removing software serial and exchanging It With serial alone?
I've never used RX/TX pins

Replace all mysoftwareSerial with Serial1.

I think you are missing the point, the esp32 will not work if you try to make it power the dfplayer. You must use a seperate PSU for the dfplayer and USB or VIN for the board.

That should not be a problem, i should be able to give enough Power to both, the problem was that the Arduino was supposed to work even while disconnected from the computer, even if the Power supply was not coming from the computer itself

I am concerned I am still not getting the point across.
One power supply for the Arduino. Either USB (can be connected to a PC or a wall wart) or through the VIN pin from a wall wart.
A TOTALLY separate power feed from a large battery or wall wart for the sensors/radios. Do NOT share as there can be noise issues, power dips. Be sure to connect the grounds though.

I'm Sorry i misunderstood
Thank you for clarifying that, or i would have tried to Power both of them With a battery and a step up After finishing the code

1 Like

No problem, it's probably the most common issue we deal with here.