I have created a raspberry pi zero controlled speaker box. I am using a PCM2704 USB DAC (this one:
https://www.aliexpress.com/item/5V-USB- ... 89429.html) and a TPA3118 based amplifier https://www.amazon.com/gp/product/B015F479C2/.
Right now, I am powering the amplifier with 4 18650 cells in series (3.7V x 4 = 14.8 V) and I am powering the pi with a little USB power bank. I have the amplifier hooked up to a 15W speaker and a tweeter. This works fine, and sounds great.
The amplifier has a spot to solder a LM78Mxx LDO regulator. So I bought one and soldered it on and I now have a 5V regulated source to power the Pi. To quickly test if it works, I simply hooked up the ground and +5V of the LDO to the ground and +5V GPIO pins on the raspberry pi zero. The Pi powered on, and I could immediately hear hissing, pops, and noise from the speaker. This scaled with the volume knob on the amplifier. Upon playing sound (I push a button to run a script which plays a sound), the sound plays, but there is definitely the hiss and such in the background.
I expect this is because the USB sound card shares a ground with the Pi, and the ground of the Pi is connected to the ground of the Amplifier, so there is some kind of ground loop.
Question 1: Where is the noise even coming from?
Question 2: Is there any way to isolate the Pi/USB DAC so I don't get this noise/hissing/popping while still getting power from the regulator on the amp?
Thanks for your time.