RS-485
On this page
Two boats tied side by side rise and fall together on the waves. However high the waves are, the height of one boat against the other stays the same. RS-485 sends data in this way: each bit is the difference in voltage between two wires, so a disturbance that lifts both wires together does not change the bit.
See it
Line B is at 3.5 V and line A is at 1.5 V. A motor starts beside the cable and adds 3.0 V of noise to both wires at the same moment. What difference does the receiver see between the two wires?
The upper graph is what a meter would show on each wire against the common wire. The lower graph is the difference between the wires, which is all the receiver uses. The noise moves both wires by the same amount, so it never appears in the difference.
The idea
A simple serial link sends each bit as a voltage on one wire, measured against a common wire. Any noise that reaches the wire is added to the bit.
RS-485 uses two wires, called line A and line B. The driver pushes one up and the other down, and the receiver looks only at the difference between them. This is differential signalling.
VB and VA are the voltages of the two lines against the common wire. Above +200 mV the receiver reads a 1. Below −200 mV it reads a 0.
The two wires are twisted together, so a power cable nearby induces almost the same noise voltage in both. The same voltage added to both leaves Vd unchanged.
There are limits. Each line must stay between −7 V and +12 V against the common wire of the receiver, so the devices need that common wire between them as well, and a long line needs a resistor at each end. See the lesson on RS-485 wiring, termination and biasing.
One worked number
Line B is at 3.5 V and line A is at 1.5 V, which is a 1. The pair is not perfectly twisted, so a noise pulse adds 2.9 V to line B and 3.0 V to line A. What does the receiver read?
Show the worked solution, 3 steps
- Add the noise to each line
Line B: 3.5 V + 2.9 V = 6.4 V. Line A: 1.5 V + 3.0 V = 4.5 V.
- Take the difference
Vd = 6.4 V − 4.5 V = +1.9 V.
- Compare with the threshold
+1.9 V is far above +200 mV, so the receiver reads a 1, which is correct. Of 3 V of noise, only the 0.1 V that was unequal reached the bit.
The mistake to avoid
A second trap is the letters. Makers do not agree which terminal is A and which is B. Two swapped wires damage nothing, but every bit arrives inverted and the device does not answer.
Check yourself
During one bit, line B is at 1.2 V and line A is at 3.6 V against the common wire. What does the receiver read?
An installer has no twisted pair, and uses two separate single wires laid 30 cm apart for line A and line B. The bus works on the bench and fails when the compressor runs. Why?
A noise pulse adds 4 V to both lines of an RS-485 pair. The same pulse adds 4 V to a link that sends 0 V or 5 V on one wire and decides at 2.5 V. Which link can read a 0 as a 1?
Where you meet it
- Energy meters on the feeders of a plantOne pair of wires runs past every meter, and a gateway reads them in turn.
- A variable speed driveThe speed command and the status travel on the pair, inside the noisiest cabinet on the site.
- A solar plantInverters and weather sensors are hundreds of metres from the recorder, and one pair joins them.
- A bit is the difference between two wires: Vd = VB − VA.
- Noise that is equal on both wires does not change the difference.
- The two lines must be one twisted pair, so that they receive the same noise.
- The devices still need a common wire, and the letters A and B differ between makers.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.