Author Topic: Missing ground hum, but no missing ground.  (Read 721 times)

0 Members and 1 Guest are viewing this topic.

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Missing ground hum, but no missing ground.
« on: February 01, 2023, 09:59:04 am »
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?
« Last Edit: February 01, 2023, 10:15:56 am by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline CountChocula

  • Supporter
  • ****
  • Posts: 197
  • Country: ca
  • I break things—sometimes on purpose.
Re: Missing ground hum, but no missing ground.
« Reply #1 on: February 01, 2023, 11:24:33 am »
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 that those are 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 I thought had 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!
Lab is where your DMM is.
 

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #2 on: February 01, 2023, 11:44:46 am »
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 that those are 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 I thought had 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!

It 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?

« Last Edit: February 01, 2023, 11:49:38 am by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #3 on: February 01, 2023, 11:54:51 am »
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.
« Last Edit: February 01, 2023, 12:03:55 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline CountChocula

  • Supporter
  • ****
  • Posts: 197
  • Country: ca
  • I break things—sometimes on purpose.
Re: Missing ground hum, but no missing ground.
« Reply #4 on: February 01, 2023, 01:20:49 pm »
Can you maybe post a pic of your board? It really sounds like some kind of wiring issue.
Lab is where your DMM is.
 

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1354
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #5 on: February 01, 2023, 01:33:11 pm »
Connections on plug-in breadboards are not reliable.
 

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #6 on: February 01, 2023, 01:44:02 pm »
Can you maybe post a pic of your board? It really sounds like some kind of wiring issue.

Thank 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #7 on: February 01, 2023, 01:47:44 pm »
Can you spot it?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: gb
Re: Missing ground hum, but no missing ground.
« Reply #8 on: February 01, 2023, 01:48:51 pm »
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!
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline CountChocula

  • Supporter
  • ****
  • Posts: 197
  • Country: ca
  • I break things—sometimes on purpose.
Re: Missing ground hum, but no missing ground.
« Reply #9 on: February 01, 2023, 02:22:59 pm »
Glad you found it… it's the curse of working with breadboards :-)

Cheers!


—CC
Lab is where your DMM is.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf