0
\$\begingroup\$

I've read a dozen questions that are similar to mine, but have not found any responses that provides the specific guidance I am seeking. Here are some that I've read:

Ground Connection When Using AC Wall Wart Supply

When using USB and external power, how should I isolate the grounds?

How to safely connect the Arduino 5V Pin with a 5V wall wart and USB TTL converter for data transfer?

USB port and bench power supply ground difference

Common ground : Computer A and USB powered Arduino ( MCU ) from Computer B

Here is my situation: I've built an embedded device project that is powered from an FDA-compliant 5.4V floating wall wart. It connects to an earth-ground referenced laptop through a primary (isolated) USB serial emulator. In that scenario, all is well.

The problem, as expected, occurs when I introduce an earth-ground reference into the circuit. This can happen in several ways.

In the first case, I need to connect an FTDI serial emulation cable for out-of-band debugging output. The FTDI cable may go to the same laptop or to a different laptop, but the FTDI ground will always be connected to USB ground somewhere near the level of earth ground. The FTDI power pin is left disconnected since the device is self-powered, but the ground is required for D+ and D- signals to be transmitted.

In the second case an unbalanced audio connection may sometimes get plugged into a grounded mixer.

Finally, I need to be able to put an oscilloscope on the board, and the scope ground is at wall-ground.

By design, power and ground from the wall wart float WRT ground, and my scope shows that both positive and negative carry a 60 Hz AC potential of ~150 volts P-P relative to earth ground. My Fluke multimeter reads this as 48V (I assume this is RMS of the alternating voltage, which isn't really very sinusoidal). At first I thought there was something wrong with my wall wart, but I've tested a number of different models of 5.4V 2A wall warts from different manufacturers, and they all look about the same on the scope.

Within my project, the (floating) ground of the wall wart and the ground reference from the FTDI cable and/or the audio mixer are all connected via the ground plane of the PCB, but I am seeing some real problems with this.

When I connect the FTDI serial emulator ground, the I2C bus on my board runs inconsistently and eventually locks up.

When I connect the audio output of my floating PCB to one channel of a mixer, even a channel that's turned all the way down, 60Hz hum affects every channel of the mixer.

When I connect scope ground, the PC sometimes drops and reconnects its USB device and the embedded system may reset

These problems can be made to go away by tying the floating wall wart power supply ground directly to another physical ground (e.g. my scope ground). However, this introduces a huge amount of digital noise on the ground lines. This (and ground loop issues) originally led me to an isolated power supply and isolated USB signal path, and a lot of things got better after I installed isolation, so I'm not sure I really want to undo that if there's an alternative.

Can anybody point me towards an optimal approach to this problem? It would be possible (though expensive) to require that the FTDI connection also go through a USB signal isolator, and presumably something similar can be done for the audio signal. But is there a better way?

\$\endgroup\$
  • \$\begingroup\$ Can you show a board layout? \$\endgroup\$ – peufeu Nov 1 '17 at 12:37
2
\$\begingroup\$

I would recommend isolating the FTDI chip by using opto-isolators on the UART lines. It is much cheaper and simpler than isolating USB.

The FTDI ground can then be referenced to external ground without affecting the rest of the circuit.

\$\endgroup\$
  • \$\begingroup\$ That makes good sense -- I'll add optoisolators to the FTDI section, and I can come up with something for the audio. Do you have anything to suggest for when I need to connect an oscilloscope? With FTDI resolved that's the one remaining serious stumbling block. Connecting the scope ground not infrequently causes the PC to disconnect the USB device entirely. \$\endgroup\$ – Craig.Feied Nov 2 '17 at 22:54
  • \$\begingroup\$ @Craig.Feied getting a high voltage differential probe is probably the safest option. \$\endgroup\$ – Armandas Nov 3 '17 at 0:57
  • \$\begingroup\$ Optoisolators worked great for the FTDI connection, and after spending $450 for a differential probe with a 10X setting, I can now display isolated differential signals on the oscilloscope, though only one channel at a time. Powering the oscilloscope from a battery through an inverter also worked to remove the ground path temporarily. And changing from a barrel connector to a special connector makes it harder for people to connect the audio line to a grounded amp or mixer :) \$\endgroup\$ – Craig.Feied Nov 17 '17 at 19:24
  • \$\begingroup\$ @Craig.Feied Thanks for the update, good to hear that you've figured it out. Be careful when floating your scope though, as it's not the safest practise. \$\endgroup\$ – Armandas Nov 17 '17 at 22:50

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.