Problems with Differential Signaling, "Drive Issues." Or, where does the fault really lie?
It goes down (in my imagination) like this:
A Controller in location 5 is not "communicating." So you replace it with another, and it "works." You "fail" the first controller, and you intend to have it repaired.
A week later Controller in location 3 begins to "act up." Having no more spares, you swap Controller in location 5 with the Controller in location 3. Both Controllers now "act up," and, remembering that you have not yet sent last week's "failed" controller, you replace the swapped Controller in location 3 with last week's "failed" controller. It now "works."
Fortunately Differential Signaling transmitters don't fail all that often, but when they do, the problem can be very confusing to sort out.
The answer to the scenario I just gave is that none of the controllers were failing. Instead, it is the host computer with a failing Differential Transmitter. (Of course a failing Controller transmitter or Encoder transmitter could be just a confusing.) The short answer for the impatient is that one of the output transistors has failed, which means that sometimes the signal can be decoded at the receiving end, and sometimes it can't.
Differential Signaling basics
Now contrary to popular belief, Differential Signaling does not refer to tipping your hat to your boss. Differential Signaling is a (we'll strictly stay electrical) standard for transmitting digital "state:" on/off, high/low, or a "one" or "zero" bit. Similar to a current loop, Differential Signaling uses two wires and a voltage difference between the wires; a Differential Signaling transmitter might look like this:
(Current Out) A Positive Voltage on Wire A >-----------------> V V (imagine a resistor here) A Negative Voltage on Wire A' <-----------------< V (Current Return)
Let's call that the "off" or "normal" state. Then the opposite is the "on" or "abnormal" state:
(Current Return) A Negative Voltage on Wire A <-----------------< ^ ^ (imagine a resistor here) A Positive Voltage on Wire A' >-----------------> ^ (Current Out)
Do not read anything into "A Positive Voltage" or "A Negative Voltage" with respect to "ground." I'm simply using "positive" and "negative" with respect to each other. Conceptually, Differential Signaling has nothing to do with ground. (OK, for you wise guys who know better, everything has everything to do with ground, but let's just try to keep it as simple as possible, OK?)
Five Volt Differential Signaling is very common on the factory floor and in the office. "RS-485" or "RS-422," are very common Differential Signaling standards that specify, along with a whole lot of other stuff, that voltage. (On the other hand, the USB and LVDT standards use Differential Signaling, but specify a rather different voltage.) Five Volts means that the transmitter attempts to switch the wires between zero and five volts; but almost always it's not very successful in doing that. In fact, if you see the transmitter getting very much close to either rail, then be very suspicious that your Differential Signaling circuit is up to no good.
To check a transmitter output, ground your VoltMeter return or oscilloscope at the transmitter circuit and probe its outputs (usually you can find both at the output jack). Expect to find the "hi" voltage of the pair around 3.5 to 4.5 volts, although it's not unusual to see a voltage as low as 2.5 volts. In fact, it could be lower, if the transmitter is old TTL technology, and/or if the circuit is heavily terminated.
When you have found the "hi" wire, the other wire ought to be "lo." Expect the "lo" wire to be between .5 to 2.5 volts, typically much closer to 0 volts than 2.5. You might even see 0 volts, since transistors "sink" current a lot better than the "hi" side can "source."
Aha, you say I just said that the "hi" might be lower voltage than the "lo." Well, no, it can't be. The ranges of acceptable "hi" and "lo" voltages do overlap; remember, however, that it's the voltage difference between the "hi" and "lo" that counts. That means that if "lo" is 2.5 volts, and "hi" is 3.0 volts, then the "hi" minus "lo" voltage is .5 volts, and that's good enough. Similarly, if "lo" is .6 volts, and "hi" is 1.1 volts, then the "hi" minus "lo" voltage is still .5 volts, then it works. Weird that "hi" is so loaded down, and for that reason you might want to check further, but it still works for signaling.
But, if "hi" and "lo" get much closer than .3 volts apart, you've got big problems: you're non-standard. RS-485 and RS-422 say different things about how close, but in practical terms, for the circuits we build, you should see a volt or two. If you don't have close to a couple of volts, suspect the circuit. .3 volts is the pits.
So, put your "A" channel O-scope probe on the Wire A contact, and your "B" channel probe on the Wire A' contact. What should you see?
______ ______ ______ | | | | | Wire A | | | | | ______| |______| |______| ______ ______ ______ | | | | | Wire A' | | | | | |______| |______| |______
That's what you're likely to see, because the rise and fall times are very swift in comparison to the signaling rate. Imagine instead seeing this:
____ ____ ____ / \ / \ / Wire A / \ / \ / _____/ \____/ \____/ _____ ____ ____ \ / \ / \ Wire A' \ / \ / \ \____/ \____/ \____
and adjust the scope to super-impose the Wire A trace on top of the Wire A' trace:
_____ ____ ____ ____ ____ ____ \ / \ / \ / \ / \ / Wire A & A' X X X X X _____/ \____/ \____/ \____/ \____/ \____
Then if you hook up your "C" channel to the transmitter input, then you should (conceptually) see something like this:
______ ______ ______ | | | | | Input | | | | | ______| |______| |______| _____ ____ ____ ____ ____ ____ \ / \ / \ / \ / \ / Wire A & A' X X X X X _____/ \____/ \____/ \____/ \____/ \____
Notice that the Wire A & A' signals start to transition to their respective opposite voltages just a tad after the Input signal switches, and very soon after "cross" each other.
Leaping spritely ahead, if you did something similar on the Receive end, you should (conceptually) see something like this:
_____ ____ ____ ____ ____ ____ \ / \ / \ / \ / \ / Wire A & A' X X X X X _____/ \____/ \____/ \____/ \____/ \____ ______ ______ ______ | | | | | Output | | | | | ______| |______| |______|
Notice that the Receiver's Output signal transitions just after the Wire A & A' signals "cross" each other. That is the key to understanding Differential Signaling: if the signals don't "cross," the signals don't work.
Differential Signaling gone wrong
Now suppose the Wire A' "hi" and "lo" driving transistors are somehow dead, but the drive can maintain say, 2 volts on the wire anyway. What you have is:
____ ____ ____ / \ / \ / Wire A & A' -X------X------X------X------X----- _____/ \____/ \____/
So, will it work? Depends on what you mean by work, of course, but in this case it will "function" in the sense that you'll almost certainly get an OK signal decoded, if the "dead" Wire A' has a "strong and steady" voltage, if the signalling rates aren't high, if the transmit distances aren't great, and if the signalling paths are "pristine":
____ ____ ____ / \ / \ / Wire A & A' -X------X------X------X------X----- _____/ \____/ \____/ ______ ______ ______ | | | | | Output | | | | | ______| |______| |______|
So what happens when the output of the "dead" Wire A' is a lot closer to Wire A's "lo" voltage?:
____ ____ ____ / \ / \ / Wire A & A' / \ / \ / ===x?-------x?===x?-------x?===x?-----
This is a common failure mode, where the Wire A' "hi" driver fails, burns up in overload, kicks the bucket, whatever. It may work this way:
____ ____ ____ / \ / \ / Wire A & A' / \ / \ / ===x?-------x?===x?-------x?===x?----- ________ ________ ________ | | | | | Output | | | | | ____| |____| |____|
That is, it seems to work. But notice that the waveform is now not symetrical (as if you could see this in practice exept at high signalling rates); and the output might not switch given a different receiver:
____ ____ ____ / \ / \ / Wire A & A' / \ / \ / ===x?-------x?===x?-------x?===x?----- Output _________________________________________
Then again, it might switch a little, or at random times:
____ ____ ____ / \ / \ / Wire A & A' / \ / \ / ===x?-------x?===x?-------x?===x?----- ________ | | Output | | __________________| |_____________
All in all, not good.
M. L. Riechers Systems Engineering Voice: +1-513-844-2220 530 Main Street Fax: +1-513-844-2279 Hamilton, Ohio 45013-3222, USA mlr(at)rse(dot)com
The Webmaster of this site is free to use the images below on an Apache/NetBSD-powered Web server. Thanks for using Apache on NetBSD!