0
\$\begingroup\$

I have a device (Device 1) that is bus-powered via Full-Speed USB and that is drawing up to 400 mA from a laptop.

Device 1 has a DAC that can output an analog voltage to another device (Device 2) through a jack connector, Device 2 being powered externally.

The problem is that if the laptop connected to Device 1 and Device 2 are connected to a different outlet, it creates a ground loop and its characteristic "hum". If the laptop runs on battery, there is no issue.

edit : The ground loop occurs when both devices are connected to the same laptop

I first thought about using a USB isolator such as the ADuM4160 which works great. Unfortunately it is too expensive for my application. Another solution that works fine is to use a USB Y cable, splitting data lines and power lines. However, I would prefer a solution that is fully transparent for the user.

As there is no problem with the USB Y cable when the USB data lines are not isolated, I was wondering if it was possible to use a similar principle used in ADuM4160 ((1:1) transformer) to isolate only the power lines from USB, leaving the data lines untouched. I haven't found such a component so I'm not sure about this.

I also had other ideas to perform an isolation at another place (i.e. between the DAC and the output) but it does not look convenient at first sight.

Do you have any recommandation or any other solution to avoid ground loops in this kind of setup ?

\$\endgroup\$
  • 1
    \$\begingroup\$ I was under the impression that most computer power supplies are floating. So it is a mystery to me why you would have ground loops. I would avoid extension cords or at least use cords that can handle larger currents. I would avoid plugging in heavy loads on the same circuit as your computer and / or devices. Finally not all USB cables are alike. Ideally they would use large enough wires to supply the necessary current. Try different USB cables and use the shortest USB cables possible. Try not to exceed 3 meters for USB 3.0. \$\endgroup\$ – st2000 Mar 26 '18 at 12:54
  • 1
    \$\begingroup\$ Splitting USB and Data lines with an Y cable is not supposed to work. Revisit that "solution" and check if it really works as intended. @st2000 Yes, the supplies are isolated, except secondary is grounded to chassis and there are Y-capacitors on the mains input. \$\endgroup\$ – Jeroen3 Mar 26 '18 at 13:35
  • \$\begingroup\$ @st2000, If your laptop power-supply has a grounded plug, then don't just assume that the DC output will be isolated. (Don't ask me how I know!) \$\endgroup\$ – Solomon Slow Mar 26 '18 at 14:15
  • \$\begingroup\$ Thank you all for your comments. Indeed, I made a mistake in my previous post : a ground loop occurs when both Device 1 and Device 2 are connected to the laptop. So even if the power supply of the computer is floating, both devices share the same ground. I tried with USB cables of different qualities and length, and the hum is still here, just at different volume. \$\endgroup\$ – J. K. Mar 26 '18 at 14:41
  • 1
    \$\begingroup\$ No, you should not galvanically isolate the USB ground line while leaving the data lines untouched. While USB is primarily a differential signaling mode, it also uses the single ended zero state, and a ground reference is required. \$\endgroup\$ – Chris Stratton Mar 26 '18 at 16:13
3
\$\begingroup\$

Laptops are a real traps for young players when you hook them up to an analog circuit.

A slightly simplified schematic of a laptop supply shows the totally counter-intuitive capacitors that are straight across the transformer. C1,C2 form a voltage divider that floats the laptop at 115V (when you are in a grounded-neutral mains system). These are the fat blue disc capacitors when you open up a laptop psu. (They are there so that RF energy can flow back out to the low impedance mains to get rid of it)

schematic

simulate this circuit – Schematic created using CircuitLab

If you connect the laptops ports to anything grounded, 75 microamps will flow through the ground/microphone/usb/data wire. There will be 115V available to force it to flow, if the connection happens to be a high impedance and poorly protected IC input.(Goodnight Nurse), or you get incurable hum in audio circuits (ground-loop)


You should read up about ground loops, it is a major (THE major?) issue building recording studios.

  • Star Grounding: You need a single defined ground point. All grounds radiate outwards from that and never loop back. You need to join the USB shields at the USB connectors with a wide strap (braid,foil). If you can Join the signal/power grounds similarly. Ideally you will choose a point in the ADC and DAC modules where the digital meats the analog part, and join them from those points, but at the usb connectors is a good start.

If you can't get into the modules you can cut up two usb cables and join the shields and grounds near the device ends, but leave the data wires separate. Join this point to physical ground.

  • Differential analog is how professional audio deals with this. Once you can detect microvolt levels there is no other way.
\$\endgroup\$
  • \$\begingroup\$ Thank you for your answer. I've read a lot about ground loops over the past few days and I've read about those kind of solutions. I was however wondering if there was another solution that can be fully transparent for the user : no extra wiring outside the device, he would just have to plug the USB cable and the jack to Device 2 and all the isolation process would take place inside Device 1. \$\endgroup\$ – J. K. Mar 27 '18 at 7:43
  • \$\begingroup\$ +1. To add, this is not the problem for only laptops. Every wall AC-DC adapter has similar leakage problem, to different degree. For consumer electronics the leakage limit is defined (by CE/CSA/UL) as under 0.5 mA (!!!). (Compare electronics.stackexchange.com/a/267158/117785 ) \$\endgroup\$ – Ale..chenski Mar 27 '18 at 16:48
  • 1
    \$\begingroup\$ @J.K. But you have specified perfect, easy AND not costing anything significant. This of course impossible. (Have breakfast at Milliways). The "guaranteed" solution is to isolate the computers completely from the analog, and use a linear power supply with a faraday shield in the transformer. Fibre (SPDIF) is a fantastic option, as there is really low coupling. You can also break your devices at the A-D line, and insert couplers or optos to connect the ADC/DAC to the digital at thios point, rather than at USB. \$\endgroup\$ – Henry Crun Mar 27 '18 at 19:05

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.