I have built a Bluetooth speaker (based on this Instructable), which works except there is a faint clicking noise in the background. This is a basic diagram of the circuit for the speaker:
I am almost certain that the problem is caused by a ground loop, because I have tried using a separate power supply for the Bluetooth adapter and this fixes the problem. However, I need to be able to power the speakers and the Bluetooth receiver from the same battery.
I read online that someone else fixed a similar problem by adding an audio transformer to the left and right channels. I tried using an NTE1 1:1 audio transformer, and this did not help. With the transformer connected the speaker was actually worse, because it only made static noise and did not play audio.
If the problem is indeed a ground loop, I would not really expect an audio transformer to fix it because the problem is with the power wires rather than the audio wires. I think a ground loop isolator would solve my problem, but when I researched them online, the only products I saw were adapters made to be used with audio systems like this.
This is probably a really noob question, but I am not sure how to fix the ground loop problem with just small circuit components. How would I go about this?