Skip to content
You Start with one site
Amounts in Start with one site
IoT & Networks · Concept

RS-485

One idea Intermediate 5 min read
Found this useful?

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.

A higher signal voltageThe noise beside a motor drive can be several volts too.Not enough
A shield round the wireIt reduces the noise. Over 180 m it does not remove it.Helps
Two wires, read the differenceThe noise is the same on both, so it subtracts away.This is RS-485

See it

Predict first

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?

See it: the same noise on both wires

Noise on each wire
Difference at the receiver
Bits read wrongly

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.

Vd = VB − VA

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

The question

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
  1. 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.

  2. Take the difference

    Vd = 6.4 V − 4.5 V = +1.9 V.

  3. 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

The noise is not kept out. It is let in equally. People run line A and line B in two separate wires, or in two cores that are not a pair. Then each wire collects a different noise, the difference is no longer clean, and the bus fails when a motor starts. Line A and line B must be one twisted pair from end to end.

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

Question 1

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?

Question 2

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?

Question 3

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.
Key points
  • 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.
Found this useful?

Discussion

    Comments show your name. Be kind, stay on the topic.