Home Products Custom-OEM Downloads About Us Shopping Cart Support

Application Notes

What is EIA/TIA/RS485?

EIA/TIA/RS485 is a communications network designed for, but not limited to multi-drop communication. When considering whether an RS485 data communications network is right for your application there are several points that must be addressed. Know that RS485 communication is half-duplex and asynchronous in nature. When you are working with RS485 you will encounter grounding, shielding, and termination issues. For example when and where to terminate the RS485 network. Why grounding and/or shielding is so necessary for network reliability. Several networking topologies can be implemented using RS485 technology, however some are more desirable than others are. There are speed versus distance tradeoffs that will affect the reliability of network communication. All the above topics must be addressed when determining if an RS485 network is right for you.

What is EIA/TIA/RS422?

RS422 provides full-duplex asynchronous point to point communication via two twisted pair. The electrical characteristics of each pair are similar to RS485 in that they are a balanced differential pair. For the most part you will encounter similar shielding, grounding, termination, and speed vs. distance issues encountered in RS485 networks. The major difference between RS422 and RS485 again is that RS422 is single-ended and full-duplex in nature.

Half-Duplex & Full-Duplex Communication

Half-duplex means outgoing communications shares the same physical medium with incoming messages. Simply put during any exchange of data communication one device must act as master and one or more device’s acts as slave. Data may flow in only one direction at any one given time. The slave may or may not respond depending on your specific application. For instance device A sends out a command to device B requesting a piece of information. In order for device A to send its request to device B, device A becomes a generator and device B must be a receiver. In order to accomplish this each RS-485 device must contain generator circuitry with enable and disable logic as well as receive circuitry. Usually the circuits are contained within one integrated circuit. At this point in order for device B to respond to device A’s request, device A becomes receiver and device B becomes a generator.

Full-duplex means that messages can be exchanged in both directions simultaneously. In Full-Duplex communication there are separate wires or pairs of wires each dedicated to transmitting or receiving. Although multiple receivers may be receiving a single transmission, there may be only one generator active at any given time on the transmit wire pair.

 

Asynchronous Communication

There are two possible explanations for asynchronous communication on an RS485 network. The first one involves actual data bit timing, which we will not go into much detail here. It is sufficient to know that one byte of data is most commonly made up of a ten bit data frame, 1 start bit, 8 data bits, and 1 stop bit. Each bit occupies a fixed amount of time. The second definition of asynchronous communication for the purpose of this document means that there is no arbitration on the RS-485 bus. Simply stated any device can take control of the bus at any time. What this means is that your application must take responsibility for insuring that only one device is acting as a generator at any one time. After a generator has sent a message the responding slave must allow time for the generator to transition to receive before the slave becomes a generator. You must refer to the technical documentation for your generators and receiver to acquire device specific specifications.

Grounding EIA/TIA/RS-485/422

Grounding is essential to reliable operation of any RS485 network. It is also the most overlooked and least understood. The easiest way to ground your RS485 network is to simply use "Earth" ground as your return path. Although easy this may not be the best method for grounding your application, because current leaking from equipment, electro-static discharge (ESD), and lightning all drive current through this path which results in high noise content. The reason for this increased noise level is due to the fact that "Earth" ground presents a relatively high resistance. RS485 is designed to operate normally with a ground potential difference of +/- 7 Volts. During normal operations this is typically not a problem, however during fault conditions or lightning strikes even within ½ mile the ground potential difference can reach hundreds and in some cases thousands of volts. This will most likely result in damage or failure of one or more devices on the RS-485 network.

A good way to reduce this ground and to hold this ground potential difference within standards is to run a third wire. This third wire is commonly a shield around the twisted pair. This will provide a dedicated return path for your RS-485 network which will in turn reduce noise coupled to the system from current leaking from large equipment and ESD. Shielding in addition to twisted pair wiring will also aid in reducing noise coupled onto the transmission line from RF sources and large magnetic fields.

Shielding your EIA/TIA/RS485/422 Nodes

As mentioned in grounding, shielded wire provides a convenient low noise ground return path. On Integrity Instruments interface converters the ground potential difference with a shielded cable is reduced as any induced noise such as RFI is coupled equally onto the shield and the twisted pair. This shield will also act as a barrier resulting in minimal common mode noise or ground potential difference. While not recommended, using the shield as a network system ground is ok, but care must be taken not to create a ground loop in doing so.

Terminating the EIA/TIA/RS485/422 Network

When talking termination a few terms come to mind. Active termination refers to the impedance matching resistor at one or both ends of the RS485/RS422 network. Other terms for active termination include, but are not limited to parallel termination and bi-directional termination. When we refer to passive termination we talk of resistors that disallow an undefined logic state at the input of the line receiver in a case where a device gets disconnected from the network wiring or the network gets cut. Other terminology used when referring to passive termination is fail safe biasing and/or idle state biasing, but not limited to these additional terms.

Termination is only an issue if cable length is long enough for transmission line effects to become an issue. This effect will be based on; 1) the type of cable used, 2) the length of the cable used, and 3) the drive characteristic of the RS485 generator. A good rule of thumb to use when determining if active termination is required is if the RS485 is at either end of the network and the RS485 device is not a generate only device, then termination is required. The impedance value of the termination should match the impedance of the differential-mode impedance of the interconnecting cable. If an impedance value other than 120 ohms is required, then remove the terminating jumpers and supply your own value of terminating resistor. In our units passive termination is always enabled.

Something to keep in mind when determining termination is that unused pairs cabled together with your network cable may resonate under certain conditions. These resonance’s may be coupled into your network and appear to add to the ground potential difference and noise on the network. This effect may be reduced or completely eliminated by terminating each end of the unused pair with a resistor.

Networking Topology (EIA/TIA/RS485)

According to ANSI/TIA/EIA-485-A:

"The mutlipoint system should be configured in the form of a daisy chain. Star, tree, or branch configurations are generally not recommended"

So what is daisy chain, star, tree, and branch network? As shown in figure 1, in a daisy chain network the wire is strung from the network origin to unit 1 then to unit 2 and continues in this fashion until reaching the end point. This is the preferred method because there is only one source of transmission line effect that needs to be addressed. This makes termination, grounding, and shielding reasonably straightforward.

In the tree configuration the network wire is strung from the network origin to the network end point. Additional units are added by tapping off, also know as a stub, from the network backbone. This configuration is very workable, however if the stub will be of considerable length you may consider inserting a repeater so that the stub may be properly terminated. Considerable length means cable runs long enough for transmission line effects to be an issue (see termination).

The star network is bad juju. This is not to say that it cannot work, however it may require lots of magic fixit words and incantations. In any case, the star network is a scenario where there are multiple devices connected to a single point. The result of star network wiring is one generator driving into possibly many terminated nodes. The accumulated termination load will very quickly load the network to an undesirable state making it unrealistic to expect reliable data communications. This is possible if there is only a few nodes or the network length is short enough that termination is not required.

The branch network can start out looking very much like a daisy chain network, but somewhere along the line the network gets "stubbed" forming a tree or star configuration or combinations of the three. In doing so you needlessly increase load due to increased termination demands not to mention make a wiring nightmare.

The goal of designing any network is to have reliable communications at a reasonable cost. Any of the above network topologies may be implemented and work very well considering your budget is large enough for additional equipment such as repeaters. For example placing repeaters in a daisy chain configuration will allow you to branch off into additional daisy chain configuration with proper termination at all network end points.

Optical Isolation Brief

What is optical isolation (opto isolation) and why would I require it? Optical isolation is one method of interrupting a potential ground loop by breaking the electrical circuit with a optical barrier that will not pass electrons. Electrical signals are converted to light on one side of the barrier, then on the opposite side of the barrier the light is converted back into the appropriate electrical signal for the system. Optically isolated devices are available in various forms such as RS232, RS422, and RS485 devices etc. This optical isolation will provide protection from low frequency interference from ground loops, but will not provide isolation from high frequency interference, RFI, and transients. These issues must be dealt with through proper termination and/or shielding.

In today’s world devices are often manufactured and installed by multiple entities. In many cases some or all of the systems devices will be grounded, your computer or PC is a good example. This signal ground from your RS232 port is connected to the system ground, which is tied to case ground, which in turn is tied to earth ground. In some cases one or more of the signal lines in the communication network may be tied to this system ground as well. In cases where these grounds are separated by distance or not wired directly to the same plane equipment faults, transients, and leakage current may cause ground difference potentials large enough to corrupt data or even damage equipment. The reason behind this is the ground through the signal wires, back through your computer to earth ground may be lower impedance than the system ground at the networked device end.

RS232 Serial Port Interface

In order to describe some of the RS-232 drop in replacement applications for RS422 and/or RS485 it is important to understand what signals are available in the RS232 port and what each is used for. Basic RS232 communication may be accomplished using only 3 signal wires, you guessed it Transmit (TD or Tx, or TxD), Receive (RD, Rx, or RxD), and finally ground. We will state the obvious first, Transmit is an output from the computer. If you look at this signal on the oscilloscope you will notice that the voltage levels vary from –8-12 volts to +8-12 volts. The negative voltage whether Tx or Rx represent a mark (data 1), while the positive voltage whether Tx or Rx represents a space (data 0). More complex applications requiring some form of handshaking to prevent buffers from overflowing and also providing equipment status utilize Request to Send (RTS) and Clear to Send (CTS) to control the flow of information between two devices. The Data Set Ready (DSR) and Data Terminal Ready (DTR) signals are most commonly used to request and respond to hardware equipment readiness or status. The remaining two signal are kind of specific to modem devices which are the Ring Indicator (RI) used to indicate a present ring signal on a standard telephone line. Finally the Carrier Detect (CD) used to indicate a connection has been established to a remote device and is currently active.

Now that you have a superficial understanding of the RS-232 port we will complicate matters by discussing two more terms Data Terminal Equipment (DTE) and Data Communication Equipment DCE. The first term DTE used in the "old days" to refer to end points of data communication, or "dumb terminals". Today this DTE device usually refers to your PC. DCE most often referred to a modem. DCE devices were used to communicate with other DCE devices within the office, building, or throughout the world. DTE devices may be connected directly to DCE devices using a straight through connecting cable or vice versa. However, if you desire to connect similar devices (DCE to DCE, or DTE to DTE), you may accomplish this via a Null Modem connector or cable. This cable simply reverses the three signaling pairs, meaning Tx and Rx, RTS and CTS, and DTR and DSR. The signal ground would remain a straight through connection.

Sample Applications (RS485 2-wire)

Basic two wire multi-drop networks will consist of a master device, one or more slave device(s) and the network medium (wire, shield, termination, and ground). To begin let us look at wiring. You essentially four options when selecting your network cabling methodology. If you choose "earth" as your ground you would only require a single twisted pair, no shield. The advantage to this cabling method is that the wire is inexpensive and easy to install. Most likely this method would be chosen if you have conduit to pull wires through, that do not also carry power lines and your environment is reasonably free of electrical noise. The drawback to this method is your network may not operate reliably during periods of high electrical noise (thunderstorms etc).

The second method of wiring your RS485 network involves a 3 conductor for the ground line. There are basically three cable methods used to accomplish this. The first option of the 3 conductor methodology is a two pair cable using one pair for ground and the other pair for the RS485 data communications. The second is a one pair cable with and extra wire used specifically for a ground wire. The third is a one pair cable with a shield, utilizing the shield as a return. The advantage to using this second method (3 conductor cabling) is you would reduce noise induced through ground potential differences. This is the preferred option in areas where there is a potential for high electrical noise or if cabling lacks the cleanliness of conduit or wire trays. This does not mean that if you have wire trays or conduit to run your wires that your network is not susceptible to noise. The drawback of the three-conductor option is elevated cable pricing and is slightly more difficult to install. Care must also be taking using this option not to create a ground loop.

Now you have your wiring planned and/or installed. Now lets map the RS485 multi-drop network out. Each RS485 network is going to consist of a master device and one or more slave(s). Because devices communicate in both directions differentially over a single twisted pair, our network will utilize half-duplex communications. The master will issue instruction to each slave individually and if necessary wait for a response. Communication to individual slave devices is accomplished by assigning each device on the network its own unique address. The old standard for this allowed for 32 nodes, however modern transceiver, and repeater are capable of driving networks with up to 256 nodes. When the master device initiates a communication sequence it must first enable its generator. It may then drive data onto the RS-485 network or bus. All slave devices on the network receive this information. If the address on a slave device matches, it will then process the request and if necessary return a response. Care must be taken here so that when a slave device enables its generator, enough time is allowed for the master to disable its generator and enable its receiver. Notice in this example that data direction is accomplished strictly through software and assumed timing.

Some RS232 to RS485 interface converters have a generator and receiver enable line usually controlled by the RTS signal from the PC which is the case with the Integrity Instruments P/N 485-25A. The state of this RTS signal must be controlled by software. Integrity Instruments provides a device driver for managing this task.

The Integrity Instrument P/N 485-25E utilizes another method of controlling the generator and receiver. A microprocessor is used to detect data flow and direction (receive or transmit), as well as bit timing and automatically switches the generator and receiver. Care must be taken when using this device that a slave does not respond before the device has had sufficient time to switch the RS-485 transceiver from generate to receive. The formula used in determining the amount of time of delay between generate and receive is:

(1/x)/y

Where x = RS-232 byte frame (Example: x=10 or 1 start bit + 8 data bits + 1 stop bit)

Where y = bits per second (Example: y=19200 or19.2Kbps)

Sample Applications (RS422 4-wire single ended)

Full duplex RS232 3 wire applications may be extended quite simply by utilizing two Integrity Instruments P/N 422-25A (see figure #). In this case a few hundred feet separate the two devices. The network is implemented utilizing and earth ground return and two twisted pairs without shield. As you can see this scenario is relatively simple to visualize. This method could also be used to control an RS422 device via your RS-232 port with a single 422-25A.

A more complex example would be extending an RS232 5-wire application. In this application data is transferred over the Tx, and Rx lines. The device is enabled using the RTS signal and its operational status is returned on the CTS line. Due to the nature of this specific application (whether it be extended length, power phasing issue, or anything else one can dream up for that matter) there is potential for a ground loop. The Integrity Instruments Optically Isolated RS232 Repeater P/N 232-OPTx is used to isolate the two circuits thereby eliminating any possibility of a ground loop. Notice here that a shield is used for the return path as well as protecting the wiring from transients and RFI.