Go Down

Topic: How to connect pam 8603 audio amplifier with sd card? (Read 262 times) previous topic - next topic

Anvay

How to connect pam 8603 audio amplifier with sd card. I am building a mp3 player with arduino. But volume is very low. So i bought a pam 8603 amplifier. So how should i connect it to sd card for input?
Please help me

MarkT

Its an audio amp requiring analog signal inputs.  An SD card is not an analog device.

You need to read the contents of the card digitally, then feed that to a DAC which can generate
analog audio signal.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Anvay

Thanks for responding.
I was able to play music by amplifying sound.however now iam getting lot of background noise from speakers
Please help me

Grumpy_Mike

How have you wired it up?
How is it being powered?
How about reading how to use this forum sticky post so you can ask better questions?

Anvay


DVDdoug

Quote
however now iam getting lot of background noise from speakers
Please help me
Test the amplifier for noise with nothing connected and then by connecting something else...    The output from your soundcard, or the headphone-output from your phone, or iPod, or the RCA audio outputs from your TV, etc.

If the amplifier tests-out OK, the noise is obviously coming from the Arduino (or your audio shield/DAC).  

And of course, any noise out of the Arudino is going to be amplified along with the signal and the noise is going to seem worse when amplified.

Anvay

If the noise is coming from arduino, is there no way to solve it?  I am tat sound is coming from arduino.

DVDdoug

Quote
If the noise is coming from arduino, is there no way to solve it?
That depends...  You haven't shown us a schematic or your code...

If you are really  playing MP3s, I'm pretty sure you have an MP3 board/shield with an MP3 decoder, DAC, clock, etc. and the Arduino itself has nothing to do with "sound quality".

8-bit audio has something called quantization noise* which "rides" on top-of the signal (it isn't there when there's no sound).    8-bit quantization noise is not terrible,  especially when the sound is "loud", but it's not "CD quality"  or "MP3 quality" either.   If you hear a little "fuzzy noise" during quiet parts, that's probably quantization noise.

 
PWM audio has noise which can be audible if the PWM frequency is within the audio range (below around 20kHz).

You won't get those issues with a 16-bit DAC.  (And, DACs don't use PWM.)    But, you can still get noise through the power supply, and if something's fouled-up there are lots of ways to get distortion.





* All digital audio has quantization noise but it's inaudible with 16-bits or more.

Anvay

Sorry to everyone who replies to me. Let me explain clearly. Actually its a wav player. I have put the music in the following specs:
1. Bit resolution= 8- Bit
2. Sampling rate= 16000Hz
3. Audio channel= Mono
4. PCM Format= PCM unsigned 8- Bit

The speaker is- 8 ohms, 0.5 watt speaker

I have also attached a picture of then schematic below.
I have used a pam 8403 audio amplifier.
I am also giving the link of the code below:
https://pastebin.com/C3SZxre8

I hope that using the information given my problem will be solved

Anvay

One thing I forgot to mention is that when i connect Arduino to the power supply for the first time without playing any music through it, the background crackling sound is constantly appearing through speaker.Moreover after I play a song through speaker and it ends the background crackling increases than than the first time when no song was played. There is crackling while playing music also. Please help me.

Grumpy_Mike

Quote
I am also giving the link of the code below:
No, that is not how it works round here. You need to post the code correctly please see the how to use this forum sticky post.

Also that is not a schematic, it is a physical layout diagram and is next to useless. What are the parts in it? What are the connection labels?

I do see from it you have connected something directly to the Arduino that looks like an SD card, these are 3V3 devices and you are feeding them with 5V signals.
You have no supply decoupling capacitors in that setup and the grounds are not connected in a star configuration. Try an AC coupling into the amplifier with a 4K7 connected to ground. Solderless bread board is next to useless for analogue signal use.

Anvay

The sd card module does not work at 3.3 v. When i power ut with 3.3v the serial monitor says sd card failed

MarkT

What module?  We can't really help if you don't provide full details of all the hardware involved and how it
is powered, and the code...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up