This article is from a series of articles looking at some of the popular Serial Communication Protocols. If you like these articles and want to know more, browse our product page for a more in-depth feature description or call an expert at Altium.
These will cover a few of the more popular protocols and standards in use today. After this series, we will review and compare their advantages and disadvantages. We aim to provide helpful information that you can cross-reference next time you need to choose the best serial communication bus for your design.
In this article, we will be looking at the popular RS-485 protocol standard.
RS-485 (the RS standing for Recommended Standard) is also known as TIA-485 (Telecommunications Industry Standard) or EIA-485 (Electronics Industries Alliance). It is an electrical protocol standard (rather than a protocol), which was approved in 1983. It defines the electrical characteristics of the transmitter and receiver drivers of serial communication systems. It is a multi-point system standard that uses a balanced differential pair data transmission line.
RS-485 is a successor to the RS-422, which also uses a balanced differential pair, but only allows one driver per system. The RS-485 protocol standard allows up to 32 drivers in one system, supporting communications over distances of up to 1200 meters, and can keep baud rates from 110 Baud to 115200 Baud.
Adherence to the RS-485 protocol has several transmission line configurations. The first one is RS-485 2-Wire, also known as a Half-Duplex configuration, that uses one differential pair transmission line with a ground reference, as shown in the figure below.
RS-485 2-wire
The second configuration uses 4-Wire and is also known as a Full-Duplex configuration, which uses two differential pairs: labeled TR (transmit) and RX (Receive), along with a ground reference, as shown in the figure below.
RS-485 4-wire
In the 4-Wire configuration, the master transmitter is connected to the slave receiver connections, while the master receiver is connected to the slave transmitter connections.
The main difference between 2-Wire and 4-Wire is that the 2-Wire configuration can at any one time either receive or transmit, while the 4-Wire configuration can simultaneously receive and transmit.
The 2-Wire configuration is generally more popular; however, the configuration you may need to employ will depend on the devices you are using and the drivers they have.
The RS-485 differential pair characteristic impedance is 120 Ω. While you can theoretically connect up to 32 devices (or even more by using an RS-485 repeater), the actual number of nodes will depend on the chosen communication speed or baud rate. The greater the speed, the fewer nodes you can connect, and also, the maximum distance over which you can communicate will decrease. At a full speed of 10 Mbps, the RS-485 can only operate over about 12 meters, while distances of 1200 meters can be achieved at 100 kbps. The figure below shows the relationship between the transmission rate and transmission distance.
RS-485 data rate and cable length dependency
The best layout type for connecting devices using the RS-485 protocol is a daisy chain. The other topologies, like Star, T-Drop, or Ring, are not recommended. This is because RS-485 is a high-speed transmission line and is significantly affected by signal reflections. It is also recommended that shielded twisted-pair cables wire an RS-485 connection because it increases differential pair immunity from electromagnetic effects and noise.
The standard RS-485 cable and its parameters
For the daisy chain topology, the use of termination resistors with a 120 Ω value is required at each end of the network to minimize reflections.
120 Ω Termination Resistors
Some RS-485 transmitters and receivers have these termination resistors built internally. Sometimes, in a noisy environment, the 120 Ω resistors need to be replaced by 60 Ω low pass filters to provide standard noise filtering, as shown in the diagram below:
Low pass filter termination
The use of high-precision resistors (maximum 1% tolerance) is recommended for the termination.
An important consideration is that the ground reference can differ significantly across interconnected devices, damaging their RS-485 ports. The RS-485 interfaces have an additional standard signal wire to minimize any ground potential difference. This wire provides a typical reference potential level for all the RS-485 nodes.
Also, the wire shielding should only be grounded at one point. If the shielding is grounded at several points, ground loops could appear within the network, which can adversely affect the ground reference and induce noise in the shielded wires.
A useful tip. If you need to use a 2-Wire RS-485 device with 4-Wire ones, you just need to simply tie the two positive cables together and the two negative cables together, as shown below:
RS-485 2-Wire connection in a 4-Wire network
The signal levels the RS-485 drives deliver a differential output of 1.5 V across a 54 Ω load, while the receivers can detect differential inputs down as low as 200 mV. This provides a generous margin giving reliable data transmissions even under high levels of signal degradation.
RS-485 driver minimum voltages and receiver voltage sensitivity
It’s important to note that no device will be driving the bus during the idle condition, and the receiver output is undefined. This could cause problems, such as random data appearing during idle periods, which could cause false start bits, interrupts, and framing errors. If this should occur when used in the manufacturing industry, automation, or any other critical application, there could be severe consequences. A combination of pull-up and pull-down resistors can be added at the bus’s termination point to eliminate this risk. A suggested circuit is provided below.
Fail-safe biasing circuit
The resistor values can be calculated by using the following formula (assuming that the termination resistor Rt = 120 Ω):
The biasing resistors will establish a fail-safe mode where only a tiny portion of the voltage region is left undefined. This is because the nodes will have an offset of known voltage, and the noise will not drive them.
The undefined region in RS-485 without and with biasing
Also, drivers that have this fail-safe mode already implemented are readily available.
The RS-485 protocol standard has been implemented in several industrial and automation communication protocols, like Modbus, Profibus DP, OPTOmux, and DH-485.
This article has looked at some of the popular RS-485 protocol standard features and discussed some of its advantages and implementation details. In the following article in this series, we will look at some of the alternate serial communication protocols available. Check out this series's previous articles: Serial Communications Protocols - Introduction, Serial Communications Protocols - Part Two: UART and Serial Communications Protocols - Part Three: RS-232.
If you want to know more, why not browse our product page for a more in-depth feature description or call an expert at Altium.