I've got this cheap pam8403 modules and tried it with the raspberry pi 3 and there is a huge noise on the output. The power source is the same for both as you can see in the picture. Why there is this noise and what can I do to reduce it ? I don't want to separate the powers.
EDIT: I managed to reduce the noise by adding a transformer (which I got from and old dial up modem) on the input line between analog gnd and right channel. I also added some caps on power line. I thinks its the ground loop problem and this way the ground loop is isolated somehow. The only thing that is left is a small hiss sound which I think it's possible to reduce by adding some low pass filters on input line or on the speaker output maybe.