Floating USB power supply

Hi,

I've got a ground loop problem when I power my Arduino with USB.

To solve this problem I tried the following:
-open the USB cable and cut the power lines, leave the data lines intact
-connect the power lines to a 5V power supply

This powers the Arduino but serial communication doesn't work anymore. The USB data communication uses a differential pair, independent from the power lines, so I don't see the problem with this setup. Could someone explain to me why this doesn't work?

cheers,
Beau

Could someone explain to me why this doesn't work?

Because you cut the ground out of the USB lead. If you would have just cut the 5V it would have been fine.
The data signals need a common ground.
See:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

But USB uses a differential pair (D+,D-), which I left intact, instead of single-ended data lines referenced to ground?
If I understand correctly, D- is the return path for D+, instead of GND.

If I understand correctly,

No you don't. A ground is needed.

In LVDS (Low Voltage Differential Signalling), which is what USB is, the same signal information is sent twice. Once down the D+ line, and once down the D- line. The voltages on the D- line are inverted around a common point (it could be ground, it could be a different voltage).

At the receiver the two data lines are subtracted from each other. This cancels out a huge majority of the noise on the lines, and pretty much doubles the strength of the signal.

To complete the circuit a return path is required - in the form of the ground connection.

Beau83:
But USB uses a differential pair (D+,D-), which I left intact, instead of single-ended data lines referenced to ground?
If I understand correctly, D- is the return path for D+, instead of GND.

This is true for when USB is transmitting data. There is a virtual ground created through the differential pair.

Unfortunately, out-of-band signaling (reset condition, attachment attention, etc) is done through pull-down and pull-up resistors which require a ground-reference.

So your device won't enumerate properly or begin data communication properly without a ground connection.

Thanks for the clarifications James and majenko.

Wikipedia has this to say on differential signals:

"Tolerance of ground offsets
At the end of the connection, the receiving device reads the difference between the two signals. Since the receiver ignores the wires' voltages with respect to ground, small changes in ground potential between transmitter and receiver do not affect the receiver's ability to detect the signal." ~WP
and
"If there are n signals, then there are n+1 wires - one for each signal and one for ground. (Differential signaling uses at least 2n wires.)"
That would mean 2 cables are sufficient to send 1 differential signal.

There's no real explanation but this is what I could come up with:
Suppose you have a GND offset of 1.0V between the transmitter TX and the receiver RX and you send a signal of 0.5V. You could do this by putting your differential pair to, for example, 2.0V and 2.5V, referenced to GND_TX. In this example, you'd use a Vcommon of 2V.

Now, because of the GND offset of 1.0V, you'd measure 3.0V and 3.5V at the RX side. The difference however is still correct: 0.5V, and your transmission would succeed.

Problems arise when the gnd offset gets to large. For example 10V. You'd get 12V and 12.5V referenced to GND_RX and if RX can only measure up to let's say 5V, then both these voltages would saturate the receiver and no difference would be measured anymore.

In conclusion: you can have a difference in GND potential when using a differential pair, as long as the difference is small enough. Feel free to correct me if I'm wrong, I'm not an EE so this is all more of an semi-educated guess :slight_smile: This also doesn't fix the out-of-band communication so my scheme wouldn't work even if the gnd offset was small (I measured it to be 1.8V).

Beau83:
In conclusion: you can have a difference in GND potential when using a differential pair, as long as the difference is small enough.

You are describing Common Mode rejection. (CMRR).

This is why differential signals are so popular for today's high-speed serial busses. Signal swings can be kept very low and low-cost transmission media can be used. Busses like USB, PCIe, HDMI, Thunderbolt, Firewire, etc all make use of LVDS.

Beau83:
This also doesn't fix the out-of-band communication so my scheme wouldn't work even if the gnd offset was small (I measured it to be 1.8V).

If USB was a pure LVDS implementation, then you might have been successful. However, it isn't.

I measured it to be 1.8V

Once you put something in to measure it, you change it.

Grumpy_Mike:

I measured it to be 1.8V

Once you put something in to measure it, you change it.

Really? Putting a high-impedance voltmeter between two points changes the difference in potential between those points? :~

Thanks for the link! Very informative.

Really? Putting a high-impedance voltmeter between two points changes the difference in potential between those points?

Yes because you connect them together, it might be a high impedance but it is a current path that might be a lower impedance than the one that naturally exists.

Grumpy_Mike:

Really? Putting a high-impedance voltmeter between two points changes the difference in potential between those points?

Yes because you connect them together, it might be a high impedance but it is a current path that might be a lower impedance than the one that naturally exists.

Hmm, so it's at least 1.8V?

Probbly yes.

High impedance or not the meter still requires some current for measurement. You might try a simple experiment, connect one end of a 10K resistor to +5V and leave the other end floating (not connected to anything) and connect a DVM - lead to ground and + lead first to +5V and note the voltage on paper. Now read the voltage on the open (unconnected) lead of the 10K resistor and note the voltage. With my Fluke 179 it is ~5mV and since I = E/R we have .005/10000 = 0.0000005A or 500 nA or 1/2 of a microamp and since R = E/I Rmeter = 10,000,000 ohms... which seems to agree. Actually it is, I think 11 Mohms but I am good with 1 part in 10,000,000... Fair accuracy considering that I didn't measure the resistor, I just read the color code and plugged that value into my calculations. The indicated tolerance is 5% on the resistor which tracks the small discrepancy.

Doc