MyAdvantech Registration

MyAdvantech is a personalized portal for Advantech customers. By becoming an Advantech member, you can receive latest product news, webinar invitations and special eStore offers.

Sign up today to get 24/7 quick access to your account information.

Basics of the RS-485 Standard

28-08-2018

What is an RS-485 network?

 

RS-485 allows multiple devices (up to 32) to communicate at half-duplex on a single pair of wires, plus a ground wire (more on that later), at distances up to 1200 meters (4000 feet). Both the length of the network and the number of nodes can easily be extended using a variety of repeater products on the market.

 

How does the hardware work?

 

Data is transmitted differentially on two wires twisted together, referred to as a “twisted pair.” The properties of differential signals provide high noise immunity and long distance capabilities. 

An RS-485 network can be configured in two ways: “two-wire” or “four- wire.” In a “two-wire” network the transmitter and receiver of each device are connected to a twisted pair. “Four-wire” networks have one master port with the transmitter connected to each of the “slave” receivers on one twisted pair. The “slave” transmitters are all connected to the “master” receiver on a second twisted pair. 

In either configuration, devices are addressable, allowing each node to be communicated to independently. Only one device can drive the line at a time, so drivers must be put into a high-impedance mode (tri-state) when they are not in use. Some RS-485 hardware handles this automatically. In other cases, the RS-485 device software must use a control line to handle the driver. (If your RS-485 device is controlled through an RS-232 serial port, this is typically done with the RTS handshake line.) 

 A consequence of tri-stating the drivers is a delay between the end of a transmission and when the driver is tri-stated. This turn-around delay is an important part of a two-wire network because, during that time, no other transmissions can occur (not the case in a four-wire configuration). An ideal delay is the length of one character at the current baud rate (i.e. 1 ms at 9600 baud). The device’s manufacturer should be able to supply information on the delay for their products.

 

Two-wire or four-wire?

 

Two-wire RS-485 networks have the advantage of lower wiring costs and the ability for nodes to talk amongst themselves. On the downside, two-wire mode is limited to half-duplex and requires attention to turn-around delay. 

Four-wire networks, on the other hand, allow full-duplex operation, but are limited to master-slave situations (i.e. a “master” node requests information from individual “slave” nodes). “Slave” nodes cannot communicate with each other. 

Remember when ordering your cable, “two-wire” is really two wires + ground, and “four-wire” is really four wires + ground.

2

How does the software work?

 

RS-485 software handles addressing, turn-around delay, and possibly the driver tri-state features of RS-485. Before any purchase, determine whether your software handles these features. Remember, too much or too little turn-around delay can cause troubleshooting fits, and delay should be a function of baud rate. If you are writing your own software or using software written for an RS-232 application, be certain that provisions are made for driver tri-state control. Luckily, there are usually hardware alternatives for controlling driver tri-stating. Contact Advantech B+B SmartWorx Technical Support for further details.

1

Connecting a multidrop 485 network.

 

The EIA RS-485 Specification labels the data wires “A” and “B”, but many manufacturers label their wires “+” and “-”. In B+B’s experience, the “-” wire should be connected to the “A” line, and the “+” wire to the “B” line. Reversing the polarity will not damage n RS-485 device, but it will not communicate. Thus said, the rest is easy: Always connect A to A and B to B.

2

Signal Ground – don’t forget it.

 

While a differential signal does not require a signal ground to communicate, the ground wire serves an important purpose. 

Over a distance of hundreds or thousands of meters/feet, there can be very significant differences in the voltage level of “ground.” RS-485 networks can typically maintain correct data with a difference of -7 to +12 Volts. If the grounds differ more than that amount, data will be lost and often the port itself will be damaged. 

The function of the signal ground wire is to tie the signal ground of each of the nodes to one common ground. However, if the differences in signal grounds is too great, further attention is necessary. Optical isolation is the solution for this problem. Contact Advantech B+B SmartWorx Technical Support for more details.

2
Contact Advantech

1-800-425-5071
1-800-425-5070

Contact Advantech