Missing ground hum, but no missing ground. - Page 1
Forum section: electronics / beginners

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 09:59:04 am
content: 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?

author: CountChocula
author_rank: Unknown
timestamp: February 01, 2023, 11:24:33 am
content: If you think the problem has anything to do with interference, you could try covering the board (including the bottom) in tin foil or some other kind of shielding (without shorting anything, of course) and see if that makes any difference. If feasible, you could also move the circuit to a different room in your house to see if that makes any difference and helps you narrow down the problem.Have you looked at your I2S connections and made sure thatthoseare solid / working properly / within spec, especially when it comes to ringing and slew rate? I've had all kinds of trouble in the past from a bad bit clock that created distortion Ithoughthad something to do with the analog parts of the circuit, and learned the hard way never to leave any pin on the audio board floating (on the PCM5102, that includes grounding FLT, DMP, FMT, and SCL if your board breaks them out).I hope this helps a bit. Good luck!

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 11:44:46 am
content: Quote from: CountChocula on February 01, 2023, 11:24:33 amIt could be environmental. Some other bit of kit could have developed a fault or ground loop and it's not my circuit that's "broken", it's just highly suspetible being on a breadboard.I2S connections. I did check the output bit clock to verify the sample rate and it looked about as messy as normal. Sort of rounded off square wave, descently sharp overall rise, but small amount of rounding and ringing.I'll check the others too.My suspicions are around there being more than one ground in play, certainly on the PCM5102. I have scoped it's analogue side before and with the scope ground connected to the general breadboard ground it's noisey as hell. However with the scope connected to the DAC's analouge side ground it's a hell of a lot quieter. This little PCM5102 modules are not that well made. I have ripped the 3.5mm surface mount audio socket off one of them and had to resolder with a bodge wire to fix it. (I have 3 of them though and swapping them doesn't help).The STM32H7 has multiple ground circuits as well. I believe they are mostly all soldered together though.It's this "field effect" response to my hands/body moving around near it or touching it altering the behaviour. It has to be that the ground is floating around all over the place. How do I scope a ground? The scope ground is already connected to earth... so if I just connect the probe tip to the circuit ground that will show me the pure ground + all the environmental noise relative to Earth?

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 11:54:51 am
content: So I'm not sure how valid a test this is.Scope probe ground is disconnected. Scope tip is connected to the circuit ground.The 380kHz is a red herring. If I move the trigger around I can get it to say nearly any Hz. Just depends on which bit of noise it's triggering on.

author: CountChocula
author_rank: Unknown
timestamp: February 01, 2023, 01:20:49 pm
content: Can you maybe post a pic of your board? It really sounds like some kind of wiring issue.

author: wasedadoc
author_rank: Super Contributor
timestamp: February 01, 2023, 01:33:11 pm
content: Connections on plug-in breadboards are not reliable.

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 01:44:02 pm
content: Quote from: CountChocula on February 01, 2023, 01:20:49 pmThank you! I took the photo and was resizing it for upload when I noticed 2 anomolies. The way one pin was hiding another. The first was the SCK line to the DAC. Turned out to be a red herring, even when I replaced the wire completely.Then I replaced the slightly wonky looking ground jumper wire to the DAC. No effect.Then on the photo I finally noticed the MCK line from the Optical board to the DAC was not in fact connected to the MCK pin, but the "no idea" unlabeled pin beside it. Very hard to spot, because when you look at it, you assume that each wire is meant to be in a slot of it's own in a neat row, but no, there are 2 lines from the MCLK.Fixed that and .... no hum, no noise. I can poke it, prod it, shake it and jiggle the wires and it's stays quiet and stable.I just knew it had to be something dumb and simple. I just couldn't spot it. Bizarre way for it to manifest, but I expect if the DAC has a pull up/down on that line in anyway, it coupled whatever was on that "unlabled" pin to be amplified by the DAC output. It might even just be a dead floating pin with a whole bunch of digital pins beside it.

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 01:47:44 pm
content: Can you spot it?

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2023, 01:48:51 pm
content: As this is the beginner forum...Don't be like me. Don't be a dick. That + rail croc clip right beside the USB port of the H7 is a dead H7 waiting to happen.It was temporary! I promise!

author: CountChocula
author_rank: Unknown
timestamp: February 01, 2023, 02:22:59 pm
content: Glad you found it… it's the curse of working with breadboards :-)Cheers!—CC