21.01.2021

Connection of 485 interface diagram. An in-depth description of the EIA485 (RS485) standard. Electromagnetic Induced Interference


The RS-485 interface is probably the most common interface for organizing small industrial automation networks.

This is facilitated by its high specifications with ease of implementation. The RS-485 interface allows simple hardware to create networks:

  • bus topology;
  • with twisted pair cable as a data transmission medium;
  • the length of the communication line can reach 1200 m;
  • data transfer rate up to 10 Mbps.

Many standard protocols, including ModBus, can be used to control distributed systems based on RS-485. The interface allows you to create networks with specialized protocols. For the hardware implementation of RS-485, it is enough to add only one microcircuit of a small degree of integration to the microcontroller.

RS-485 is described in the ANSI TIA / EIA – 485 – A: 1998 standard. The standard specifies only electrical and timing parameters. He does not stipulate:

  • exchange protocol;
  • types of cables and connectors;
  • galvanic isolation of network subscribers.

Basic parameters of the RS-485 standard.

RS-485 data transmission method.

The RS-485 interface standard defines the following signals:

  • A - non-inverting;
  • B - inverting;
  • C - common line (optional signal).

Alternative signal designations are sometimes used:

  • Data + / Data-;
  • D + / D-;
  • + / -.

The interface uses a differential method of data transmission. Information is transmitted using two antiphase signals A and B, and the state of the RS-485 bus is determined by the potential difference between lines A and B relative to the common line C. The voltage of each line relative to ground can be any, but within the range of -7 ... +12 V.

RS-485 requires differential receivers and transmitters.

The transmitters generate 2 antiphase signals with a voltage difference of at least 1.5 V (according to the standard).

Differential receivers are used to receive data, which separate the voltage difference between lines A and B. When the difference is more than 200 mV, but up to +12 V, the line state is considered equal to a logical unit. When the voltage difference is less than - 200 mV, but not less than - 7 V, the line is in a state of logical zero.

  • Va> Vb corresponds to log. one;
  • Va< Vb соответствует лог. 0.

It is easy to calculate that the level of interference and the voltage drop across the active resistance of the line can reach 1.3 V (the output voltage of the transmitter is 1.5 V minus the response threshold of the receivers of 0.2 V). Such a margin ensures the operation of the interface on long communication lines with significant active resistance. The maximum length of the communication line (1200 m) is determined by this very parameter. The actual voltage difference at the output of the transmitters can reach 5 V.

Lines A and B are symmetrical with respect to the ground C. Interference and pickup in them are similar in shape and magnitude. In differential receivers, the line voltages are subtracted, the signal is extracted, and the interference voltage is found to be zero. Of course, in real conditions there is always a slight asymmetry of lines and loads, which leads to the appearance of interference in the output signal, but it is significantly attenuated.

Due to the symmetry of the transmitters and receivers of the interface, a significant effect in the fight against electromagnetic interference is given by the use of twisted pair as a communication line. The pick-up currents in adjacent turns are directed opposite to each other and are mutually compensated.

The RS-485 standard defines the following electrical parameters for transmitters and receivers.

Parameter Conditions Meaning unit of measurement
Min. Max.
No load transmitter output voltage Rload = ∞ 1,5
-1,5
6
-6
V
Output voltage of transmitter under load Rload = 54 Ohm 1,5
-1,5
5
-5
V
Output impedance of the transmitter 54 Ohm
Short circuit current of transmitter Closing the output to the power supply + 12V or - 7V - ± 250 mA
Common mode voltage at transmitter output Rload = 54 Ohm -1 3 V
Receiver sensitivity Common mode voltage -7 V to +12 V - ± 200 mV
Common mode voltage at receiver input -7 +12 V
Receiver input impedance 12 - kOhm
Total input impedance 375 - Ohm

As a rule, devices with RS-485 interfaces are networked with the "Common bus" topology. Subscribers are connected in parallel with one two-wire communication line with an additional common wire.

Each subscriber is connected to the network through a differential transmitter (D) and a receiver (R). Only one network transmitter can be active (switched on) at a time. All other transmitters must be in the third (high impedance) state. The transmitter status is controlled by a separate signal (DE).

The general sequence of data exchange looks like this. The master turns on its transmitter, transmits data, then turns off and receives a response. All other devices at this moment are in a state with disabled transmitters. The slave receives the data, then turns on its transmitter and sends a response to the master.

Naturally, there are moments when all transmitters are turned off, “the line hangs in the air”. If you do not take special measures, then the state of the line will be undefined. Any level can be at the outputs of the receivers.

This uncertainty can be eliminated by connecting the non-inverting input of the receiver to the power bus through resistors, and the inverting input to the ground.

The resistances of the resistors must be such as to create an offset between the inputs of the receivers not less than the response threshold (200 mV). These resistors must be taken into account when calculating the end-of-line resistors - terminators.

There are other options for eliminating the ambiguity of the network state at a time when all transmitters are turned off. But they are all at the protocol level.

It is possible to transmit a service sequence of codes at the beginning of the exchange. But this greatly complicates the exchange, requires the transfer of unnecessary data.

If there is always an active device in the network, then there is an option - turning off the transmitter at the moment when the second transmitter is already on, but both are in the log state. 1. Suppose the master is transmitting data. Then it transfers the output of its transmitter to the log state. 1. The slave device turns on its transmitter, also in the log state. 1. Next, the Master turns off the transmitter, and the slave starts transmitting data. The line never stays disconnected. Such an algorithm requires precise synchronization, working out the time intervals for switching transmitters.

Another annoyance is echo. Anything transmitted by a device transmitter is perceived by its own receiver. We must take this into account. On some systems, echo data is processed as part of the protocol. In others, the operation of the receiver is prohibited at the time of transmission. In my libraries Tiny_ModBusRTU_Master and Tiny_ModBusRTU_Slave, after every data transfer, the master flushes the receive buffer.

Communication line coordination.

When transmitting data over a long distance, noticeable signal distortion in the communication line can occur. The electromagnetic wave is reflected from the end of the cable, returns to the transmitter, resonance phenomena occur.

The reason is the distributed capacitive and inductive properties of the cable. In practice, the cable has a uniform design throughout its length, hence the same distributed parameters. Therefore, the property of a cable can be characterized by one parameter - characteristic impedance. So, the signal distortion in the cable can be significantly reduced if a resistor is connected at the receiving end with a resistance equal to the wave impedance of the cable. Such a resistor is called a terminator. In RS-485 networks, terminators are installed at both ends of the cable, because both sides can be both receiving and transmitting.

The characteristic impedance of twisted pairs is, as a rule, 100 ... 150 Ohm. For RS-485 networks, special cables with a characteristic impedance of 120 Ohm have been developed. It is this resistance of terminators that is considered standard. Often 120 Ohm terminators are already installed in RS-485 devices and can be disabled with a switch.

In practice, terminators with a higher resistance than the characteristic impedance of the cable are used. If the active resistance of the cable is large and comparable to the resistance of the terminators, then on the receiving side the signal amplitude can significantly decrease. In this case, it is necessary to seek a compromise between the allowable signal distortion and its amplitude. At low baud rates, 9600 baud and below, the use of low impedance terminators can even reduce reception quality.

The distortion of the signal in the communication line is also affected by the network topology. Signal reflections occur from any line discontinuity, including taps. Therefore, the communication line must physically bypass the network devices sequentially, without long branches.

The exceptions are networks with low data rates and networks using repeaters. Due to repeaters, the total length of the RS-485 communication line can also be increased.

Galvanic isolation.

The RS-485 standard does not provide for galvanic isolation of the interface from the communication line. But if the network devices are located at a great distance from each other, then the potentials of their ground wires can diverge to a significant voltage. In this case, differential signals will not save, their potentials may diverge more than the permissible -7 ... + 12 V. This will lead to the interface inoperability and even its failure.

For industrial applications, wireless data lines can never completely replace wired... Among the latter, the most common and reliable is still serial interface Rs -485 ... And the manufacturer of the most protected from external influences and various in configuration and degree of integration of transceivers for him, in turn, remains the companyMaxim Integrated .

Despite the rise in popularity wireless networks, the most reliable and stable communication, especially in harsh operating conditions, is provided by wired. Properly designed wired networks enable efficient communications in industrial applications and industrial control systems, while ensuring immunity to interference, electrostatic discharge and surge voltages. Distinctive features of the RS-485 interface have led to its widespread use in the industry.

Comparison of RS-485 and RS-422 interfaces

The RS-485 transceiver is the most common physical layer interface for implementing serial data networks for harsh environments in industrial and building management systems. This standard serial interface provides high-speed data exchange at a comparatively long distance one differential line (twisted pair). The main problem of using RS-485 in industry and in automated building management systems is that electrical transients arising from fast switching of inductive loads, electrostatic discharges, as well as surge voltages, acting on the networks of automated control systems, can distort the transmitted data or lead to their failure.

Currently, there are several types of data transmission interfaces, each of which is designed for specific applications, taking into account the required set of parameters and the structure of the protocol. Serial interfaces include CAN, RS-232, RS-485 / RS-422, I 2 C, I 2 S, LIN, SPI, and SMBus, however RS-485 and RS-422 are still the most reliable. especially in harsh operating conditions.

RS-485 and RS-422 interfaces are similar in many ways, however, they have some significant differences that must be taken into account when designing data transmission systems. In accordance with the TIA / EIA-422 standard, the RS-422 interface is specified for industrial applications with one data bus master to which up to 10 slaves can be connected (Figure 1). It can transmit at speeds up to 10 Mbps using twisted pair, which makes it possible to increase noise immunity and achieve the maximum possible range and data transfer rate. Typical applications for the RS-422 are industrial process automation (chemical manufacturing, food processing, paper mills), integrated manufacturing automation (automotive and metalworking industries), ventilation and air conditioning systems, security systems, motor control and object movement control.

RS-485 provides greater flexibility by allowing multiple masters on a common bus and increasing the maximum number of devices on a bus from 10 to 32. According to the TIA / EIA-485 standard, RS-485 has more a wide common-mode voltage range (-7 ... 12 V instead of ± 7 V) and a slightly smaller differential voltage range (± 1.5 V instead of ± 2 V), which ensures a sufficient receiver signal level at maximum line load. Using the advanced capabilities of the multidrop data bus, you can create networks of devices connected to a single RS-485 serial port. Due to its high noise immunity and the possibility of multi-drop connections, RS-485 is the best among serial interfaces for use in industrial distributed systems connected to a programmable logic controller(PLC), graphic controller (HMI) or other controllers for data collection. Since RS-485 is an extended version of RS-422, all RS-422 devices can be connected to a bus controlled by an RS-485 master. Typical applications for RS-485 are similar to those listed above for RS-422, with more frequent use of RS-485 due to its advanced capabilities.

RS-485 is the most popular industrial interface

The TIA / EIA-485 standard allows the use of RS-485 at a distance of up to 1200 m. At shorter distances, data rates are more than 40 Mbps. Using a differential signal provides the RS-485 interface with a longer range, but the baud rate decreases as the line length increases. The baud rate is also affected by the cross-sectional area of ​​the line wires and the number of devices connected to it. It is recommended to use RS-485 transceivers with a built-in high frequency correction function, such as the MAX3291, if you need to obtain both long range and high data transfer rates. The RS-485 interface can be used in half duplex mode using one twisted pair of wires or in full duplex mode with simultaneous transmission and reception of data, which is provided using two twisted pairs (four wires). In a multidrop configuration in half duplex mode, RS-485 is capable of supporting up to 32 transmitters and up to 32 receivers. However, the new generation transceiver ICs have a higher input impedance, which can reduce the receiver line load from 1/4 to 1/8 of the standard value. For example, using the MAX13448E transceiver, the number of receivers connected to the RS-485 bus can be increased to 256. With the enhanced RS-485 multidrop interface, you can network multiple devices connected to a single serial port, as shown in Figure 2.

The receiver sensitivity is ± 200 mV. Therefore, to recognize one data bit, the signal levels at the receiver connection point must be greater than +200 mV for zero and less than -200 mV for unity (Figure 3). In this case, the receiver will suppress interference, the level of which is in the range of ± 200 mV. The differential line also provides effective common mode rejection. The minimum input impedance of the receiver is 12 kOhm, the output voltage of the transmitter is in the range of ± 1.5 ... ± 5 V.

Serial problems in an industrial environment

Industrial system designers face the daunting challenges of ensuring reliable operation in an electromagnetic environment that can damage equipment or disrupt digital data transmission systems. One example of such systems is automatic control technological equipment at an automated industrial enterprise. The controller that controls the process measures its parameters, as well as environmental parameters, and transmits commands to executive devices or generates emergency notifications. Industrial controllers are, as a rule, microprocessor-based devices, the architecture of which is optimized for solving the problems of a given industrial enterprise. Point-to-point data lines in such systems are subject to strong electromagnetic interference from the environment.

Industrial DC / DC converters operate with high input voltages and provide isolated voltages from the input to power the load. To power devices of a distributed system that do not have their own mains power supply, voltages of 24 or 48 V DC are used. The terminal load is supplied with 12 or 5 V, obtained by converting the input voltage. Systems that communicate with remote sensors or actuators require protection against transients, electromagnetic interference, and ground potential differences.

Many companies, such as Maxim Integrated, go to great lengths to ensure that ICs for industrial applications are highly reliable and resistant to harsh electromagnetic environments. Maxim's RS-485 transceivers have built-in high-voltage ESD and surge protection and are hot-swappable without data loss on the line.

Protection of data transmission systems from adverse external influences

Enhanced ESD protection

Electrostatic discharge (ESD) occurs when two oppositely charged materials come into contact, thereby transferring static charges and forming a spark discharge. ESD often occurs when people come into contact with their surroundings. Spark discharges arising from careless handling of semiconductor devices can significantly degrade their characteristics or lead to complete destruction of the semiconductor structure. ESD can occur, for example, when replacing a cable or simply touching an I / O port and cause the port to be disabled due to the failure of one or more interface microcircuits (Figure 4).

Such accidents can lead to significant losses, as they increase the cost of warranty repairs and are perceived by consumers as a consequence of the poor quality of the product. In industrial production, ESD is a serious problem with the potential to cause billions of dollars in losses annually. Under real-world conditions, ESD can lead to the failure of individual components, and sometimes the entire system. External diodes can be used to protect data interfaces, but some interface ICs contain built-in ESD protection components and do not require additional external protection circuits. Figure 5 shows a simplified functional diagram of a typical embedded ESD protection circuit. Signal line impulses are limited by diode protection at the supply voltage V CC and ground and thus protect the interior of the circuit from damage. Currently manufactured interface chips and analog switches with built-in ESD protection generally comply with IEC 61000-4-2.

Maxim Integrated has invested heavily in the development of chips with reliable, built-in ESD protection and is currently the leader in RS-232 to RS-485 transceivers. These devices withstand IEC 61000-4-2 and JEDEC JS-001 ESD test pulses directly on the I / O ports. Maxim's ESD solutions are reliable, affordable, have no additional external components, and are less expensive than most peers. All interface microcircuits manufactured by this company contain built-in elements that provide protection of each output from ESD arising during production and operation. The MAX3483AE / MAX3485AE family of transceivers protect transmitter and receiver outputs from high-voltage impulses up to ± 20 kV. At the same time, the normal operating mode of the products is maintained, there is no need to turn off and turn on the power again. In addition, built-in ESD protections provide power on / off and low power standby operation.

Overvoltage protection

In industrial applications, the inputs and outputs of RS-485 drivers are prone to failures due to surge voltages. Surge voltage parameters are different from ESD - while ESD duration is usually in the range up to 100 ns, the duration of surge voltages can be 200 μs or more. Overvoltages can be caused by wiring errors, poor connections, damaged or defective cables, and solder droplets that can form a conductive connection between the power and signal lines on the printed circuit board or in the connector. Since industrial power systems use voltages in excess of 24 V, exposing standard RS-485 transceivers that are not surge protected to such voltages will damage them within minutes or even seconds. To protect against surge voltages, conventional RS-485 interface chips require expensive external devices based on discrete components. RS-485 transceivers with built-in surge protection can handle up to ± 40, ± 60, and ± 80 V common-mode data line noise. Maxim manufactures a line of RS-485 / RS-422 transceivers MAX13442E… MAX13444E that withstands DC input voltages and outputs up to ± 80 V with respect to ground. The security features function regardless of the current state of the chip - whether it is on, off, or in standby mode - making these transceivers the most reliable in the industry, ideal for industrial applications. Maxim's transceivers remain operational against overvoltages caused by shorted power and signal lines, wiring errors, wrong connection connectors, cable defects and misuse.

Tolerance of receivers to undefined line conditions

An important characteristic of the RS-485 interface microcircuits is the immunity of receivers to undefined line states, which guarantees the setting of a high logic level at the receiver output when the inputs are open or closed, as well as when all transmitters connected to the line go into inactive mode (high-impedance state of the outputs). The problem of correct perception by the receiver of closed data line signals is solved by shifting the input signal thresholds to negative voltages of -50 and -200 mV. If the input differential voltage of the receiver V A - V B is greater than or equal to -50 mV, the output R 0 is set to a high level. If V A - V B is less than or equal to -200 mV, the output R 0 is set to a low level. When all transmitters go to an inactive state and there is a termination on the line, the differential input voltage of the receiver is close to zero, as a result of which the output of the receiver goes high. In this case, the margin of noise immunity at the input is 50 mV. Unlike previous generation transceivers, the -50 and -200 mV thresholds correspond to the ± 200 mV values ​​set by the EIA / TIA-485 standard.

Hot swappable

Literature

  1. Application note 4491, “Damage from a Lightning Bolt or a Spark – It Depends on How Tall You Are!”;
  2. Application note 5260, “Design Considerations for a Harsh Industrial Environment”;
  3. Application note 639, "Maxim Leads the Way in ESD Protection".

For industrial applications, wireless data lines can never completely replace wired... Among the latter, the most common and reliable is still serial interface Rs -485 ... And the manufacturer of the most protected from external influences and various in configuration and degree of integration of transceivers for him, in turn, remains the companyMaxim Integrated .

Despite the growing popularity of wireless networks, the most reliable and stable communication, especially in harsh operating conditions, is provided by wired ones. Properly designed wired networks enable efficient communications in industrial applications and industrial control systems, while ensuring immunity to interference, electrostatic discharge and surge voltages. Distinctive features of the RS-485 interface have led to its widespread use in the industry.

Comparison of RS-485 and RS-422 interfaces

The RS-485 transceiver is the most common physical layer interface for implementing serial data networks for harsh environments in industrial and building management systems. This serial interface standard provides high-speed communication over a relatively long distance over a single differential line (twisted pair). The main problem of using RS-485 in industry and in automated building management systems is that electrical transients arising from fast switching of inductive loads, electrostatic discharges, as well as surge voltages, acting on the networks of automated control systems, can distort the transmitted data or lead to their failure.

Currently, there are several types of data transmission interfaces, each of which is designed for specific applications, taking into account the required set of parameters and the structure of the protocol. Serial interfaces include CAN, RS-232, RS-485 / RS-422, I 2 C, I 2 S, LIN, SPI, and SMBus, however RS-485 and RS-422 are still the most reliable. especially in harsh operating conditions.

RS-485 and RS-422 interfaces are similar in many ways, however, they have some significant differences that must be taken into account when designing data transmission systems. In accordance with the TIA / EIA-422 standard, the RS-422 interface is specified for industrial applications with one data bus master to which up to 10 slaves can be connected (Figure 1). It provides transmission at speeds up to 10 Mbps using a twisted pair cable, which improves noise immunity and achieves the highest possible data transmission range and speed. Typical applications for the RS-422 are industrial process automation (chemical manufacturing, food processing, paper mills), integrated manufacturing automation (automotive and metalworking industries), ventilation and air conditioning systems, security systems, motor control and object movement control.

RS-485 provides greater flexibility by allowing multiple masters on a common bus and increasing the maximum number of devices on a bus from 10 to 32. According to the TIA / EIA-485 standard, RS-485 has more a wide common-mode voltage range (-7 ... 12 V instead of ± 7 V) and a slightly smaller differential voltage range (± 1.5 V instead of ± 2 V), which ensures a sufficient receiver signal level at maximum line load. Using the advanced capabilities of the multidrop data bus, you can create networks of devices connected to a single RS-485 serial port. Due to its high noise immunity and multi-drop capability, RS-485 is the best serial interface for use in industrial distributed systems connected to a programmable logic controller (PLC), graphics controller (HMI) or other data acquisition controllers. Since RS-485 is an extended version of RS-422, all RS-422 devices can be connected to a bus controlled by an RS-485 master. Typical applications for RS-485 are similar to those listed above for RS-422, with more frequent use of RS-485 due to its advanced capabilities.

RS-485 is the most popular industrial interface

The TIA / EIA-485 standard allows the use of RS-485 at a distance of up to 1200 m. At shorter distances, data rates are more than 40 Mbps. Using a differential signal provides the RS-485 interface with a longer range, but the baud rate decreases as the line length increases. The baud rate is also affected by the cross-sectional area of ​​the line wires and the number of devices connected to it. It is recommended to use RS-485 transceivers with a built-in high frequency correction function, such as the MAX3291, if you need to obtain both long range and high data transfer rates. The RS-485 interface can be used in half duplex mode using one twisted pair of wires or in full duplex mode with simultaneous transmission and reception of data, which is provided using two twisted pairs (four wires). In a multidrop configuration in half duplex mode, RS-485 is capable of supporting up to 32 transmitters and up to 32 receivers. However, the new generation transceiver ICs have a higher input impedance, which can reduce the receiver line load from 1/4 to 1/8 of the standard value. For example, using the MAX13448E transceiver, the number of receivers connected to the RS-485 bus can be increased to 256. With the enhanced RS-485 multidrop interface, you can network multiple devices connected to a single serial port, as shown in Figure 2.

The receiver sensitivity is ± 200 mV. Therefore, to recognize one data bit, the signal levels at the receiver connection point must be greater than +200 mV for zero and less than -200 mV for unity (Figure 3). In this case, the receiver will suppress interference, the level of which is in the range of ± 200 mV. The differential line also provides effective common mode rejection. The minimum input impedance of the receiver is 12 kOhm, the output voltage of the transmitter is in the range of ± 1.5 ... ± 5 V.

Serial problems in an industrial environment

Industrial system designers face the daunting challenges of ensuring reliable operation in an electromagnetic environment that can damage equipment or disrupt digital data transmission systems. One example of such systems is the automatic control of technological equipment in an automated industrial enterprise. The controller that controls the process measures its parameters, as well as environmental parameters, and transmits commands to executive devices or generates emergency notifications. Industrial controllers are, as a rule, microprocessor-based devices, the architecture of which is optimized for solving the problems of a given industrial enterprise. Point-to-point data lines in such systems are subject to strong electromagnetic interference from the environment.

Industrial DC / DC converters operate with high input voltages and provide isolated voltages from the input to power the load. To power devices of a distributed system that do not have their own mains power supply, voltages of 24 or 48 V DC are used. The terminal load is supplied with 12 or 5 V, obtained by converting the input voltage. Systems that communicate with remote sensors or actuators require protection against transients, electromagnetic interference, and ground potential differences.

Many companies, such as Maxim Integrated, go to great lengths to ensure that ICs for industrial applications are highly reliable and resistant to harsh electromagnetic environments. Maxim's RS-485 transceivers have built-in high-voltage ESD and surge protection and are hot-swappable without data loss on the line.

Protection of data transmission systems from adverse external influences

Enhanced ESD protection

Electrostatic discharge (ESD) occurs when two oppositely charged materials come into contact, thereby transferring static charges and forming a spark discharge. ESD often occurs when people come into contact with their surroundings. Spark discharges arising from careless handling of semiconductor devices can significantly degrade their characteristics or lead to complete destruction of the semiconductor structure. ESD can occur, for example, when replacing a cable or simply touching an I / O port and cause the port to be disabled due to the failure of one or more interface microcircuits (Figure 4).

Such accidents can lead to significant losses, as they increase the cost of warranty repairs and are perceived by consumers as a consequence of the poor quality of the product. In industrial production, ESD is a serious problem with the potential to cause billions of dollars in losses annually. Under real-world conditions, ESD can lead to the failure of individual components, and sometimes the entire system. External diodes can be used to protect data interfaces, but some interface ICs contain built-in ESD protection components and do not require additional external protection circuits. Figure 5 shows a simplified functional diagram of a typical embedded ESD protection circuit. Signal line impulses are limited by diode protection at the supply voltage V CC and ground and thus protect the interior of the circuit from damage. Currently manufactured interface chips and analog switches with built-in ESD protection generally comply with IEC 61000-4-2.

Maxim Integrated has invested heavily in the development of chips with reliable, built-in ESD protection and is currently the leader in RS-232 to RS-485 transceivers. These devices withstand IEC 61000-4-2 and JEDEC JS-001 ESD test pulses directly on the I / O ports. Maxim's ESD solutions are reliable, affordable, have no additional external components, and are less expensive than most peers. All interface microcircuits manufactured by this company contain built-in elements that provide protection of each output from ESD arising during production and operation. The MAX3483AE / MAX3485AE family of transceivers protect transmitter and receiver outputs from high-voltage impulses up to ± 20 kV. At the same time, the normal operating mode of the products is maintained, there is no need to turn off and turn on the power again. In addition, built-in ESD protections provide power on / off and low power standby operation.

Overvoltage protection

In industrial applications, the inputs and outputs of RS-485 drivers are prone to failures due to surge voltages. Surge voltage parameters are different from ESD - while ESD duration is usually in the range up to 100 ns, the duration of surge voltages can be 200 μs or more. Surges can be caused by wiring errors, poor connections, damaged or defective cables, and solder droplets that can form a conductive connection between power and signal lines on a PCB or connector. Since industrial power systems use voltages in excess of 24 V, exposing standard RS-485 transceivers that are not surge protected to such voltages will damage them within minutes or even seconds. To protect against surge voltages, conventional RS-485 interface chips require expensive external devices based on discrete components. RS-485 transceivers with built-in surge protection can handle up to ± 40, ± 60, and ± 80 V common-mode data line noise. Maxim manufactures a line of RS-485 / RS-422 transceivers MAX13442E… MAX13444E that withstands DC input voltages and outputs up to ± 80 V with respect to ground. The security features function regardless of the current state of the chip - whether it is on, off, or in standby mode - making these transceivers the most reliable in the industry, ideal for industrial applications. Maxim's transceivers will survive overvoltages caused by shorted power and signal lines, wiring errors, improper plug connections, faulty cables, and misuse.

Tolerance of receivers to undefined line conditions

An important characteristic of the RS-485 interface microcircuits is the immunity of receivers to undefined line states, which guarantees the setting of a high logic level at the receiver output when the inputs are open or closed, as well as when all transmitters connected to the line go into inactive mode (high-impedance state of the outputs). The problem of correct perception by the receiver of closed data line signals is solved by shifting the input signal thresholds to negative voltages of -50 and -200 mV. If the input differential voltage of the receiver V A - V B is greater than or equal to -50 mV, the output R 0 is set to a high level. If V A - V B is less than or equal to -200 mV, the output R 0 is set to a low level. When all transmitters go to an inactive state and there is a termination on the line, the differential input voltage of the receiver is close to zero, as a result of which the output of the receiver goes high. In this case, the margin of noise immunity at the input is 50 mV. Unlike previous generation transceivers, the -50 and -200 mV thresholds correspond to the ± 200 mV values ​​set by the EIA / TIA-485 standard.

Hot swappable

Literature

  1. Application note 4491, “Damage from a Lightning Bolt or a Spark – It Depends on How Tall You Are!”;
  2. Application note 5260, “Design Considerations for a Harsh Industrial Environment”;
  3. Application note 639, "Maxim Leads the Way in ESD Protection".

INTERFACE RS-485: DESCRIPTION AND CONNECTION

OOO NovoSoft

RS-485 is the number of the standard first adopted by the Electronic Industries Association (EIA). This standard is now called TIA / EIA-485 Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems (Electrical characteristics transmitters and receivers used in balanced digital multipoint systems).

Among the people RS-485 is the name of a popular interface used in industrial control systems to connect controllers and other equipment. The main difference between RS-485 and also widespread RS-232 is the ability to combine multiple devices.

Description of the RS-485 interface

RS-485 interface provides data exchange between several devices one by one two-wire line communication in half duplex mode. It is widely used in industry to create process control systems.

Speed ​​and range

RS-485 provides data transfer rates up to 10 Mbps. The maximum range depends on the speed: at a speed of 10 Mbit / s, the maximum line length is 120 m, at a speed of 100 kbit / s - 1200 m.

Number of connected devices

The number of devices connected to one interface line depends on the type of transceivers used in the device. One transmitter is designed to control 32 standard receivers. Receivers with input impedance 1/2, 1/4, 1/8 of the standard are available. When using such receivers, the total number of devices can be increased, respectively: 64, 128 or 256.

Protocols and connectors

The standard does not standardize the format of information frames and the exchange protocol. Most often, the same frames are used to transfer data bytes as in the RS-232 interface: start bit, data bits, parity bit (if necessary), stop bit.

The exchange protocols in most systems work according to the "master" - "slave" principle. One device on the trunk is the master and initiates the exchange by sending requests to the slaves, which differ in logical addresses. One of the popular protocols is the Modbus RTU protocol.

The type of connectors and wiring are also not specified by the standard. There are DB9 connectors, terminal connectors, etc.

Connection

Connection diagram

The figure shows the local network based on the RS-485 interface, combining several transceivers.

When connecting, you must correctly connect the signal circuits, usually called A and B. The polarity reversal is not terrible, but the device will not work.

  • The best signal transmission medium is cable based twisted pair.
  • Cable ends must be plugged terminal resistors(usually 120 ohms).
  • The network must be laid according to the bus topology, without branches.
  • Devices should be connected to the cable with wires minimum length.

Agreement

Terminating resistors ensure that the open end of the cable is matched to the rest of the line, eliminating signal reflections.

The nominal resistance of the resistors corresponds to the characteristic impedance of the cable, and for twisted pair cables it is usually 100 - 120 ohms. For example, the ubiquitous UTP-5 cable used for Ethernet routing has an impedance of 100 ohms. Special cables for RS-485 Belden 9841… 9844 - 120 Ohm. Different cable types may require different ratings.

Resistors can be soldered to the pins of the cable connectors at the end devices. Sometimes resistors are mounted in the device itself and a jumper must be installed to connect the resistor. In this case, when the device is disconnected, the line is mismatched, and for normal operation of the rest of the system, a matching plug must be connected.

Signal levels

The RS-485 interface uses a balanced (differential) signal transmission scheme. This means that the voltage levels on signal circuits A and B are changing in antiphase, as shown in the figure below:

The transmitter should provide a signal level of 1.5 V at maximum load (32 standard inputs and 2 terminal resistors) and no more than 6 V at no load. Voltage levels are measured differentially, one signal wire relative to the other.

On the side of the RS-485 receiver, the minimum level of the received signal must be at least 200 mV.

Oscillogram of real exchange

Below is an oscillogram of the real exchange (request and the beginning of the response) during the exchange of two VARICONT controllers via the RS-485 interface (circuit A relative to circuit B). On the oscillogram, numbers indicate some key points:

  1. Turn on the transmitter of the master controller. There was a pause after switching on.
  2. Start of data transfer - start bit of the first frame (frames are similar to RS-232 frames: start bit, data bits, parity bit, stop bit).
  3. Completion of data transfer - stop bit of the last frame.
  4. Turn off the transmitter.
  5. Turns on the transmitter of the slave controller.

Offset

As you can see in the oscillogram above, there is a small offset on the signal circuits in the absence of a signal. This offset is intended to protect receivers from false alarms.

It is recommended to create an offset of slightly more than 200 mV (zone of invalid input signal according to the standard). In this case, circuit A is "pulled" to the positive pole of the source, and circuit B - to the "common" one. One of the variants of the bias chain implementation is shown below:

Resistor ratings are calculated based on the required bias and power supply voltage. For example, we want to get a bias of 250 mV with terminal resistors RT = 120 Ohm and a source voltage of 12 V. Considering that 2 terminal resistors are connected in parallel and not taking into account the load from the receivers, we get a bias current I = U / R = 0.250 V / 60 Ohm = 0.0042 A. Total resistance of the bias circuit R = U / I = 12 V / 0.0042 A = 2857 Ohm. We get Rcm = (2857 - 60) / 2 ~ = 1400 Ohm. We select the closest denomination - 1.3 or 1.5 kOhm.

For example, we use 1.5 kOhm resistors for bias and an external 12-volt, galvanically isolated output of the VARIKONT controller power supply, which is the leading one in its network segment.

Other biasing options are possible, for example, a distributed circuit with large resistors at each node. When placing the bias nets, it should be taken into account that the node providing the bias can be turned off or completely removed from the network.

When using transceivers with galvanic isolation (type MAX1480), a galvanically isolated power supply should also be used, otherwise there will be no benefit from expensive transceivers.

In the presence of an offset, the idle potential of circuit A is positive relative to circuit B, which can serve as a guide when connecting a new device to the cable with unmarked wires.

Distortion due to incorrect network wiring

Compliance with the above recommendations will ensure the normal transmission of electrical signals to any point in the network based on the RS-485 interface. If at least one of the requirements is not met, the signal is distorted. For example, here are the oscillograms of the signal taken at the point of connection of the receiver, located 15 meters from the transmitter and 30 meters from the end of the line, with the terminating resistor turned on and off:

The following oscillogram shows the signal distortion that occurs when connected to the main terminated cable with a long 3-meter tap:

The presented oscillograms are typical for high exchange rates (1 Mbit / s and higher). However, even at lower speeds, these recommendations should not be neglected, even if "it works anyway."

When programming applications for controllers using the RS-485 interface for communication, several points should be taken into account:

  • Before starting the delivery of the parcel, you must turn on the transmitter. Although some sources claim that transmission can be started immediately after power-up, we recommend that you wait for one frame or longer (including start and stop bits). In this case, the correct receive program has time to detect transient errors, normalize and prepare to receive the first byte of data.
  • After the last data byte has been issued, you should also wait before turning off the RS-485 transmitter. This is because a serial port controller usually has two registers: a parallel input for receiving data and a shift output for serial output. The controller generates a transfer interrupt when the input register is empty, when the data has already been laid out in the shift register, but not yet issued! Therefore, a pause must be made from the moment of interruption until the transmitter is turned off. The approximate duration of the pause is 0.5 bits longer than the frame; for an accurate calculation, you should carefully study the documentation for the serial port controller.
  • ,. You can follow the replies to this entry via. You can either from your site.

In modern technology, the exchange of information between various devices... And for this, it is required to transmit data both over short distances and over significant ones, on the order of kilometers. One of these types of data transmission is communication between devices via the RS-485 interface.

Where it is necessary to transfer data via RS 485.

One of the most common examples of using devices for data exchange is. Electricity meters, united into a single network, are dispersed among cabinets, cells switchgears and even substations located at a considerable distance from each other. In this case, the interface is used to send data from one or more metering devices.

The system "one meter - one modem" is being actively implemented to transfer data to the services of energy sales companies from metering centers of private houses, small enterprises.

Another example: receiving data from microprocessor relay protection terminals in real time, as well as centralized access to them for the purpose of making changes. For this, the terminals are tied through the communication interface in the same way, and the data from it goes to the computer installed by the dispatcher. In the event of a protection actuation, the operating personnel have the opportunity to immediately receive information about the place of action and the nature of the damage to the power circuits.

But the most difficult task solved by communication interfaces is the systems of centralized control of complex production processes - APCS. The operator of an industrial plant has a computer on the table, on the display of which he sees Current state process: temperatures, productivity, units turned on and off, their operating mode. And it has the ability to manage all this with a light click of the mouse.

The computer, on the other hand, exchanges data with controllers - devices that convert commands from sensors into a language that the machine can understand, and the reverse transformation: from the language of the machine into control commands. Communication with the controller, as well as between different controllers, is carried out via communication interfaces.


The RS-232 interface is the little brother of RS 485.

One cannot at least briefly mention the RS-232 interface, which is also called serial. Some laptops have a connector for the corresponding port, and some digital devices (the same relay protection terminals) are equipped with outputs for communication using RS-232.

In order to exchange information, you need to be able to transmit and receive it. For this we have a transmitter and a signal receiver. They are included in every device. Moreover, the output of the transmitter of one device (TX) is connected to the input of the receiver of another device (RX). And, accordingly, the signal moves in the opposite direction along the other conductor in a similar way.

This provides a half-duplex communication mode, that is, the receiver and transmitter can work simultaneously. Data on the RS-232 cable can move in one direction and the other at the same time.

The disadvantage of this interface is its low noise immunity. This is due to the fact that the signal to the connecting cable for both reception and transmission is formed relative to the common wire - ground. Any interference, even in a shielded cable, can lead to communication failure, loss of individual bits of information. And this is unacceptable when managing complex and expensive mechanisms, where any mistake is an accident, and a loss of communication is a long downtime.

Therefore, it is mainly used for small temporary connections of a laptop to a digital device, for example, for setting up an initial configuration or correcting errors.


Organization of the RS-485 interface.

The main difference between RS-458 and RS-232 is that all receivers and transmitters operate on one pair of wires, which is a communication line. In this case, the ground wire is not used, and the signal in the line is formed by a differential method. It is transmitted simultaneously over two wires ("A" and "B") in reverse form.

If the output of the transmitter is a logical "0", then a zero potential is given to the conductor "A". On the "B" conductor, a "not 0" signal is generated, that is - "1". If the transmitter broadcasts "1", the opposite is true.

As a result, we get a change in the signal voltage between the two wires, which are twisted pair. Any interference entering the cable changes the voltage relative to ground equally on both wires of the pair. But the voltage of the useful signal is formed between the wires, and therefore does not suffer at all from the potentials on them.

The order of data exchange between devices via RS-485.

All devices connected by the RS-485 interface have only two terminals: "A" and "B". To connect to common network these terminals are connected in parallel. For this, a chain of cables is laid from one device to another.

In this case, it becomes necessary to streamline the exchange of data between devices, setting the sequence of transmission and reception, as well as the format of the transmitted data. This is done with a special instruction called a protocol.

There are many RS-485 communication protocols, the most commonly used one is Modbas. Let's briefly consider how the simplest protocol works, and what other problems have to be solved with its help.

For example, let's take a look at a network in which one device collects data from multiple data sources. It can be a modem and a group of electricity meters. In order to know from which counter the data will go, each transceiver is assigned a number that is unique for the given network. The number is also assigned to the modem's transceiver.

When it's time to collect data on power consumption, the modem generates a request. First, a start pulse is transmitted, according to which all devices understand that a code word will come now - a message from a sequence of zeros and ones. In it, the first bits will correspond to the subscriber's number in the network, the rest will be data, for example, a command to transmit the required information.

All devices receive the message and compare the called subscriber number with their own. If they match, the command sent as part of the request is executed. If not, the device ignores its text and does nothing.

At the same time, in many protocols, a confirmation is sent back that the command is accepted for execution or executed. If there is no answer, the transmitting device can repeat the request a certain number of times. If there is no reaction, information about an error is generated related to a malfunction of the communication channel with the silent subscriber.

The answer may not follow, not only in the event of a breakdown. In the presence of strong interference in the communication channel, which nevertheless penetrates there, the teams may not reach their destination. They are also distorted and not recognized correctly.

Incorrect execution of the command cannot be allowed, therefore, deliberately redundant information is introduced into these parcels - a checksum. It is calculated according to a certain law prescribed in the protocol on the transmitting side. At the reception, the checksum is calculated according to the same principle and compared with the transmitted one. If they match, the reception is considered successful and the command is executed. If not, the device sends an error message to the transmitting side.

Requirements for cable connections.

Twisted-pair cables are used to connect devices with the RS-485 interface. Although one pair of wires is enough to transmit this data, cables with at least two are usually used to provide a reserve.

For better protection against interference, the cables are shielded, whereby the shields along the entire line are connected to each other. For this purpose, in addition to the “A” and “B” pins, the devices to be combined have a “COM” terminal. The line is grounded only at one point, usually at the location of the controller, modem, or computer. It is forbidden to do this at two points in order to avoid interference, which will inevitably go across the screen due to the potential difference at the ground points.

Cables are connected only in series with each other, branches cannot be made. To match the line, a 120 Ohm resistor is connected at its end (this is the characteristic impedance of the cable).

Overall installation cable lines interface is a simple task. It will be much more difficult to configure the equipment, which will require people with special knowledge.

For a better understanding of the operation of the RS-485 interface, we suggest you watch the following video:


2021
maccase.ru - Android. Brands. Iron. news