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.
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. A 485 network can be configured 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 485 device software must use a control line to handle the driver. (If your 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.
Two-wire or four-wire?
Two-wire 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 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.
Signal ground is very important in a RS485 network. 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 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. This problem can be overcome with optical isolation.
Using Send Data Control
If Send Data Crontrol is used, the converter automatically disables the transmit data line at a fixed interval after the last bit, typically one character length.
Interval length is important. If too short, parts of each character being sent can be missed. If longer than the delay of the responding devices, the system may try to switch the data line from transmit to receive before the node with the Send Data converter is ready. You will then miss portions or even complete characters in the response.