Need help with ground loop - Page 1
Forum section: electronics / projects

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 12:53:19 pm
content: 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 differenceI'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.ConnectedDisconnected

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 12:55:15 pm
content: The images was apparently not inserted in the post.

author: Rerouter
author_rank: Super Contributor
timestamp: August 09, 2019, 12:58:41 pm
content: 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 02:03:08 pm
content: Quote from: Rerouter on August 09, 2019, 12:58:41 pmThe 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(?)

author: 001
author_rank: Super Contributor
timestamp: August 09, 2019, 03:18:45 pm
content: the main problem is not a groud loopcheck EMI at D class amp chockes

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 03:28:35 pm
content: Quote from: 001 on August 09, 2019, 03:18:45 pmCould 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?

author: Audioguru again
author_rank: Regular Contributor
timestamp: August 09, 2019, 03:36:01 pm
content: 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, calleda star ground.Please post your attachments here to your post instead of over at Imgur who takes too much time to wake up.

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 03:57:45 pm
content: Quote from: Audioguru again on August 09, 2019, 03:36:01 pmI 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?

author: DaJMasta
author_rank: Super Contributor
timestamp: August 09, 2019, 04:08:16 pm
content: 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 05:24:32 pm
content: Quote from: DaJMasta on August 09, 2019, 04:08:16 pmI 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.

author: magic
author_rank: Super Contributor
timestamp: August 09, 2019, 08:48:17 pm
content: 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 groundsbodge a huge electrolytic into the receiveradd a hugedifferential modechoke on the power output to convert audio frequency AC currents into voltage ripple in the receiver's capacitorsHow 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 09, 2019, 09:22:55 pm
content: QuoteYes that's correct.QuoteI 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"?QuoteI 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.

author: magic
author_rank: Super Contributor
timestamp: August 10, 2019, 06:14:49 am
content: 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 capacitorScrew 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?

author: DaJMasta
author_rank: Super Contributor
timestamp: August 10, 2019, 07:20:28 am
content: 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.

author: xlnx
author_rank: Contributor
timestamp: August 10, 2019, 09:18:06 am
content: 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 10, 2019, 10:58:40 am
content: QuoteYes, 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 10, 2019, 11:06:01 am
content: Quote from: DaJMasta on August 10, 2019, 07:20:28 amSince 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

author: laejf
author_rank: Regular Contributor
timestamp: August 10, 2019, 11:08:08 am
content: Quote from: xlnx on August 10, 2019, 09:18:06 amThis is definitely something I'll keep in mind if I don't find a work around with what i have. Thanks!

author: magic
author_rank: Super Contributor
timestamp: August 10, 2019, 12:01:54 pm
content: Quote from: laejf on August 10, 2019, 10:58:40 amThe 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.

author: laejf
author_rank: Regular Contributor
timestamp: August 10, 2019, 01:41:41 pm
content: Quote from: magic on August 10, 2019, 12:01:54 pmI 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?

author: laejf
author_rank: Regular Contributor
timestamp: August 13, 2019, 04:39:29 pm
content: 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!