3
\$\begingroup\$

I'm working on an audio interface that utilises a microcontroller and a CS42448 audio codec. When receiving USB power and receiving audio from a laptop, there is a ground loop. Otherwise, it works fine (like when transmitting audio from a phone and powering it from a power bank).

The schematics below show how I'm powering the circuit. The ferrite beads I use to separate digital devices from analogue (one side of the board is all analogue, the other digital, the ferrites go in between).

My question is, how can I implement a ground loop isolator for this application? I understand that a switch for lifting the ground on one side could be enough, but I want to find a solution that doesn't need a manual switch. I have used optocoupler and dc-dc isolators before, but I'm not sure how I should connect them in this context. How is this normally done? I'm looking for a simple solution without overflowing the board with too many new components.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
6
  • \$\begingroup\$ Is there any audible interference at all caused by this tiny ground loop? If not, there's no reason to break up the ground loop (especially since the laptop only has a single ground connection). \$\endgroup\$ Jan 14 at 15:49
  • 1
    \$\begingroup\$ yes, there is audible noise. I tested in 2 different laptops (and plugged/battery). \$\endgroup\$
    – Chu
    Jan 14 at 15:51
  • 1
    \$\begingroup\$ The problem can grow bigger with bigger audio system with mains AC power supply and protective earth lines. Or if you start also data transmission between the laptop and your audio processing MCU. Now it's easiest to stop the DC supply of your interface to happen through the audio ground line - as you have already seen with a battery. Get an isolated 5VDC to 5VDC converter. Audio transformers or audio signal isolators are another way, but good quality ones cost real money. In theory you can build a low cost audio isolation amp. \$\endgroup\$
    – user287001
    Jan 14 at 16:01
  • \$\begingroup\$ Im not sure this is a ground loop actually. The common mode noise on laptop audio outputs can be anything. Headphones are immune to this obviously. I think Id look towards treating the audio out from the laptop as a differential signal. \$\endgroup\$
    – camelccc
    Jan 15 at 1:33
  • \$\begingroup\$ What difference does unplugging the laptop power supply make? \$\endgroup\$
    – Rodney
    Jan 15 at 9:43
4
\$\begingroup\$

Given that your circuit doesn't communicate with the laptop via USB, there's no need for a digital isolator: Just place an isolated 5V DC/DC converter in the 5V power path right after the USB connector. Your entire circuit is powered from an isolated source then and there can't be any ground loops anymore. Depending on the power requirements, this might be a little expensive, however.

If a DC/DC converter that can handle your entire amp's power is too expensive, you can alternatively place a resistor (1k or so, plus maybe an inductor / bead) in the ground line of the audio connection and use an instrumentation amplifier to recover the difference signal between the audio ground connection (at the other side of the resistor) and the audio signal lines. I've done this in the past with an amplifier that I powered from the 12V supply of my computer. It's not as effective as isolating the supply voltage, though, and you'll need an in-amp with good CMRR.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
2
\$\begingroup\$

If you're using the USB for data, then I think the cheapest way to do it is to put a USB isolator just behind your USB connector. Here's what Mouser has, and I'm sure everyone else has them too. They're stupidly expensive to buy as a completed module with all the relevant connectors and a case, but the chip itself is reasonable and only requires a handful of passives. (and a separate supply for each side of course)

If you're only using the USB for power, then that doesn't really help you because it requires a separate supply anyway for the circuit side. Just take that power from a dedicated wall-wart and use its safety-required mains-isolation to also provide your ground isolation. Beware though, that this is VERY fertile ground for counterfeiters and other dodgy operations, so stick to the more reputable suppliers for this!


Alternatively, you could break the audio signal with some line-level transformers. Be warned though, that good ones of those tend to be expensive, like the ones that I mentioned here. You can get them cheaper, but the cheap ones add distortion artifacts, especially at lower frequencies as the core saturates easily. The ones that I linked to are at the expensive end that, from experience, sound just like the plain wires that they replace across the entire audio range, except for the ground loop noise of course.

That's also the idea behind a plug-in ground loop isolator. It's just a line-level transformer for each channel, packaged into something that's nice to use. Because they use transformers, the usual caveats about transformers still apply.

\$\endgroup\$
4
  • \$\begingroup\$ I think audio transformers are actually cheaper. \$\endgroup\$
    – Jasen
    Jan 14 at 23:18
  • \$\begingroup\$ @Jasen If you're comparing off-the-shelf consumer versions of both, each with its own dedicated case and connectors, and either cost-cut or price-inflated as the market dictates for each, then yes, you'd be right. But the component / engineering side is quite different, for this comparison specifically. \$\endgroup\$
    – AaronD
    Jan 15 at 4:03
  • \$\begingroup\$ see for example nz.mouser.com/ProductDetail/Bourns/… \$\endgroup\$
    – Jasen
    Jan 16 at 5:10
  • \$\begingroup\$ @Jasen That's designed for a phone modem. Definitely NOT the full audio range! So it's only specified between 200Hz and 4kHz. Compared to a Jensen datasheet that shows a response graph from DC to daylight that is unnoticeably flat from 20Hz to 20kHz. And it's still clean (not saturated) when driven to 15Vpk (pro analog standard) at 20Hz, which is one of the more difficult things for a transformer to do. (high amplitude, low frequency) \$\endgroup\$
    – AaronD
    Jan 16 at 17:54
1
\$\begingroup\$

The most brainless way to do this is likely using a 3.5mm ground loop isolator. They are basically a passive DI wired suitably for laptop outputs.

\$\endgroup\$
2
  • \$\begingroup\$ tks, yes, I've got some of those but I need to implement this in the circuit and not use external devices. \$\endgroup\$
    – Chu
    Jan 14 at 16:23
  • \$\begingroup\$ place it in the circuit. or get the parts it uses and add them to your circuit. \$\endgroup\$
    – Jasen
    Jan 14 at 23:17
0
\$\begingroup\$

You could try using a common mode choke for both analog GND and VA instead of separate ferrite beads.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.