USB specifies 4 pins:
1. VBUS +5V
2. D- Data-
3. D+ Data+
4. GND Ground
Why is this not 3? Could the Data and Power not share a common ground? Am I correct in understanding that D- is the ground for D+?
|
USB specifies 4 pins:
Why is this not 3? Could the Data and Power not share a common ground? Am I correct in understanding that |
|||||||||
|
|
No,
So differential signalling helps suppressing noise. So does the type of wiring, namely twisted pair. If the wires ran just parallel they would form a (narrow) loop which could pick up magnetic interference. But thanks to the twists the orientation of the wires with respect to the field changes continuously. An induced current will be cancelled by a current with the opposite sign half a twist further.
edit |
|||||||||||||||||||||
|
|
I can't say definitively that this is the only consideration that went into it, but that's not for grounding, it's for EMI cancellation. The data +/- wires are twisted pair carrying differential signals. It's just like you'd find in a typical household phone cord or network cable. |
|||
|
|
|
It's a differential (or balanced) signal, rather than a single ended (unbalanced) signal. This means the receiver "measures" the voltage between them, rather than between one and ground. This is an bit of an over simplification (but gets the basic concept across) - the ground could also pick up some noise (or have it present to start with), but due to the mismatched impedance between it and the signal the amount of noise picked up on each line will be different and this difference will be seen at the receiving end. Also it may be present initially (e.g. ground loop) which is a big problem for single ended systems. |
||||
|
|
|
Actually, that was tried once: The Apple Desktop Bus (ADB) was used to connect keyboards and mice to Apple Macintosh computers from about 1986 until Apple ditched it for USB in 1997 with the iMac. It had four wires: 5V, ground, data, and power-switch. The power-switch line was just for the power button on the keyboard, which connected the line to ground, and told the power supply to start up the machine. It had to be its own wire so it still worked even if the 5V line was off. Other than that, the data line carried everything... very slowly. The bus never really progressed beyond being a desktop device bus because it not only had a single-ended signal, but it had length limits (you get reflections off the end of the bus, since it's not terminated at each end). So Intel decided to use differential signaling for USB. If you want a good idea of what differential signaling buys you, compare the performance in noise of the single-ended RS-232 bus to the differential RS-422 bus. RS-422 can be driven over a longer cable with less source voltage at a given bit error rate. Why is this? The long version takes a day's lecture in electromagnetics class. The short version is that a noise signal will induce the same voltage in both wires of a differential pair, so the comparator at the receiver end cancels it out (it rejects common-mode voltage very well). A single-ended line has no comparable guarantee, since there's no guarantee that the ground line and signal line will pick up the same noise signal; grounds might even be connected via chassis ground and the return current will take completely different routes. |
|||||||||||||||
|
|
The D+ D- differential data transmission mechanism is adopted to reduce the noise affected, hence the bandwidth of the transmission can be highly increased. Like USB there are several other transmission protocol which uses differential physical layer. Some examples are RS485, Ethernet... |
|||||
|
|
Beyond Logic has an overview of the essential points of the electrical portion of the USB spec here (also in PDF format here):
|
|||||||||||||||
|
|
Actually a lot of USB has 5 lines, not 4. (The 5th line is for negotiating who is master in OTG applications. Note this is limited to mini and micro USB connectors.) As others have already pointed out, the D+ and D- lines are a differential pair. Since a receiver can ignore the common mode voltage, a differential pair provides better noise immunity than a single ended signal. Logically, the D+ and D- lines are a single signal. |
|||||||
|
|
But, even with differential data, there are times when single-ended signaling is used in the USB: The end-of-packet is signaled with a single-ended-zero (SE0), namely, both D+ and D- in low state. This state last the time of 2 bits. if SE0 last for more than 10ms it means a bus reset. This single-ended signaling makes the USB quite sensitive to electromagnetic interference, like those I found recently when a hair dryer motor was causing a lot of disconnects in a nearby USB peripheral. And no common-mode filters can be effectively used because these can degrade the SE0 signal... Another well conceived standard... |
|||
|