I have an audio circuit that started sounding and behaving like there is no ground on the audio side.
I have double, triple, quadruple checked all connections and they are sound.
Circuit: 3.3V optical I2S module. 3.3V PCM5102 module. 3.3V STM32H7 module. 100nF caps on each ones power rail and a 4.7uF cap where the supply enters the breadboard. Breadboard has a single rail wided down the middle of two joined breadboards.
Power: From either a Tenma linear bench supply at 400mA or from a buck/boost RDTech PSU 3.3V/400mA.
Other connections: Fibre optical to a PC. Headphones connected directly to the DAC line out.
Behaviour: The circuit hums or sometimes stops functioning all together, except like a magician when I wave my hand over the breadboard it starts working, but still humming. If I touch any part of the circuit the humming stops. In fact I can touch anything all the back to the frame of the PSUs and the humming stops. It stops if I sit in the right position. At one point it stopped when I touched the radiator and earthed myself when not touching the circuit.
This behaviour just started out of nowhere. No physical changes in the circuit at that time.
If I go out of my way to lower the environmental noise by switching everything else in the room off, the circuit is more stable, but still behaves like a ground is off.
I'm baffled.
I thought it possible I have blown or damaged whatever circuit the PCM5102 is using to obtain it's analouge ground. However it would mean I'd blown two of them as I hot swapped the DAC and the problem did not change.
Could it be the optical I2s module? Well, I removed it entirely and the circuit still hums.
I'm tempted to just recreate the whole circuit on a different breadboard, but it's bugging and I really want to know what is up with it.
Any suggestions?
I did spent half an hour with the scope, but I can't dial in on the hum, it's too low amplitute mixed amonst all the higher frequency digital noise. The 20Mhz bandwidth limit doesn't help, I would need to LP filter it first to see anything. The tone of the sound is definiately mostly 50hz mains, but it always is. It sounds garbled but not digitally garbled, more like exactly what audio sounds like with a ground off is amplified. If anything a little "robotic" sounding, which I am putting down to the digital noise being mixed in along with the hum. I am working on parts of the code that mean I only need to verify the audio is clean, I'm actually scoping GPIO timing signals and they all look "fine". 140mVPP digital noise in the MHz ranges, but clean as a whistle otherwise.
This is an interesting twist, because connecting the scope either to the circuit ground or to the DAC's analogue ground is literally Earthing the whole board.... but it still hums. How is that possible?