Audio from Arduino Uno/Mega2560

I am trying to play a variety of audio clips recorded from video and converted to .Wav files on either an Uno or Mega2560. So far I have been successful with one file only but not all the files I want to use. I have used a circuit diagram suggested as well as libraries suggested but I have not been able to recreate the required output. I have tried different things to no avail. I am trying a different approach for amplification (which originally worked). I am trying to use a PAM8403 class D stereo amplifier and the SPI/SD libraries to get the necessary sound effects I am that looking for. Everything is connected correctly based on both boards, the only difference being the PAM8403 as the amplifier in place of transistors, which is connected to pins 9 or 10 to the audio output. It will play the first file but that's all. ANY help will help be greatly appreciated! Delta is helping a great deal with the main components of the sketch but unfamiliar with using audio. I know that I am missing something but its eluding me at this point. I do get "noise" from my speaker but no audio output. We are getting to the point where this will be necessary to complete the project.

Attempts, pins and tries. How do You think helpers can suggest anything useful? How to suggest any changes?
Take the time, read and consider this link: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

I am probably going to pay for this, but the experienced programmers would know how the SPI/SD card reader is connected as well as the amplifiers and sketches used. So this reply is as useful as an enema. You are referring me to something which I know and TBH I expected this. But the everything has already been posted by myself in previous questions You want schematics and sketches, Ok, I can repost them. I can also repost the experimental .WAV files. I am hot, tired and a little irritated tonight. I can explain everything in plain English but I guess that is enough, I am sorry, I guess the Las Vegas heat is getting to me.

Check your file names. Try DOS 8.3 compliant. It would explain why some files work and others don't.

Why did you start a new thread?

Why did you not at least post links to the other threads where we might learn anything at all about your problem?

You basically wrote that everything is correct, don't worry about hardware or software, but, um, it doesn't work…

Can't you see that might make it hard to help?

a7

I cant see the transistors because you havent linked to the circuit diagram.

Do you want us to search for them or could you post links? We want to help but you arent making it easy.

how long are the audio clips? if a few minutes have a look at ISD4004-Based-Voice-Recorder modules

an ESP32 may be a more suitable microcontroller - try a web search for esp32 audio, e.g. esp32-based-audio-player

I am sorry about last night everyone, it seemed like everything I was doing on the computer was a battle with my internet connection and I got aggravated, irritated and frustrated and took it out on you guy's. My apologies. I am at work right now but will post it tonight after i get home.

Once again I am sorry for my outburst last night, I was ready to throw this computer through the nearest thing I could. I was having serious internet issues last night, my computer kept telling me i had a connection but every time I tried to get online it told me that I had no connection. I fought with it for over an hour and finally did a hard reboot on everything and just wanted to get my question out there before everything went haywire again.
I think I found a work around for the issues I am having and ironically it seems to be using a different device to create audio, a DFP mini Player, which by all accounts from all I have read I couldn't use to do what I need. But now there seems to be a tutorial on doing just that, which Delta_G came across and its one I hadn't seen yet.
Thank you everyone for attempts at helping me solve these issues and again i am very sorry for my outburst last night, I will let all of you know how things work out.

1 Like

S' all good, no worries. I think I can say we all been there or at least in the neighborhood.

Right here now it's the heat so hot that's what I'll blame anything on. :expressionless:

a7

Same here, Vegas is like the doorway to Hell, and Phoenix the hallway. Oh, and then there is Death Valley, the receiving room, lol.

Ok, I am using the DFPlayer mini and a PAM8403 class D amplifier as opposed to the SD card reader and PAM8403. I am not only getting audio now but much better audio though with some distortion and the "clicking" sound has seemed to diminish using filters, though I could probably use a higher rated capacitor as I am using a 47uF cap.
I have read that the max volume is 35 but my current volume setting 50 with no issues. I have also been working with a variety of small speakers. I am going to try a 470uF cap next once it comes in for the filter and try cleaning up the audio using Audacity to try and remove as much background noise as possible.

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