Industrial Data Communications - RS-232/RS-485: Tutorial 2
Industrial Data Communications - RS-232/RS-485: Tutorial 2
Industrial Data Communications - RS-232/RS-485: Tutorial 2
Tutorial 2
This tutorial on industrial data communications is broken down into the following sections: M M M Balanced and Unbalanced Systems RS-232 RS-485
Communication interfaces operating in accordance with the EIA485 interface standards require two conductors to transmit each signal. The voltage at the receiving end is measured as the voltage difference between these two wires. This is known as a balanced or differential system. This eliminates many of the interference problems associated with the common reference wire.
The voltage between the signal conductor and the common reference conductor is known as a common mode voltage (CMV). Ideally the CMV on the two wires will cancel out completely but the greater the CMV, the higher the voltage difference and the the more likely that noise will affect the signal. If the CMV reaches a certain high threshold, the errors will increase to an unacceptable level.
The balanced transmission line permits a higher rate of data transfer over longer distances. The differential method of data transfer is preferable in industrial applications where noise can be a major problem. The disadvantage is that a balanced system requires two conductors for every signal. The successful transfer of voltage signals across two conductors in the presence of noise is based on the assumption that the conductors have similar characteristics and will be affected equally by noise and voltage drops, for example. It does not mean that noise does not exist in the balanced differential system. The voltages on both conductors should rise and fall together, and the differential voltage should remain the same.
DCE Data Communications Equipment, now also called Data Circuit-terminating Equipment in EIA/TIA-232E, for example a modem. A DCE device receives data from the DTE and retransmits via another data communications link, such as the telephone system. A DCE device transmits data on pin 3 and receives data on pin 2.
Equipment that uses the RS-232 standard has the following features: M M M M M point-to-point communication suitable for serial, binary and digital data communication communication is generally asynchronous, meaning that there is fixed timing between data bits, but variable time between character frames full duplex communications Unbalanced transmission (and therefore susceptible to noise)
voltage signals are: logic 1: -3 V to -25 V logic 0: +3 V to +25 V reliable communication up to a distance of about 50ft, depending on the type of cable used and the speed data rates of up to about 20kbps according to the standard (but 115 kBaud in practice). The EIA-232 standard defines 25 electrical connections. The electrical connections are divided into four groups: M M M M data lines control lines timing lines special secondary functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Received Line Signal Received Data Transmitted Data DTE Ready Signal/Common Ground DCE Ready Request to Send Clear to Send Ring Indicator
Shield Transmitted Data Received Data Request to Send Clear to Send DCE Ready Signal/Common Ground Received Line Signal +Voltage (testing) -Voltage (testing) Unassigned Sec Received Line Signal Detector/Data Signal Sec Clear to Send Sec Transmitted Data Transmitter Signal DCE Element Timing Sec Received Data Receiver Signal DCE Element Timing Local Loopback Sec Request to Send DTE Ready Remote Loopback/Signal Quality Detector Ring Indicator Data Signal Rate Transmit Signal DTE Element Timing Test Mode
Shield Transmitted Data (A) Received Data (A) Request to Send (A) Clear to Send (A) DCE Ready (A) Signal/Common Ground Received Line Signal (A) Receiver Signal DCE Element Timing (B) Received Line (B) Transmitter Signal DTE Element Timing (B) Transmitter Signal DCE Element Timing Clear to Send (B) Transmitted Data (B) Transmitter Signal DCE Element Timing (A) Received Data (B) Receiver Signal DCE Element Timing (A) Local Loopback Request to Send (B) DTE Ready (A) Remote Loopback DCE Ready (B) DTE Ready (B) Transmitter Signal DTE Element Timing (A) Test
Table 1 Table of Common DB-9 and DB-25 Pin Assignments for EIA-232 and EIA/TIA-530 (often used for EIA-422 and EIA-485)
The major enhancement of EIA-485 is that a line driver can operate in three states called tri-state operation: M M M logic 1 logic 0 high-impedance
In high impedance the line driver draws virtually no current and appears not to be present on the line. This is known as the disabled state and can be initiated by a signal on a control pin on the line driver integrated circuit. Tri-state operation allows a multidrop network connection and up to 32 transmitters can be connected on the same line, although only one can be active at any one time. Each terminal in a multidrop system must be allocated a unique address to avoid conflicting with other devices on the system. EIA-485 includes current limiting in cases where contention occurs. The EIA-485 interface standard is very useful for systems where several instruments or controllers may be connected on the same line. Special care must be taken with the software to co-ordinate which devices on the network can become active. In most cases a master terminal, such as a PC or computer, controls which transmitter/receiver will be active at any one time. The 2-wire data transmission line does not normally require special termination. On long lines, the leading and trailing edges of data pulses will be much sharper if terminating resistors approximately equal to the characteristic impedance (Zo) of the line are fitted at the extreme ends. This is indicated in Figure 4. For twisted pairs the characteristic impedance is typically between 100 to 120 ohms.
An EIA-485 network can also be connected as a four wire configuration. In this type of connection it is necessary that one node be a master node and all others be slaves. The master node communicates to all slaves, but a slave node can communicate only to the master. Since the slave nodes never listen to another slaves response to the master, a slace node cannot reply incorrectly to another slace node. This is an advantage in a mixed protocol environment.