RS485 serial information
Introduction to RS485RS232, RS422, RS423 and RS485 are serial communication methods for computers and devices. RS232 is without doubt the best known interface, because this serial interface is implemented on almost all computers available today. But some of the other interfaces are certainly interesting because they can be used in situations where RS232 is not appropriate. We will concentrate on the RS485 interface here.
RS485 is the most versatile communication standard in the standard series defined by the EIA, as it performs well on all four points. That is why RS485 is currently a widely used communication interface in data acquisition and control applications where multiple nodes communicate with each other.
Differential signals with RS485:
One of the main problems with RS232 is the lack of immunity for noise on the signal lines. The transmitter and receiver compare the voltages of the data- and handshake lines with one common zero line. Shifts in the ground level can have disastrous effects. Therefore the trigger level of the RS232 interface is set relatively high at ±3 Volt. Noise is easily picked up and limits both the maximum distance and communication speed. With RS485 on the contrary there is no such thing as a common zero as a signal reference. Several volts difference in the ground level of the RS485 transmitter and receiver does not cause any problems. The RS485 signals are floating and each signal is transmitted over a Sig+ line and a Sig- line. The RS485 receiver compares the voltage difference between both lines, instead of the absolute voltage level on a signal line. This works well and prevents the existence of ground loops, a common source of communication problems. The best results are achieved if the Sig+ and Sig- lines are twisted. The image below explains why.
|Max number of drivers|
Max number of receivers
|Modes of operation||half duplex|
|half duplex||half duplex||half duplex|
|Max distance (acc. standard)||15 m||1200 m||1200 m||1200 m|
|Max speed at 12 m|
Max speed at 1200 m
|Max slew rate||30 V/μs||adjustable||n/a||n/a|
|Receiver input resistance||3..7 kΩ||≧ 4 kΩ||≧ 4 kΩ||≧ 12 kΩ|
|Driver load impedance||3..7 kΩ||≧ 450 Ω||100 Ω||54 Ω|
|Receiver input sensitivity||±3 V||±200 mV||±200 mV||±200 mV|
|Receiver input range||±15 V||±12 V||±10 V||–7..12 V|
|Max driver output voltage||±25 V||±6 V||±6 V||–7..12 V|
|Min driver output voltage (with load)||±5 V||±3.6 V||±2.0 V||±1.5 V|
What does all the information in this table tell us? First of all we see that the speed of the differential interfaces RS422 and RS485 is far superior to the single ended versions RS232 and RS423. We also see that there is a maximum slew rate defined for both RS232 and RS423. This has been done to avoid reflections of signals. The maximum slew rate also limits the maximum communication speed on the line. For both other interfaces—RS422 and RS485—the slew rate is indefinite. To avoid reflections on longer cables it is necessary to use appropriate termination resitors.
We also see that the maximum allowed voltage levels for all interfaces are in the same range, but that the signal level is lower for the faster interfaces. Because of this RS485 and the others can be used in situations with a severe ground level shift of several volts, where at the same time high bit rates are possible because the transition between logical 0 and logical 1 is only a few hundred millivolts.
Interesting is, that RS232 is the only interface capable of full duplex communication. This is, because on the other interfaces the communication channel is shared by multiple receivers and—in the case of RS485—by multiple senders. RS232 has a separate communication line for transmitting and receiving which—with a well written protocol—allows higher effective data rates at the same bit rate than the other interfaces. The request and acknowledge data needed in most protocols does not consume bandwidth on the primary data channel of RS232.
In the picture above, the general network topology of RS485 is shown. N nodes are connected in a multipoint RS485 network. For higher speeds and longer lines, the termination resistances are necessary on both ends of the line to eliminate reflections. Use 100 Ω resistors on both ends. The RS485 network must be designed as one line with multiple drops, not as a star. Although total cable length maybe shorter in a star configuration, adequate termination is not possible anymore and signal quality may degrade significantly.
There is no need for the senders to explicity turn the RS485 driver on or off. RS485 drivers automatically return to their high impedance tri-state within a few microseconds after the data has been sent. Therefore it is not needed to have delays between the data packets on the RS485 bus.
RS485 is used as the electrical layer for many well known interface standards, including Profibus and Modbus. Therefore RS485 will be in use for many years in the future.
If you do something which you are sure
will meet with everybody's approval,
somebody won't like it.
CHISHOLM'S FIRST COROLLARY
|Feb. 2013 | Site map||Copyright © 1997-2010 Lammert Bies, All rights reserved|