Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

San Pao Er’s Hardware Development Learning Notes

Sharing knowledge to enhance skillsExchanging experiences to strive for excellence

Understanding RS-485 Communication Standards

Table of Contents

1. Main Features
2. Network Topology
3. Signal Levels and Unit Loads
4. Bus Termination and Stub Length
5. Fail-Safe Biasing

RS-485 is a balanced transmission standard for serial communication approved by the Electronic Industries Alliance (EIA) in 1983. As an electrical standard, RS-485 defines only the electrical characteristics of drivers and receivers using balanced multipoint transmission lines; many higher-level standards reference RS-485 as a reference standard, such as Modbus, Profibus, and DL/T645.

1.Main Features

Balanced interface;
Differential transmission enhances noise immunity and reduces noise radiation;
10Mbps maximum data rate (distance of 40 feet – 12.192m);
4000 feet (1219.2 m) maximum cable length (at speed of 100kbps);
Up to 32 unit loads, multiple drivers and receivers can be connected on the same bus;
Wide common mode range allows for ground potential differences between drivers and receivers, allowing for a common mode range of –7V to +12V.

2.Network Topology

RS-485 recommends using a daisy chain to connect its nodes, with drivers, receivers, and transceivers accessing the trunk line through short stubs, as shown in the figure below.

Understanding RS-485 Communication Standards

The RS-485 interface bus can be designed for full-duplex or half-duplex transmission modes, as shown in the figure below.

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

3.Signal Levels and Unit Loads

1. Signal Levels

The RS-485 standard specifies that the driver can provide a differential output of no less than 1.5V under a 54Ω load, while the receiver can detect differential inputs as low as 200mV;

These two values at the driver and receiver ends provide sufficient margin for reliable data transmission, avoiding data transmission errors in cases of severe signal attenuation in cables and connectors; this is also the main reason for RS-485’s widespread use in long-distance networking in noisy environments.

Understanding RS-485 Communication Standards

As shown in the figure below, the differential lines of RS-485 are designated as A and B lines,

Understanding RS-485 Communication Standards

If the input terminal of the transmitter receives a logic high level (DI=1), then the driver outputs with the A line voltage greater than the B line, and VOA-VOB≥1.5V;

If the input terminal of the transmitter receives a logic low level (DI=0), then the driver outputs with the A line voltage less than the B line, and VOA-VOB≤-1.5V;

If the voltage of the A line at the receiver input is greater than the B line, and VIA-VIB≥200mV, then the receiver outputs a logic high level (RO=1);

If the voltage of the A line at the receiver input is less than the B line, and VIA-VIB≤-200mV, then the receiver outputs a logic low level (RO=0)

2. Unit Load

The RS-485 standard specifies a unit load of 12K, allowing for a maximum of 32 loads;

A driver must be able to drive a minimum of 1.5V differential signal through two 120Ω termination resistors in parallel with up to 32 unit loads;

To determine the unit load parameter, the input voltage on one bus pin is swept from -7V to 12V, while the other bus pin remains grounded, and the input leakage current is measured;

The -7V and 12V levels in the standard are to allow for a ground potential difference (GPD) of up to ±7V between the driver output and the receiver, with the driver’s output voltage varying between GND and 5V;

Thus,

-7V represents that the receiver is driven by the driver to the low level of the bus with -7V GPD;

And 12V represents that the receiver is driven by the driver to the high level of the bus with 7V GPD;

Understanding RS-485 Communication Standards

One unit load is equivalent to a 1mA input leakage current at 12V, representing a single-ended load relative to ground. A simple method is that a unit load corresponds to a 12KΩ resistor from either the A or B bus pin to ground.

Some RS-485 receivers support 1/4 or 1/8 unit loads, allowing for more transceivers to be connected;

The relationship between unit load and receiver input impedance is shown below:

Understanding RS-485 Communication Standards

4.Bus Termination and Stub Length

To avoid signal reflection, RS-485 data transmission lines should always be terminated, and stub lengths (branches) should be as short as possible;

Good termination requires that the termination resistor RT matches the characteristic impedance Z0 of the transmission line;

The RS-485 standard recommends a characteristic impedance Z0 of 120Ω for the transmission line;

As shown in the figure below, cables typically use 120Ω resistors for termination.

Understanding RS-485 Communication Standards

The length of the stub (branch) wiring (the distance between the transceiver and the trunk of the transmission line) should be less than 1/10 of the driver’s output rise time;

The length of the stub (branch) can be calculated using the following formula:

Lstub = tr/10 * v * c

Lstub = Maximum stub length (inch)

tr = Driver (10/90) rise time (ns)

v = The transmission speed of the signal on the trunk cable as a ratio of the speed of light

The transmission speed of signals on PCBs made from Fr4 material is half the speed of light

c = Speed of light (12 inch/ns)

For example::

As shown in the figure, the driver output rise time of MAX13488E is 15ns

Understanding RS-485 Communication Standards

Substituting gives:

Lstub = tr/10 * v * c = 9inch = 228.6 mm

Thus, the stub length cannot exceed 22.86 cm

5.Fail-Safe Biasing

As shown in the figure below, in RS-485 related application circuits, in addition to adding termination resistors RT, “pull-up” and “pull-down” resistors (fail-safe biasing circuit) are also added, primarily for fail-safe protection.

Understanding RS-485 Communication Standards

Fail-safe biasing circuits canensure that the receiver is capable of outputting a definite state when there is no input signal

Causes of lack of input signal include the following three:

① Open circuit: cable interruption or transceiver disconnection from the bus

② Short circuit: wires of the differential pair contact each other due to insulation failure

③ Bus idle: this occurs when all bus drivers are inactive.

Under the above conditions, when the input signal is zero, traditional receivers output random states;

Currently, most transceivers internally include a fail-safe biasing circuit to protect against open circuit, short circuit, and bus idle, ensuring that even when the signal is lost, the receiver can force output to a definite state.

However, some fail-safe protection designs also have their drawbacks, with the worst-case noise margin being only 10mV;

Therefore, in noisy environments, it is necessary to add external fail-safe biasing circuits to increase noise margins.

The above explanation of fail-safe biasing is relatively general and not detailed enough; below is a detailed explanation of fail-safe biasing by ADI.

1. Bus Idle State – Receiver Output RO May Be Incorrect

The UART communication data format is: start bit + data bits + parity bit + stop bit;

The start bit is detected when the transition from high to low occurs, followed by 8 data bits, 1 parity bit, and stop bits (1 or 2); then another start bit;

When the last character is sent, the line should remain high until the next start bit.

There is a state called bus idle state, which occurs when all transceivers connected to the bus are in receive mode at the same time; during this state, the differential voltage on the bus (VOA−VOB) is 0V.

For an RS-485 network without fail-safe biasing circuits,

in the bus idle state, the receiver RO output is not defined by the RS-485 standard (as shown in the figure Differential Receiver Truth Table)

and the receiver RO output generates random data, which may lead to system operation errors.

Understanding RS-485 Communication Standards

RS-485 network without fail-safe biasing, as shown in the figure below

Understanding RS-485 Communication Standards

2. Differential Input Threshold Voltage

As mentioned earlier, the RS-485 standard specifies a ±200mV differential input threshold voltage; when the differential input VIA-VIB≥200mV, the receiver outputs a logic high level (RO=1);

When the differential input VIA-VIB≤-200mV, the receiver outputs a logic low level (RO=0);

This means that the differential input voltage has a 400mV uncertain state, as shown in the figure.

Understanding RS-485 Communication Standards

To avoid this uncertain state leading to system operation errors, some operations are needed to convert the uncertain state into a definite state (logic high/low state).

Two of the most commonly used methods are:

① Using receivers with built-in fail-safe input thresholds;

② Creating an external bias on the idle bus using additional external resistors;

Both methods ensure a logic high state on the bus, equivalent to a positive differential voltage.

3. Receivers with Built-in Fail-Safe Input Thresholds

As shown in the figure, receivers with built-in fail-safe input thresholds adjust the differential input threshold voltage from ±200mV to −200 mV and then to −30 mV through internal bias circuits;

Even in the bus idle state where VOA-VOB=0 (>-30mV), the receiver RO output is high.

Understanding RS-485 Communication Standards

4. External Fail-Safe Biasing Circuit

The external fail-safe biasing circuit consists of a resistor voltage divider that can generate sufficient bus differential voltage to drive the receiver to produce a definite output state.

To ensure sufficient noise margin, in addition to the 200mV receiver input threshold, VAB must also include the maximum measured differential noise, VAB= 200mV + Vnoise.

Understanding RS-485 Communication Standards

Calculation of External Biasing Resistors

For applications with transmission distances less than 100 meters, bias circuits are typically provided at one end of the bus, as shown in the figure below.

Understanding RS-485 Communication Standards

Pull-up and pull-down resistors RB provide bias voltage during idle states of the bus, simplified as shown in the figure below.

Understanding RS-485 Communication Standards

At this time, REQ represents the equivalent input resistance of all transceivers connected to the bus, and RT1 and RT2 are the termination resistors;

To calculate the value of the external biasing resistors, it is necessary to ensure that the line termination and common mode load meet the following conditions:

① The cable end without a bias network uses RT1 for termination, with a value equal to the cable’s characteristic impedance Zo, i.e.

Understanding RS-485 Communication Standards

② At the end with bias resistors, the equivalent resistance must match the cable impedance Zo, i.e.

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

③ The RS-485 standard specifies the maximum common mode load, that is, compliant transceivers must be able to drive 32 unit loads UL, with one unit load being 12KΩ, and the total common mode load for 32 UL being RCM=375Ω;
Understanding RS-485 Communication Standards
Due to the presence of bias resistors, in addition to the equivalent transceiver input impedance, there is also a common mode load, so the combination of RB and REQ must not be less than RCM, i.e.

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

Based on node currents, the derivation process is as follows:
Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

Combining the above conditions ①②③, we obtain:

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

For example::

Zo=120Ω, minimum supply voltage is 4.75V (5V supply, ripple 5%) Vab=300mV (designed according to 200mV+100mV noise margin)

Understanding RS-485 Communication Standards

Understanding RS-485 Communication Standards

Select standard resistor RB=470Ω

Understanding RS-485 Communication Standards

Select standard resistorRT2 = 138Ω

Because external resistors will bring additional common mode load, it is necessary to determine the maximum number of transceiver unit loads nul to ensure that the loading on the bus is not less than 375Ω of RCM;

nul is the ratio of one unit load to the input impedance of the transceiver: nul=12KΩ/REQ

Then:

Understanding RS-485 Communication Standards

Based on the above calculation RB=470Ω, then

Understanding RS-485 Communication Standards

If the input impedance of the transceiver is 1/8UL, it can connect 6.4/1/8 = 51 units

Understanding RS-485 Communication Standards

Finally

Click here for direct reading/downloading of the RS-485 communication protocol reference manual

Understanding RS-485 Communication Standards

More Notes

RS-232

Introduction to Common Level Conversion Circuits

Understanding SPI Interface in One Article

Understanding I2C Bus in One Article

Understanding the Differences and Design Selection of Crystal Oscillators and Crystals in One Article

Understanding the Power-Up Timing of Xilinx Zynq7000 and 7 Series FPGA in One Article

Understanding the Bootstrap Capacitor of BUCK Circuits in One Article

What are the Differences Between LDO and DCDC?

Understanding the Basics of DCDC in One Article

Understanding the Basics of LDO in One Article

What Research is There on Pull-Up and Pull-Down Resistors?

Why is it Common to Place 1uF and 0.1uF Capacitors in Parallel in Circuits?

Understanding RS-485 Communication Standards

This is Soft Grinding HardFollow the WeChat public account, the owner San Pao Er’s Hardware Development Learning Notes and Experience Sharing

Learning Sharing knowledge to enhance skills, exchanging experiences to strive for excellence

Leave a Comment