I hope somebody can help me with this. I have built an audio amplifier inspired by a youtube video. In my case I had already available a PAM8610 which has a stereo input (but they are not independent as they share the ground.)
As perhaps the schematic is not the best, here is a brief description of what it does: It mixes the audio from left and right channels into the left input of the audio amplifier, and the left output goes directly to the main speakers. Also from the left output I take the signal through a 1:1 audio transformer and I filter with a low-pass filter. In addition I add a potentiometer to regulate the volume of the subwoofer. The signal from the potentiometer then goes to the right input of the audio amplifier and from the right output goes directly to the subwoofer.
The problem is that the output has a lot of hum noise, and the only way to get rid of it is decreasing totally the volume on the subwoofer side. I optimized as much as I could the build, but it seems that there is something wrong with the grounds, perhaps it is bad practice to join together two grounds as I did.
Is there any way to address the hum noise in my amplifier, or there is a better way to build the circuit in a better way to get the desired outcome?
Edit: I changed the sketch as is wrong in the output section