How can i play the audio on speakers?

I'm making a project on gesture to speech using arduino uno r3,flex sensors,lcd,dfplayer(first copy)and a 8ohm/0.5w speaker.
Till now i didn't face any problems with connections till lcd but i cannot generate the sound from the speakers.I tried formatting the sd card,we have mp3 files too,added a 9v battery to circuit,checked all connections but still didn't work.It generated some kind of sound from speaker at the beginning but when we tried uploading the code it didn't work.Kindly suggest me some solutions or some alternative that is feasible and easy to use.This is the code-

#include <DFPlayerMini_Fast.h>

#if !defined(UBRR1H)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3); // RX, TX
#endif

DFPlayerMini_Fast myMP3;

void setup()
{
  Serial.begin(115200);

#if !defined(UBRR1H)
  mySerial.begin(9600);
  myMP3.begin(mySerial, true);
#else
  Serial1.begin(9600);
  myMP3.begin(Serial1, true);
#endif
  
  delay(1000);
  
  Serial.println("Setting volume to max");
  myMP3.volume(30);
  
  Serial.println("Looping track 1");
  myMP3.loop(1);
}

void loop()
{
  //do nothing
}



You need to take another look at that wiring.
And the 9V is another point (in excess of spec.)

  • The RX pin on the DFPlayer needs 5v to 3v3 level translation.

You will need an amplifier...

so you're saying it should work with ext. voltage?

how to do that?

why though?can u explain pls

Sorry, I did not carefully resd uour post. Dfpkayer has built in amplifier...

  • BTW, spend some time on YouTube looking at the DFPlayer videos.

SD card should be formatted to FAT16 or FAT32. DFplayer supports only these formats.

ohk i see..thanx a lot :+1:.....i did see some videos though it didn't help much

no pblm :+1:

i already formatted it

Wire it like this --


no deviations.

(No 'amplification' required.)

1 Like

Hello,
I made an audio project with Arduino to play music, I think it can help you with your question.

At the end there is an illustrative video.

ohkk i"ll try it out then...thanx....btw in which site did u do the simulation?

:+1: :+1:

That's from the DFRobot webpage.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.