Saturday, May 7, 2011

【 Weak current College 】 RS-232, 422 and 485 standard and application 】

I. RS-232, the origin of RS-422 and RS-485
RS-232, RS-422 and RS-485 are serial data interface standard, initially by the electronic industries Association (EIA) developed and published, the publication in 1962 RS-232, named EIA-232-E, as industry standards, to ensure that the different manufacturers are compatible between products. RS-422 evolved by RS-232, it is not enough to compensate for the RS-232. To improve short-232 communicate distance, rate, low defect RS-422 defines a balanced communication interface, transfer rate up to 10Mb/s, transmission distance extension to 4000 feet (rate is lower than 100kb/s), and allow a balance between the bus connection up to 10 receivers. RS-422 is a stand-alone sent, many computer receives one-way, balance transfer specification, being named the TIA/EIA-422-A standards. To extend the application range, EIA and in 1983 has developed on the basis of RS-422 RS-485 standards, increased the number of points, bidirectional communication capability, which allows more than one transmitter is connected to the same bus, at the same time increased transmitter drive capability and conflict protection characteristics, common-mode range expanded bus, named after TIA/EIA-485-A standards. Because standard EIA recommendations are prefixed by the "RS", so in the communications industry, still accustomed to the standard RS for prefix titles.
RS-232, RS-422 and standard only on interface RS-485 electrical characteristics, without involving the connectors, cables, or Protocol, users can create their own high level communication protocol. Therefore the application of the video border, many manufacturers have established a set of high-level communication protocol, or open or exclusive use of manufacturers. If the video recorder manufacturers of Sony and Panasonic on recorder RS-422 control protocol there is a difference, video server control protocol is more, such as the Louth, Odetis Protocol is open to the public, and ProLINK is basedon the Profile.
2. RS-232 serial interface standards
Currently RS-232 is between PC and communication industry's most widely used a serial interface. RS-232 is defined as a low-speed serial communications increase the communication distance of single standard. RS-232 take unbalanced transmission mode, the so-called single communication.

The beginning of the data collected, the signal is relative to the signal, e.g. from DTE device data when using the DB25 connector is 2 feet relative 7 feet (signal) level, the PIN DB25 defined see Figure 1. Typical RS-232 signals in positive and negative voltage swing, in between sending data, send-side drive output is terminated at + 5 ~ + 15V,-in-5 ~-15V-level. When no data transfer line for TTL, transfer data from start to end, line-level from the TTL level to the level of return RS-232 TTL level. Receiver typical working level in + 3 to + 12V-12V-3 ~-. Because the send level and receive the level of difference of only about 2V to 3V, their common-mode rejection differential, and twisted-pair on distributed capacitance, its transmission distance up to about 15 meters, the highest rate for 20kb/s. RS-232 is for peer to peer (that is, only one pair, receive device) communication, its drive load is 3 ~ 7 k Ω. So RS-232 suitable for communication between the local device. The electrical parameters see table 1.

III. RS-422 and RS-485 serial interface standards
1. balance transfers
RS-422, RS-485 and RS-232, data signal using differential transmission mode, also known as balance transfers, it uses one pair, is one of A line is defined as a line is defined as B, as in Figure 2.

Typically, send drive A, B are level in between + 2 to + 6V, is a logical status, negative-in-2 ~ 6V, is another logical state. Another signal to C, there are a "RS-485 enabled" side, but it is available in RS-422 may be unused. "Enable" is used to control the sending off of the drive and transmission lines and connections. When"enabled" end-to-work, sending the drive is in high-impedance state, known as the "third State", i.e. it is different from a logical "1" and "0" in the third State.
The receiver also made and sending end relative to the beginning of the collection, will be through balanced twisted pair AA and BB corresponding connected, when in the end there is greater than + AB 200mV power, output is logic level that is less than-200mV, output negative logic level. Sinks receive balanced line level range is typically between 200mV to 6V. See Figure 3.

2.RS-422 electrical requirements
The full name is "RS-422 standard balanced voltage digital interface circuit of the electrical characteristics", which defines the characteristics of the interface circuit. Figure 5 is a typical RS-422 four-wire interface. In fact there is also a signal ground, all 5 lines. Figure 4 is the DB9 connector pin definitions. Because the receiver uses the high input impedance and send drives than RS232 stronger drive capability, it allows the same transmission line to connect multiple receiving node, maximum 10 node. That is a primary (Master), the rest is from devices (Salve) from device cannot communicate, so support point-to-many RS-422 two-way communications. Receiver input impedance is 4 k, so the beginning of the maximum load capacity is 10 × 4k + 100 Ω (terminating resistor). RS-422 four line interface as a separate transmit and receive channel, so you don't have to control the data direction, each appliance must be between any exchange of signals can be set by software (XON/XOFF handshaking) or hardware (a separate twisted pair).

Most RS-422Large transmission distance to 4000 feet (1219 m) with a maximum transfer rate is 10 MB/s. Its balanced twisted pair to the length of the inversely with the transfer rate, in 100kb/s rate following, will it be possible to achieve the maximum transmission distance. Only a short distance down to get the highest transmission. Typically 100-metre-long twisted pair on the maximum transfer rate is only 1 MB/s.
RS-422 need a terminating resistor, request its resistance is about transmission characteristic impedance of the cable. At the moment distances can be without terminating resistor, which is usually in the 300 m without terminating resistors. Terminating resistor connected to the most remote transmission cable.
RS-422 for electrical parameters are shown in table 1
3.RS-485 electrical requirements
Because RS-485 is developed on the basis of from RS-422, so with many electrical RS-485 RS-422 similar. If using balanced transmission mode, all need in transmission line connecting terminating resistor, etc. RS-485 can take second-line and 4-wire, 2-wire system can achieve true multipoint two-way communication, see Figure 6.
A four-wire connection, and the like can only achieve RS-422 point-to-many communications, which can only have one primary (Master) device, the rest is from the device, but it has improved, both RS-422 four-line or second-line connection bus can be received 32 devices. Refer to Figure 7.
RS-485 and different RS-422 lies in its common-mode output voltage is different, RS-485 is-7V to + 12V,-7V RS-422 to + 7V, RS-485 sink minimum input impedance 12k sword bao Jian S-422 is 4k; old a chance Istmo shoot movement S-485 meet all specifications, so RS-422 RS-485 drive can be used in the network application in RS-422.
The provisions relating to the electrical RS-485 see table 1.
RS-485 and RS-422, its maximum transmission distance of about 1219 meters, the maximum transfer rate is 10 MB/s. Balanced twisted pair to the length of the inversely with the transfer rate, in 100kb/s rate following provisions can only be used a maximum cable length. Only a short distance down to get the highest transmission. Usually 100 metres long twisted pair maximum transfer rate is only 1 MB/s.
RS-485 need 2 terminating resistor, its resistance requirements equivalent to transfer characteristicimpedance of the cable. At the moment distances can be without terminating resistor, which is usually in the 300 m without terminating resistors. Terminating resistor connected to the ends of transfer bus.
IV. RS-422 and RS-485 network installation points
RS-422 can support 10 nodes, RS-485 support 32 nodes, so more nodes on the network. Network topologies generally use terminal bus structure that matches does not support ring or star network. In building the network, you should be aware of the following:
1. using a twisted pair cable for bus, the individual nodes concatenated together, from the bus to each node of the PIN length should be short, so that the PIN in the reflected signals influence on bus signals. Figure 8 illustrates the practical application of the common mistakes connection methods (a, c, e) and the correct connection methods (b, d, f). A, c, e three network connection although it is not correct, in short, low rate might still be working, but as the communication distance of extended or communication rate increases, its adverse effects will be more and more serious, mainly because of the signal in the end of each branch and the original signal reflected, the overlay will cause signal loss of quality.
2. it should be noted that bus the characteristic impedance of continuity, the resistance is not continuous point occurs signal reflection. The following easy to produce such discontinuities: bus different sections with different cable, or a section of the bus there are too many transceivers are right next to each installation, moreover is overly long branch line leads to the bus.
In short, should provide a single, continuous signal path as the bus.

V. RS-422 and RS-485 transmission lines that match some instructions on the
On RS-422 and RS-485 bus network typically uses to match a terminating resistor. But a short distance and low rate can not consider terminator. So in what circumstances do not consider matching? theoretically, in every receiving data signal sampling point, as long as the echo signal attenuation at the start of sampling is to low enough to not consider matching. But this in fact difficult to grasp, United States MAXIM company article mentioned an empirical principles can be used to determine what data rate and the length of the cable match when needed: when signal conversion time (increase or decrease) over electrical signals along the bus one-way transmission time 3 times above can not match. For example with finite slope of 485 MAX483 output signal rise or fall time 250ns minimum, typical twisted pair signal transmission rate on about 0.2m/ns (24AWGPVC cable), then as long as the data rate in 250kb/s or less, cable length not more than 16 meters, using MAX483 as RS-485 interface can not match with the Terminal.
General Terminal matching terminating resistor method used, the previously mentioned already, the RS-422 in bus cable and distal resistor RS-485 then bus cable's start and end are required and then terminating resistors. Terminating resistors generally remove RS-422 network 100 Ω, RS-485 network took 120 Ω. Equivalent to the cable impedance of resistance, since most twisted-pair cable characteristic impedance is approximately 100 ~ 120 Ω. The match method is simple and effective, but there is one disadvantage, matching resistor to consume less power, power consumption limit comparison strict system does not quite fit.
Another comparison saving match is a match, RC in Figure 9. Use a capacitor C partition DC components can save most of the power. But the capacitor C's takeValues is a difficult, you need to match the power and quality tradeoff between.
There is a diode matching method, as in Figure 10. This scenario was not true of the "match", but it uses the role of the clamp diode can quickly undermine the reflected signals, to achieve the aim of improving the quality of the signal. Significant energy saving effects.

6. RS-422 and grounding problems RS-485
Electronic system grounding is important but often overlooked. Improper grounding treatment often leads to electronic systems are not stable work even endanger the system security. RS-422 and RS-485 transmission network of ground is also a very important, because the ground system is not reasonably affect the stability of the entire network, especially in the working environment more harsh and transmission distance, the requirements for the grounding. Otherwise interface with high failure rate. In many cases, connecting RS-422, RS-485 communication link is simply a pair each interface of the "A" and "B" end. Ignoring the signals of connection that this connection method in many occasions is working properly, but they have great trouble, which has the following two reasons:
1. common mode interference problems: as previously stated, RS-422 and RS-485 interface uses the differential for the transmission signal and does not need to be relative to a reference point to detect the signal, the system only needs to detect the difference between the two lines. But people tend to ignore the transceivers have certain common-mode voltage range, such as RS-422 common-mode voltage range is-7 to + 7V, RS-485 transceiver common-mode voltage range is from-7 to + 12V, only meet the above conditions, the entire network to work correctly. When the network cabling common mode voltage outside this range will affect communications for the stable and reliable, even damage the connector. In Figure 11, for example, when you send a drive A to B to send data to the receiver, and send the output of the drive a common-mode voltage for VOS, because the two systems have separate earthing system, there is a real potential difference VGPD. Then the receiver input common-mode voltage VCM will achieve VCM = VOS + VGPD. RS-422 and standards require RS-485 VOS ≤ 3V, but VGPD probably a significant (more than 10 volts or even dozens of volts), and may be accompanied by strong interference signal, the receiver CMR VCM beyond the normal range, and transmission line interference current, light is impacting communication, then the damage communications interface circuit.

2. (EMI) issues: send drive output signal of the common parts require a return path, in the absence of a low resistance of return channel (signal), it will return a radiation source, the entire bus and it seems like a giant antenna to radiation of electromagnetic waves.
For these reasons, although adopting RS-485 RS-422, differential balanced transmission mode, but on the whole RS-422 or RS-485 network, you must have a low resistance to the signal. A low resistance signal to two interfaces are connected with the work, so that the common mode interference voltage VGPD is short. This signal can be an additional line (unshielded twisted pair) or STP shielding layer. This is the most common grounding method.
It is worth noting that this approach only on high-effective, common mode interference due to the interference source resistance, short answer would not be formed very large ground loop current, the communication does not have a significant impact. When the common mode interference resistance is low, will be grounded on a large loop current, affect the normal traffic. In my view, you can take the following three measures:
(1) if the source of interference is not inner resistance is very small, you can add current limiting resistor Earth wire to limit the interference currents. Grounding resistance increase might cause the common-mode voltage rise, but as long as the control in the appropriate context will not affect the normal traffic.
(2) use of floating ground technology, cut off ground loops. This is more commonly used is also very effective in such a way that when the common mode interference resistance is small the above method does not work, you can consider the introduction of interference of the node (for example in a poor working environment of on-site equipment) floating up (that is the system of the circuit with the enclosure or earth isolation), partition a ground loop, will not form a large loop current.
(3) use of isolated interface. In some cases, for security or other concerns to the circuit must be connected to the enclosure or the Earth cannot be suspended, and you can isolate the interfaces to cut off ground loop, but still should have a ground wire will isolate the public side of the side and the other interface to work. See Figure 12.

VII. RS-422 and network failure protection RS-485
RS-422 and RS-485 standards provide the receiver threshold ± 200mV. Such requirements can provide higher noise suppression capability, as mentioned, when the receiver A level higher than the level B + 200mV above, the output is logical, on the other hand, the output is negative logic. But because of the existence of a third State, that is, the host in the beginning of the end of the message data, the bus on the third State, that is, the bus is idle with no signal bus, so that the voltage between AB-200 to + 200mV until tends to 0V, this poses a problem: the receiver output status is not OK. If the receiver output to 0V, network from the machine will be interpreted as a new start bit and tried to read subsequent bytes, as never have the stop bit, produce a frame error as a result, there is no longer a device requests a bus network to a standstill. In addition to the above mentioned bus idle will cause two line voltage difference below 200mV, open circuit or short circuit when they happen. It should take certain measures to avoid the receiver is in an indeterminate state.
Usually on the bus on the bias, when bus free or open-circuit, use bias resistor will bus bias in a certain State (differential voltage ≥-200mV). As in Figure 13. Will A pull-up to, B drop-down to 5V, the resistance of a typical value is 1 k Ω, specific capacitance values over cable.
The above methods is a more classical approach, but it still does not solve the problems of short bus, some manufacturers will receive threshold to-200mV/-50mV, can solve this problem. For example, Maxim company MAX3080 series RS-485 interface, not only eliminates the external bias resistors, and resolved the bus short-circuit failure protection issues.
VIII. RS-422 and transient protection RS-485
Previously mentioned signal grounding measures, only the low frequency common mode interference has a protective effect, for the high frequency interference is incapable of transient. As a result of the transmission line in relation to the high-frequency signal is the equivalent of inductance, so for high-frequency interference, grounding line transient actually equivalent to pave the way. This transient disturbances while the duration is short, but there can be hundreds or thousands of volts.
The actual application environment or the existence of high-frequency interference may be transient. General switching power inductive load such as motors, transformers, relays, etc. or lightning process generates amplitude high transient interference, if not properly protection will damage RS-422 or RS-485 communication interface. For this transient disturbances can be quarantined or bypass of protection.
1. isolation protection method. This program will actually be transient-voltage transfer to isolate interface in electrical isolation layer, because of the isolation layer high insulation resistance, will not produce damaging surge current, played the role of protection interface. Usually uses the high frequency transformers, optical coupling, and other components implement electrical isolation, device manufacturers will all these components are integrated in a chip IC, using very simple, such as Maxim company MAX1480/MAX1490, isolation voltage can be up to 2500V. This solution has the advantage that can withstand high voltage, duration longer transient disturbances, and more easily implemented, the disadvantage is the high cost.
2. bypass protection method. This scenario uses transient suppression components (such as TVS, MOV, gas discharge tubes, etc.) will be harmful to the Earth transient energy bypass, the advantage of lower cost, the disadvantage is that protection is limited, only protection of certain transient disturbances within the energy, the duration is not very long, but need to have a good connection to the Earth, it is difficult to implement. It is the practical application of these two programmes combine flexibility, as in Figure 14. In this approach, the isolation of transient disturbance substantially the interface segregation, bypass the protection of isolated interface components are not excessively high transient voltage breakdown.

No comments:

Post a Comment