Author Topic: Need help with ground loop  (Read 2213 times)

0 Members and 1 Guest are viewing this topic.

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Need help with ground loop
« on: August 09, 2019, 12:53:19 pm »
I've made an audio amplifier-board to be used as a portable speaker with a class D amplifier and a USB port for connecting a bluetooth module that sends audio signals via a 3.5mm jack. When connecting the BT-module I seem to get a ground-loop and the amplifier gets noisy. The noise goes away completely when connecting the BT-module to an isolated voltage source. The problem is that i don't want to add another source to the build so I'm wondering if I could somehow make the USB port floating with a single supply or if there is another alternative. I've tried:

  • Filtering out the noise with a common-mode choke connected between the USB port and BT-module. No difference.
  • Bypassing with different size capacitors. No difference.
  • Disconnecting ground on the USB port such that the module is only grounded through the 3.5mm jack. This made the noise much worse.
  • Disconnecting ground on the 3.5mm jack. No difference

I've attached images of the schematic and board as well as videos that shows the noise when my phone is connected and disconnected to the BT-module.

Any help and feedback is appreciated. Thank you.

Connected
Disconnected
« Last Edit: August 09, 2019, 03:45:43 pm by laejf »
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #1 on: August 09, 2019, 12:55:15 pm »
The images was apparently not inserted in the post.

 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: Need help with ground loop
« Reply #2 on: August 09, 2019, 12:58:41 pm »
Cant easily read your schematic, but at a guess, add a series 1uF capacitor on your signal and signal ground wires to prevent any DC currents inducing a voltage.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #3 on: August 09, 2019, 02:03:08 pm »
Cant easily read your schematic, but at a guess, add a series 1uF capacitor on your signal and signal ground wires to prevent any DC currents inducing a voltage.

The 1uF capacitors on the far left in the schematic are doing this on the input-pins of the TPA3123. I'm not sure about adding one in series with the ground connection as this would create an open circuit for the DC voltage and let through only the noise(?)
 

Offline 001

  • Super Contributor
  • ***
  • Posts: 1170
  • Country: aq
Re: Need help with ground loop
« Reply #4 on: August 09, 2019, 03:18:45 pm »
the main problem is not a groud loop
check EMI at D class amp chockes
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #5 on: August 09, 2019, 03:28:35 pm »
the main problem is not a groud loop
check EMI at D class amp chockes

Could you elaborate? What is "chockes"? Do you mean chokes? And by that, do you mean the inductances in the output filter? If so, wouldn't the noise still be present when powering the BT-module with a separate source?
 

Offline Audioguru again

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ca
Re: Need help with ground loop
« Reply #6 on: August 09, 2019, 03:36:01 pm »
The mid-frequencies noise is not from the 250kHz class-D switching, instead it is probably coming from the power supply.
All the grounds (including the input ground and power supply ground) should be connected together only at one point, called a star ground.

Please post your attachments here to your post instead of over at Imgur who takes too much time to wake up.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #7 on: August 09, 2019, 03:57:45 pm »
The mid-frequencies noise is not from the 250kHz class-D switching, instead it is probably coming from the power supply.
All the grounds (including the input ground and power supply ground) should be connected together only at one point, called a star ground.

Please post your attachments here to your post instead of over at Imgur who takes too much time to wake up.

I agree that the amp is not the problem. Do you have any suggestions on what I can do with the current design to reduce the noise?
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: us
    • medpants.com
Re: Need help with ground loop
« Reply #8 on: August 09, 2019, 04:08:16 pm »
The star ground recommendation was to lay out the board in a way to facilitate it, so same schematic but different design.

I can't actually hear the videos for whatever reason, but... Common mode choke could help on the input - either power or signal or both, depending on the environment.  shielding the amp itself could help, though the input leads are going to be picking up more noise than the traces in this situation I think.

A scope on the inputs (power and signal) could tell you a lot about the nature of your noise.  Put a probe on the output too and you should be able to correlate what's coming in vs. what's going out.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #9 on: August 09, 2019, 05:24:32 pm »
The star ground recommendation was to lay out the board in a way to facilitate it, so same schematic but different design.

I can't actually hear the videos for whatever reason, but... Common mode choke could help on the input - either power or signal or both, depending on the environment.  shielding the amp itself could help, though the input leads are going to be picking up more noise than the traces in this situation I think.

A scope on the inputs (power and signal) could tell you a lot about the nature of your noise.  Put a probe on the output too and you should be able to correlate what's coming in vs. what's going out.

I was hoping to get around re-designing the board since it's a bit pricey to manufacture. I guess I'll  keep trying with the common-mode chokes, as mentioned it didn't work putting one at the BT-supply.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Need help with ground loop
« Reply #10 on: August 09, 2019, 08:48:17 pm »
So you have battery power, regulate 5V from it, send it to an external BT receiver over USB, the receiver feeds analog signal back into your board?

I suppose what may be happening is that return current from the receiver develops significant voltage drop between the receiver's ground and your ground. The signal is referenced to the receiver's ground, your ground is different, you have an error. If the current is AC then the error is AC too and you have noise.

How to check if that's what happens:
tie a short and thick cable between the two grounds
bodge a huge electrolytic into the receiver
add a huge differential mode choke on the power output to convert audio frequency AC currents into voltage ripple in the receiver's capacitors

How to fix it in a customer-friendly way: not sure if at all possible. Maybe increase signal output and attenuate on board for more SNR.

How to fix with a board respin: check how the various grounds work in your amp chip. You should probably connect AGND to the input jack, disconnect it from the ground plane and figure out how to ground the rest of the chip amp. This is assuming that all the xyzGND pins aren't shorted internally.
« Last Edit: August 09, 2019, 09:00:39 pm by magic »
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #11 on: August 09, 2019, 09:22:55 pm »
Quote
So you have battery power, regulate 5V from it, send it to an external BT receiver over USB, the receiver feeds analog signal back into your board?

Yes that's correct.

Quote
I suppose what may be happening is that return current from the receiver develops significant voltage drop between the receiver's ground and your ground. The signal is referenced to the receiver's ground, your ground is different, you have an error. If the current is AC then the error is AC too and you have noise.

How to check if that's what happens:
tie a short and thick cable between the two grounds
bodge a huge electrolytic into the receiver
add a huge differential mode choke on the power output to convert audio frequency AC currents into voltage ripple in the receiver's capacitors

I tried soldering a thick wire between them but it made no difference. I also tried to feed the BT-module via a separate USB jack, grounded at other ground-points than the jack that is on the board but no luck. A big capacitor didn't help either.

I will try a differential mode choke! Although I'm not sure about what you mean by "Convert audio frequency AC currents into voltage ripple"?

Quote
How to fix with a board respin: check how the various grounds work in your amp chip. You should probably connect AGND to the input jack, disconnect it from the ground plane and figure out how to ground the rest of the chip amp.

I found a section in the datasheet that said that all the grounds should be connected in the thermal pad as a star point ground. This is something that i missed.  If i re-design the board, should I scrap the ground plane completely and connect all grounds to the thermal pad using single wires? Including the BT-module's ground.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Need help with ground loop
« Reply #12 on: August 10, 2019, 06:14:49 am »
Truth be told, now that I did the math, it's quite obvious that "big enough capacitor" is one which has less reactance at audio frequencies than there is resistance in the USB cable and connectors. That would be one really big capacitor :)

Screw that, try this. You said that external PSU for the BT makes it go away. So remove your 7805 and connect the external PSU to its GND and OUT pads. Should be quiet, right?
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: us
    • medpants.com
Re: Need help with ground loop
« Reply #13 on: August 10, 2019, 07:20:28 am »
Differential mode could definitely do something, any picked up noise probably differential mode, but you want to keep the filter cutoff away from the audio band, since the input signal isn't differential.

That being said, what about an RC or LC low pass filter on the audio inputs?  Won't do anything to protect against like power supply noise, but would effectively eliminate high frequency noise picked up on the input cables.  Shielded signal cables or shielding for the amp can be a viable option, too.

Still, your best bet is going to be to scope it and see where it's coming from.  With the gain options for the chip, you can probably still see noise on the inputs/power rails if it's significant on the output, so time-correlating them should show you where exactly it's coming from.  Much more narrower scope (ha) of a problem to troubleshoot when you can identify where the noise is actually coming from.
 

Offline xlnx

  • Contributor
  • Posts: 20
  • Country: no
Re: Need help with ground loop
« Reply #14 on: August 10, 2019, 09:18:06 am »
I'd like to add that if the if the ground connection from the USB is your real problem, then you may use a digital isolator device from Analog Devices or Silicon Labs. Search for "USB 1500V" on eBay/AliX to se how it's done. That solution also has an isolated 5V to 5V power module with 1500V isolation to bring power to the isolated side - you may not need that if you can power it from the inside.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #15 on: August 10, 2019, 10:58:40 am »
Quote
Screw that, try this. You said that external PSU for the BT makes it go away. So remove your 7805 and connect the external PSU to its GND and OUT pads. Should be quiet, right?

Yes, but the problem is that I don't want to add another voltage source i.e. another battery to it. So I'm looking for another way to perhaps get the USB-port floating with a single source.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #16 on: August 10, 2019, 11:06:01 am »
Differential mode could definitely do something, any picked up noise probably differential mode, but you want to keep the filter cutoff away from the audio band, since the input signal isn't differential.

That being said, what about an RC or LC low pass filter on the audio inputs?  Won't do anything to protect against like power supply noise, but would effectively eliminate high frequency noise picked up on the input cables.  Shielded signal cables or shielding for the amp can be a viable option, too.

Still, your best bet is going to be to scope it and see where it's coming from.  With the gain options for the chip, you can probably still see noise on the inputs/power rails if it's significant on the output, so time-correlating them should show you where exactly it's coming from.  Much more narrower scope (ha) of a problem to troubleshoot when you can identify where the noise is actually coming from.

Since the noise is hear-able, a low pass filter on the inputs would filter out music as well, wouldn't it?

I will try to find out more with a scope, I'm not very confident in my skills in trouble shooting with scopes but I'll try! The class D amp also puts out a lot of noise at 250kHz which doesn't make it easier.

Thank you
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #17 on: August 10, 2019, 11:08:08 am »
I'd like to add that if the if the ground connection from the USB is your real problem, then you may use a digital isolator device from Analog Devices or Silicon Labs. Search for "USB 1500V" on eBay/AliX to se how it's done. That solution also has an isolated 5V to 5V power module with 1500V isolation to bring power to the isolated side - you may not need that if you can power it from the inside.

This is definitely something I'll keep in mind if I don't find a work around with what i have. Thanks!
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Need help with ground loop
« Reply #18 on: August 10, 2019, 12:01:54 pm »
Yes, but the problem is that I don't want to add another voltage source i.e. another battery to it. So I'm looking for another way to perhaps get the USB-port floating with a single source.
The point is testing, finding out what's the source of the noise. I still suspect that ground return current is involved, although I'm not sure how to explain away lack of difference from reducing ground connection resistance other than maybe a few dB just wasn't enough for you to notice. Disconnecting the USB port from board ground and powering it with an isolated converter definitely seems like a solution.
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #19 on: August 10, 2019, 01:41:41 pm »
Yes, but the problem is that I don't want to add another voltage source i.e. another battery to it. So I'm looking for another way to perhaps get the USB-port floating with a single source.
The point is testing, finding out what's the source of the noise. I still suspect that ground return current is involved, although I'm not sure how to explain away lack of difference from reducing ground connection resistance other than maybe a few dB just wasn't enough for you to notice. Disconnecting the USB port from board ground and powering it with an isolated converter definitely seems like a solution.

I wrote in my original post that I tried powering the BT-module with an isolated source and that it solved the problem. Is that not the same or have I misunderstood your point?
 

Offline laejfTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: se
Re: Need help with ground loop
« Reply #20 on: August 13, 2019, 04:39:29 pm »
I don't know if anyone is interested, but I managed to erase pretty much all noise by focusing on the 3.5mm cable connected to the BT-module instead of the feeding of the module. I replaced it with a short microphone-cable soldered to the module and amplifier-board this makes it a bit less modular and flexible but at least i know what to think of when/if I'm re-designing the board. Thank you for your suggestions!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf