Hey All!
I am bulding an audio relay step attenuator.
Got the pcb in an assembled, and the attenuator itself works great.
Schematic is included.
I though I would be smart and avoid ground loops between different input devices, so I kept the grounds of the different devices seperated and only switch in the ground of the device I have selected with the relays.
Because the whole setup consists only of passives and relays there is no electrical connection between the audio signals/audio ground and control signals/digital ground: The attenuator is fully isolated from all digital circuitry, power supplies, etc. I liked this, because I though this would keep any noise coming from the control circuitry out of the signal (Except of course any noise due to capactive coupling between traces)
To test the circuit I had the output connected to a headphone amp, the input connected to the headphone output of my laptop and the stm programmer hooked up. Everything worked great.
Until I unplugged the programmer. I was getting a ground loop style buzzing in the headphones. Not loud, but very much audible and annoying.
I realize that while the Programmname was connected the signal ground and digital ground where of course tied together, but are now completely isolated again. If i electrically connect the two grounds togehter on the board the buzzing goes away.
Similarly, if I hook up my phone as the input (which is floating ofc) I get a very similar bussing. Connecting the grounds together gets rid of the problem.
I am at a loss. I don't understand what is going on.
When I hook up the phone directly to the headphone amp all is good.
Now - I could just tie analog ground to digital ground at the power supply with a net tie, but I would rather understand what is going on. Is there anything I am doing wrong?
Could there be some kind of large swing between the two circuits that is coupling through, and by tieing them together I am getting rid of that?
Any Ideas?