Except for the audio file, there is a sizzling and high-pitched sound from the speaker I connected to the arduino through the amplifier. how can i solve this problem
the materials i use :
arduino mega
pam8610 amplifier
10W 4ohm speaker
Since it is a two channel amplifier, what do you have the second channel connected to? Have you shorted the input to ground to see if the sound comes from the Arduino or from the amp, itself? Do you have all the input connections far away form the power connections and the speaker connections?
Paul
Please tell us which Arduino board you use and show the sketch and tell us how it is connected. Can you make a recording of the sound ?
The Arduino Uno is not the right board for audio. There are libraries that are able to make sound and music, but they can have high-pitched glitches.
Are you connecting a 5V square wave to a sensitive line input of a amplifier ?
What kind of speaker is it ? Maybe the speaker is overpowered.
Hi,
1- There are two speakers connected to the amp circuit
2- No, but I connected the amp circuit to the phone and computer and tested it, the sound came out smoothly.
3- there is no idle connection. I should also mention that the speaker and arduino are fed from separate sources and the gnd lines are not combined, is it a problem?
1- i am using arduino mega in my project
2- Unfortunately, I can't record the sound right now, but there is a high-pitched scream-like sound and sizzling.
3- I'm connecting a 12V 2A adapter to the amplifier (PAM8610). But I don't know about wavelength. ((my first arduino project with sound))
Ok, now, do you have the required capacitor between the Arduino pin and the amplifier input?
So, the bad sound is coming exclusively from the amplifier? With the input shorted, there is no signal from that connection. What are you using for powering the amplifier?
Paul
1- arduino directly connected to amplifier
2- no, when i connect the amplifier to phone or computer i get good sound. i only get bad sound when i connect it to arduino
3- i only get bad sound when i connect it to arduino (12V 2A)
Its likely digital noise on the 5V supply I reckon. Use better supply filtering to the amplifier module, or a separate 5V regulator for it if you have a higher voltage rail to power it. Make sure you use star-grounding layout with audio, you don't normally get away with haphazard wire routing.
The 8 bit source will also be producing spurious noise (quantization noise) that you may be able to hear and which can only be dealt with by moving to higher bit-depth.