First, the origin of RS-232, RS-422 and RS-485 RS-232, RS-422 and RS-485 are serial data interface standards, originally developed and published by the Electronic Industry Association (EIA), RS -232 was released in 1962 and named EIA-232-E as an industry standard to ensure compatibility between different manufacturers' products. RS-422 was developed from RS-232 and was proposed to compensate for the lack of RS-232. To improve the shortcomings of short RS-232 communication distances and low rates, RS-422 defines a balanced communication interface that increases the transmission rate to 10 Mb/s and the transmission distance to 4000 ft (at rates below 100 kb/s). It also allows up to 10 receivers to be connected on a balanced bus. RS-422 is a one-way, balanced transmission specification for single-machine transmission and multi-machine reception. It is named TIA/EIA-422-A standard. In order to expand the scope of application, EIA developed the RS-485 standard based on RS-422 in 1983, adding multi-point, two-way communication capability, that is, allowing multiple transmitters to connect to the same bus, and adding a transmitter. The drive capability and conflict protection features extend the bus common-mode range and are later named TIA/EIA-485-A. Since the proposed standards proposed by EIA are all prefixed with "RS", in the field of communication industry, it is still customary to prefix the above standards with RS.
The RS-232, RS-422, and RS-485 standards only specify the electrical characteristics of the interface, and do not involve connectors, cables, or protocols. On this basis, users can establish their own high-level communication protocols. Therefore, in the application of the video industry, many manufacturers have established a set of high-level communication protocols, either publicly or exclusively used by manufacturers. For example, Sony and Panasonic in the recorder manufacturers have different RS-422 control protocols for video recorders. There are more control protocols on the video server. For example, Louth and Odetis protocols are public, while ProLINK is based on Profile.
Second, RS-232 serial interface standard Currently RS-232 is the most widely used serial interface in PC and communication industry. RS-232 is defined as a single-ended standard that increases communication distance in low-rate serial communications. RS-232 adopts an unbalanced transmission method, so-called single-ended communication.
The data signal of the receiving and transmitting ends is relative to the signal ground. For example, the data sent from the DTE device is the level of pin 2 and pin 7 (signal ground) when using the DB25 connector. See Figure 1 for the definition of each pin of DB25. A typical RS-232 signal swings between positive and negative levels. When transmitting data, the transmitter driver outputs a positive level of +5 to +15V and a negative level of -5 to -15V. When there is no data transmission, the line is TTL, from the beginning of the data transmission to the end, the line level returns from the TTL level to the RS-232 level and then back to the TTL level. Typical operating levels of the receiver are +3 to +12V and -3 to -12V. Since the difference between the transmission level and the reception level is only about 2V to 3V, its common mode rejection is poor. Together with the distributed capacitance on the twisted pair, the transmission distance is up to about 15 meters and the maximum rate is 20kb/ s. RS-232 is designed for point-to-point communication (ie, using only a pair of receiving and transmitting devices) with a driver load of 3 to 7 kΩ. So RS-232 is suitable for communication between local devices. See Table 1 for their electrical parameters.
Third, RS-422 and RS-485 serial interface standard 1. Balanced transmission RS-422, RS-485 is different from RS-232. The data signal uses differential transmission, also called balanced transmission. It uses a pair of twisted pairs, one of which is defined as A and the other is defined as B. As shown in Figure 2.
Normally, the positive level between the transmit drivers A and B is +2 to +6V, which is a logic state, and the negative level is -2 to 6V, which is another logic state. There is also a signal ground C, which has an "enable" end in RS-485, which is available and not available in RS-422. The "Enable" terminal is used to control the disconnection and connection of the transmit driver and the transmission line. When the "enable" terminal is active, the transmit driver is in a high-impedance state, referred to as the "third state", ie it is the third state distinct from the logic "1" and "0".
The receiver also has a prescription opposite to the transmitting end. The receiving and transmitting ends connect AA and BB through a balanced twisted pair. When there is a level greater than +200 mV between the receiving ends AB, the positive logic level is output, which is less than -200 mV. When, a negative logic level is output. The level of the receiver receiving balance line is usually between 200mV and 6V. See Figure 3.
2. RS-422 Electrical Regulations The full name of the RS-422 standard is "Electrical Characteristics of Balanced Voltage Digital Interface Circuits" which defines the characteristics of the interface circuit. Figure 5 is a typical RS-422 four-wire interface. There is actually a signal ground, a total of 5 lines. Figure 4 shows the DB9 connector pin definitions. Since the receiver uses high input impedance and the transmission driver has a stronger driving capability than RS232, it is allowed to connect multiple receiving nodes on the same transmission line, and up to 10 nodes can be connected. That is, one master device (Master) and the rest slave devices (Salve), the slave devices cannot communicate with each other, so RS-422 supports point-to-multidirectional two-way communication. The receiver input impedance is 4k, so the maximum load capacity of the transmitter is 10 × 4k + 100Ω (terminating resistor). Since the RS-422 four-wire interface uses separate transmit and receive channels, there is no need to control the data direction. Any necessary signal exchange between devices can be done in software mode (XON/XOFF handshake) or hardware mode (a pair of separate pairs). Stranded wire) is achieved.
The RS-422 has a maximum transmission distance of 4000 feet (about 1219 meters) and a maximum transmission rate of 10 Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and it is possible to reach the maximum transmission distance below the 100 kb/s rate. The highest rate transmission is only possible at very short distances. The maximum transmission rate that can be obtained on a typical 100-meter twisted pair is only 1 Mb/s.
RS-422 requires a terminating resistor that requires a resistance equal to approximately the characteristic impedance of the transmission cable. There is no need to terminate the resistor when transmitting at the moment distance, that is, the resistor is not required to be terminated below 300 meters. The terminating resistor is connected to the farthest end of the transmission cable.
RS-422 related electrical parameters are shown in Table 1.
3. RS-485 Electrical Regulations Since RS-485 is developed from RS-422, many electrical regulations for RS-485 are similar to those of RS-422. If balanced transmission is used, it is necessary to connect the termination resistors on the transmission line. RS-485 can be used in two-wire and four-wire modes, and two-wire system can achieve true multi-point two-way communication, see Figure 6.
When using a four-wire connection, as with RS-422, only point-to-multipoint communication can be achieved, that is, there can only be one master device, and the rest are slave devices, but it is better than RS-422, regardless of the four wires. Up to 32 devices can be connected to the two-wire connection bus. See Figure 7.
RS-485 differs from RS-422 in that its common mode output voltage is different, RS-485 is between -7V and +12V, and RS-422 is between -7V and +7V, RS-485 receiver The minimum input impedance is 12k sword S-422 is 4k health; the old gorge S-485 meets all RS-422 specifications, so RS-485 drivers can be used in RS-422 networks.
See Table 1 for electrical regulations for RS-485.
Like RS-422, RS-485 has a maximum transmission distance of approximately 1219 meters and a maximum transmission rate of 10 Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and it is possible to use the longest specified cable length below 100 kb/s. The highest rate transmission is only possible at very short distances. Generally, the maximum transmission speed of a 100-meter long twisted pair is only 1 Mb/s.
RS-485 requires two terminating resistors whose resistance requirements are equal to the characteristic impedance of the transmission cable. There is no need to terminate the resistor when transmitting at the moment distance, that is, the resistor is not required to be terminated below 300 meters. The terminating resistor is connected to both ends of the transmission bus.
Fourth, RS-422 and RS-485 network installation Note that RS-422 can support 10 nodes, RS-485 supports 32 nodes, so multiple nodes constitute the network. The network topology generally adopts a terminal-matched bus type structure and does not support a ring or star network. When building a network, you should pay attention to the following points:
1. A twisted pair cable is used as the bus, and the nodes are connected in series. The length of the lead line from the bus to each node should be as short as possible so that the reflected signal in the lead line has the least influence on the bus signal. Figure 8 shows some of the common connection methods (a, c, e) and the correct connection methods (b, d, f) that are common in practical applications. Although the three network connections a, c, and e may not work properly, they may work normally at short distances and low speeds. However, as the communication distance increases or the communication rate increases, the adverse effects will become more and more serious. The signal is superimposed on the end of each branch and superimposed on the original signal, which will cause the signal quality to drop.
2. Attention should be paid to the continuity of the characteristic impedance of the bus, and the reflection of the signal occurs at the point where the impedance is discontinuous. This kind of discontinuity is easy to occur in the following cases: different sections of the bus use different cables, or too many transceivers on a certain bus are installed close together, and too long branch lines are led out to the bus.
In summary, a single, continuous signal path should be provided as the bus.
Figure 8
5. Some instructions for matching RS-422 and RS-485 transmission lines. RS-422 and RS-485 bus networks are generally matched with termination resistors. However, terminal matching can be avoided at short distances and low speeds. So under what circumstances do you have to consider matching? In theory, when sampling at the midpoint of each received data signal, the match can be ignored as long as the reflected signal decays sufficiently low at the beginning of the sampling. But this is actually difficult to grasp. There is an article in the American MAXIM company that mentions an empirical principle that can be used to determine what kind of data rate and cable length need to be matched: when the signal conversion time (rise or fall time) No more matching is possible when more than three times the time required for the electrical signal to travel unidirectionally along the bus. For example, the RS-485 interface with limited slope characteristics has a minimum rise or fall time of 250ns for the output signal of the MAX483, and a signal transmission rate of about 0.2m/ns (24AWGPVC cable) on a typical twisted pair. As long as the data rate is 250kb/s. Within the cable length of 16 meters or less, the terminal can be matched without using the MAX483 as the RS-485 interface.
Generally, the terminal matching adopts the terminating resistor method. As mentioned above, the RS-422 is connected to the resistor at the far end of the bus cable, and the RS-485 should be connected to the terminating resistor at the beginning and the end of the bus cable. The terminating resistor is typically 100Ω in the RS-422 network and 120Ω in the RS-485 network. A resistor equivalent to the characteristic impedance of a cable, since most twisted pair cables have a characteristic impedance of approximately 100 to 120 Ω. This matching method is simple and effective, but has a disadvantage. The matching resistor consumes a large amount of power, and is not suitable for a system with strict power consumption limitation.
Another way to compare power savings is RC matching, as shown in Figure 9. Using a capacitor C to block the DC component can save most of the power. However, the value of capacitor C is a difficult point, and a compromise between power consumption and matching quality is required.
There is also a matching method using a diode, as shown in FIG. Although this scheme does not achieve a true "match", it uses the clamping action of the diode to quickly weaken the reflected signal and achieve the purpose of improving the signal quality. The energy saving effect is remarkable.
6. Grounding problems of RS-422 and RS-485 The grounding of electronic systems is very important, but it is often overlooked. Improper grounding often results in an electronic system that does not work stably and even compromises system safety. The grounding of RS-422 and RS-485 transmission network is also very important, because the grounding system is unreasonable, which will affect the stability of the whole network, especially in the case of harsh working environment and long transmission distance. More strict. Otherwise, the interface damage rate is high. In many cases, when connecting RS-422 and RS-485 communication links, simply connect the "A" and "B" ends of each interface with a pair of twisted pairs. While ignoring the connection of the signal ground, this connection method works normally in many occasions, but it has buried a lot of hidden dangers for the following two reasons:
1. Common mode interference problem: As mentioned above, RS-422 and RS-485 interfaces use differential transmission mode, and do not need to detect signals relative to a reference point. The system only needs to detect the potential difference between the two lines. That's it. However, people often overlook that the transceiver has a certain common-mode voltage range, such as RS-422 common-mode voltage range is -7 ~ +7V, and RS-485 transceiver common-mode voltage range is -7 ~ +12V, only meet the above Conditions, the entire network can work properly. When the common mode voltage in the network line exceeds this range, it will affect the stability and reliability of the communication, and even damage the interface. Taking FIG. 11 as an example, when the transmitting driver A transmits data to the receiver B, the output common mode voltage of the transmitting driver A is VOS. Since the two systems have independent grounding systems, there is a ground potential difference VGPD. Then, the common mode voltage VCM at the receiver input will reach VCM=VOS+VGPD. Both RS-422 and RS-485 standards stipulate VOS ≤ 3V, but VGPD may have a large amplitude (ten or even tens of volts) and may be accompanied by strong interference signals, causing the receiver common mode input VCM to exceed the normal range. And generate interference current on the transmission line, which affects normal communication and damages the communication interface circuit.
Figure 11
2. (EMI) problem: the common mode part of the transmit driver output signal needs a return path. If there is no low-resistance return channel (signal ground), it will return to the source end in the form of radiation. The whole bus will be like a huge one. The antenna radiates electromagnetic waves outward.
For the above reasons, although RS-422 and RS-485 use differential balanced transmission, there must be a low-resistance signal ground for the entire RS-422 or RS-485 network. A low-resistance signal ground connects the working grounds of the two interfaces, causing the common-mode interference voltage VGPD to be short-circuited. This signal ground can be an additional line (unshielded twisted pair) or a shielded shielded pair. This is the most common method of grounding.
It is worth noting that this method is only effective for high-impedance common-mode interference. Because the internal resistance of the interference source is large, a large ground loop current will not be formed after short-circuiting, which will not have a great impact on communication. When the internal resistance of the common mode interference source is low, a large loop current is formed on the ground line, which affects normal communication. The author believes that the following three measures can be taken:
(1) If the internal resistance of the interference source is not very small, a current limiting resistor can be added to the ground line to limit the interference current. An increase in the grounding resistance may increase the common mode voltage, but normal communication will not be affected as long as the control is within the proper range.
(2) Use floating technology to cut off the ground loop. This is a more common and very effective method. When the internal resistance of the common mode interference is small, the above method can not be effective. In this case, it is considered to float the node that introduces interference (such as a field device in a harsh working environment). That is, the circuit ground of the system is isolated from the casing or the ground. This cuts off the ground loop and does not form a large loop current.
(3) Adopt an isolation interface. In some cases, for safety or other considerations, the circuit ground must be connected to the chassis or the ground and cannot be suspended. In this case, an isolated interface can be used to isolate the ground loop, but there should still be a ground wire to isolate the common side of the ground. Connected to the work site of other interfaces. See Figure 12.
Figure 12
VII. RS-422 and RS-485 network failure protection Both the RS-422 and RS-485 standards stipulate that the receiver threshold is ±200mV. This specification can provide a relatively high noise suppression capability. As described above, when the receiver A level is higher than the B level by +200 mV, the output is positive logic, and vice versa, the output is negative logic. However, due to the existence of the third state, after the host sends a message data at the originating end, the bus is placed in the third state, that is, when the bus is idle, there is no signal to drive the bus, so that the voltage between AB is between -200 and +200 mV. Until it reaches 0V, this poses a problem: the receiver output state is uncertain. If the output of the receiver is 0V, the slave in the network will interpret it as a new start bit and try to read the subsequent byte. Since there will never be a stop bit, a frame error result will be generated and no device request will be made. The bus is in a state of paralysis. This is also the case when an open circuit or a short circuit occurs, except that the bus idle described above causes a two-wire voltage difference of less than 200 mV. Therefore, certain measures should be taken to prevent the receiver from being in an indeterminate state.
Figure 13
Usually biased on the bus, when the bus is idle or open, the bias resistor is used to bias the bus to a certain state (differential voltage ≥ -200mV). As shown in Figure 13. Pull A up to ground, B pulls down to 5V, and the typical value of the resistor is 1kΩ. The specific value varies with the capacitance of the cable.
The above method is a more classic method, but it still can not solve the problem of bus short circuit. Some manufacturers can remove the receiving threshold to -200mV/-50mV, which can solve this problem. For example, Maxim's MAX3080 series RS-485 interface not only eliminates external bias resistors, but also solves the problem of fail-safe protection in the event of a bus short.
VIII. Transient Protection of RS-422 and RS-485 The signal grounding measures mentioned above have protection only for low-frequency common-mode interference, and there is no power for high-frequency transient interference. Since the transmission line is equivalent to an inductor for high-frequency signals, the ground line is actually equivalent to an open circuit for high-frequency transient interference. Although such transient interference is short-lived, there may be hundreds of thousands of volts.
There is still the possibility of high-frequency transient interference in the actual application environment. Generally, high-frequency transient disturbances are generated during switching of high-power inductive loads such as motors, transformers, relays, etc., or lightning. If not properly protected, RS-422 or RS-485 communication interfaces may be damaged. This transient interference can be protected by isolation or bypass.
1. Isolation protection method. This scheme actually transfers the transient high voltage to the electrical isolation layer in the isolation interface. Due to the high insulation resistance of the isolation layer, no damaging surge current is generated, which serves to protect the interface. Usually high-frequency transformers, optocouplers and other components are used to achieve electrical isolation of the interface. Existing device manufacturers integrate all of these components into one IC, which is very easy to use, such as Maxim's MAX1480/MAX1490, with an isolation voltage of 2500V. The advantage of this scheme is that it can withstand high-voltage, long-lasting transient interference, and it is easy to implement. The disadvantage is higher cost.
2. Bypass protection method. This scheme uses transient suppression components (such as TVS, MOV, gas discharge tubes, etc.) to bypass hazardous transient energy to the earth. The advantage is lower cost. The disadvantage is limited protection and can only protect within a certain energy. Transient interference, the duration can not be very long, and the need to have a good channel to connect to the earth, it is more difficult to achieve. In practical application, the above two schemes are combined and used flexibly, as shown in Fig. 14. In this approach, the isolated interface isolates large transients and the bypass component protects the isolated interface from excessive transient voltage breakdown.
Various Puffs Vape Pen,Puff Vape Pen,Disposable Vapes,Vape Fume 2500
Lensen Electronics Co., Ltd , https://www.lensenvape.com