For business cooperation, please contact QQ: 3350579506
For more exciting consultations, please follow Electrician 365(diangong365)
Electrician Home QQ Group: Group ①: 468193845
Group ②: 522898769
1. What is the RS-485 Interface? How Does It Compare to RS-232-C?
Answer: Since the RS-232-C interface standard was introduced earlier, it inevitably has some shortcomings, mainly four points:
The signal voltage levels of the interface are relatively high, which may damage the chips in the interface circuit. Moreover, due to incompatibility with TTL levels, a level conversion circuit is required to connect to TTL circuits.
The transmission rate is relatively low, with a baud rate of 20Kbps during asynchronous transmission.
The interface uses one signal line and one return signal line, forming a common ground transmission format. This common ground transmission is prone to common mode interference, making it weak against noise interference.
The transmission distance is limited, with a maximum standard transmission distance of 50 feet; in practice, it can only be used for about 50 meters. To address the shortcomings of RS-232-C, new interface standards have continuously emerged, with RS-485 being one of them.
It has the following characteristics:
1) RS-485’s electrical characteristics: Logic “1” is represented by a voltage difference of + (2-6)V between the two wires; Logic “0” is represented by a voltage difference of – (2-6)V between the two wires. The signal voltage levels of this interface are lower than those of RS-232-C, making it less likely to damage the interface circuit chips, and this level is compatible with TTL levels, allowing for easy connection to TTL circuits.
2) The maximum data transmission rate of RS-485 is 10Mbps.
3) The RS-485 interface uses a combination of balanced drivers and differential receivers, enhancing common mode rejection capability, thus having good resistance to noise interference.
4) The maximum standard transmission distance of the RS-485 interface is 4000 feet, practically reaching 3000 meters. Additionally, the RS-232-C interface only allows for one transceiver to be connected on the bus, meaning single-station capability. In contrast, the RS-485 interface allows for the connection of up to 128 transceivers on the bus, providing multi-station capability, enabling users to easily establish a device network using a single RS-485 interface.
5) Due to the advantages of good noise resistance, long transmission distance, and multi-station capability, the RS-485 interface has become the preferred serial interface.
Since the RS-485 interface forms a half-duplex network, generally only two wires are needed, so RS-485 interfaces use shielded twisted pair cables for transmission. The RS-485 connectors use a DB-9 9-pin plug and socket, connecting to the RS-485 interface of the intelligent terminal with a DB-9 (hole), and the keyboard connection uses a DB-9 (pin).
2. RS-422 and RS-485 Serial Interface Standards
1. Balanced Transmission
Unlike RS-232, RS-422 and RS-485 use differential transmission methods for data signals, also known as balanced transmission. They use a pair of twisted wires, defining one wire as A and the other as B.
Typically, the positive voltage between the sending drivers A and B is +2 to +6V, representing one logic state, while the negative voltage is -2 to 6V, representing another logic state. There is also a signal ground C; in RS-485, there is an “enable” terminal, which is optional in RS-422. The “enable” terminal is used to control the connection and disconnection of the sending driver to the transmission line. When the “enable” terminal is active, the sending driver is in a high-impedance state, known as the “third state,” which is different from logic “1” and “0.” The receiver is also defined relative to the sender, with the receiving and sending ends connected through the balanced twisted pair so that AA corresponds to BB. When there is a voltage greater than +200mV between the receiving ends AB, it outputs a positive logic level, and when it is less than -200mV, it outputs a negative logic level. The receiver usually receives voltage levels on the balanced line ranging from 200mV to 6V.
2. Electrical Specifications of RS-422
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 2 shows a typical RS-422 four-wire interface. In fact, there is also a signal ground wire, making a total of five wires. Figure 1 defines the pin connections of its DB9 connector.
Since the receiver uses high input impedance and the sending driver has stronger driving capabilities than RS-232, multiple receiving nodes can be connected on the same transmission line, allowing for a maximum of 10 nodes. This means one master device and the rest are slave devices, which cannot communicate with each other; thus, RS-422 supports point-to-multipoint bidirectional communication. The input impedance of the receiver is 4k, so the maximum load capacity of the sender is 10×4k+100Ω (termination resistance).
The RS-422 four-wire interface does not need to control data direction due to the use of separate sending and receiving channels, allowing any necessary signal exchange between devices to be achieved through software (XON/XOFF handshake) or hardware (a pair of separate twisted wires).
The maximum transmission distance of RS-422 is 4000 feet (approximately 1219 meters), and the maximum transmission rate is 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate; the maximum transmission distance can only be achieved at rates below 100kb/s. The highest transmission rate can only be achieved over very short distances. Generally, the maximum transmission rate on a 100-meter long twisted pair is only 1Mb/s.
RS-422 requires a termination resistor, with a resistance value approximately equal to the characteristic impedance of the transmission cable. At medium distance transmission, termination resistors may not be needed, typically not required below 300 meters. Termination resistors are connected at the farthest end of the transmission cable.
3. Electrical Specifications of RS-485
Since RS-485 is developed based on RS-422, many of its electrical specifications are similar to those of RS-422. Both use balanced transmission methods and require termination resistors to be connected on the transmission line. RS-485 can use both two-wire and four-wire methods, with the two-wire method achieving true multipoint bidirectional communication.
When using a four-wire connection, it can only achieve point-to-multipoint communication like RS-422, meaning there can only be one master device and the rest are slaves. However, it has improved; regardless of whether a four-wire or two-wire connection is used, up to 32 devices can be connected on the bus. The common mode output voltage of RS-485 differs from that of RS-422; RS-485 is between -7V and +12V, while RS-422 is between -7V and +7V. The minimum input impedance of the RS-485 receiver is 12k, while RS-422 is 4k. RS-485 meets all RS-422 specifications, so RS-485 drivers can be used in RS-422 networks. Like RS-422, the maximum transmission distance of RS-485 is approximately 1219 meters, with a maximum transmission rate of 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate; the maximum cable length can only be used at rates below 100kb/s. The highest transmission rate can only be achieved over very short distances. Generally, the maximum transmission rate on a 100-meter long twisted pair is only 1Mb/s. RS-485 requires two termination resistors, with resistance values equal to the characteristic impedance of the transmission cable. At medium distance transmission, termination resistors may not be needed, typically not required below 300 meters. Termination resistors are connected at both ends of the transmission bus.
4. Key Points for Network Installation of RS-422 and RS-485
RS-422 supports 10 nodes, while RS-485 supports 32 nodes, thus forming a multi-node network. The network topology generally adopts a terminal-matched bus structure, not supporting ring or star networks. When constructing the network, the following points should be noted:
1. Use a twisted pair cable as the bus to connect each node in series. The lead length from the bus to each node should be as short as possible to minimize the impact of reflected signals in the lead on the bus signal.
2. Pay attention to the continuity of the bus characteristic impedance; signal reflections will occur at points of impedance discontinuity. The following situations are prone to such discontinuities: different cable types used in different segments of the bus, too many transceivers installed closely together on a segment of the bus, or excessively long branch lines leading to the bus.
In short, a single, continuous signal channel should be provided as the bus.
5. Some Explanations on Matching Transmission Lines for RS-422 and RS-485
Termination resistors are generally required for matching RS-422 and RS-485 bus networks. However, for short distances and low speeds, termination matching may not need to be considered.
So, under what circumstances can matching be disregarded? Theoretically, when sampling at the midpoint of each receiving data signal, as long as the reflected signal decays sufficiently low before sampling begins, matching can be ignored.
However, this is practically difficult to grasp. An article from MAXIM in the USA mentions an empirical principle that can be used to judge under what data rates and cable lengths matching is needed: when the signal transition time (rise or fall time) exceeds three times the time required for the signal to travel unidirectionally along the bus, matching can be disregarded.
For example, the RS-485 interface MAX483 has a minimum rise or fall time of 250ns, while the typical transmission rate on twisted pairs is about 0.2m/ns (24AWG PVC cable). Thus, if the data rate is within 250kb/s and the cable length does not exceed 16 meters, using the MAX483 as the RS-485 interface allows for no terminal matching.
Generally, terminal matching uses termination resistor methods, as previously mentioned; RS-422 connects the termination resistor at the far end of the bus cable, while RS-485 should connect termination resistors at both the start and end of the bus cable. The termination resistance is generally about 100Ω in RS-422 networks and 120Ω in RS-485 networks.
This is equivalent to the resistance of the cable’s characteristic impedance because most twisted pair cables have a characteristic impedance of about 100-120Ω. This matching method is simple and effective, but has a disadvantage: the matching resistor consumes considerable power, making it unsuitable for systems with strict power consumption limits. Another more power-saving matching method is RC matching. Using a capacitor C to block the DC component can save most of the power. However, selecting the value of capacitor C is challenging, requiring a compromise between power consumption and matching quality.
Another matching method using diodes is also available. Although this scheme does not achieve true “matching,” it can quickly weaken reflected signals using the clamping effect of diodes, thus improving signal quality. The energy-saving effect is significant.
6. Grounding Issues with RS-422 and RS-485
Grounding in electronic systems is very important but often overlooked. Improper grounding can lead to unstable operation of electronic systems or even jeopardize system safety.
Grounding in RS-422 and RS-485 transmission networks is also crucial, as an unreasonable grounding system can affect the stability of the entire network, especially in harsh working environments and over long transmission distances, where grounding requirements are stricter.
Otherwise, the interface damage rate will be high. In many cases, when connecting RS-422 and RS-485 communication links, a simple pair of twisted wires is used to connect the “A” and “B” ends of each interface, neglecting the connection of the signal ground. This connection method may work normally in many situations but poses significant hidden dangers for two reasons:
1. Common mode interference issue: As mentioned earlier, both RS-422 and RS-485 interfaces use differential methods to transmit signals and do not require detection relative to a reference point. The system only needs to detect the potential difference between the two wires.
However, people often overlook that transceivers have a certain common mode voltage range, with RS-422’s common mode voltage range being -7 to +7V, while RS-485’s common mode voltage range is -7 to +12V. Only by meeting these conditions can the entire network function correctly.
When the common mode voltage in the network line exceeds this range, it can affect the stability and reliability of communication, potentially damaging the interface. For example, when sending driver A sends data to receiver B, the output common mode voltage of sending driver A is VOS. Since the two systems have their own independent grounding systems, there is a ground potential difference VGPD. Therefore, the common mode voltage at the receiver input can reach VCM = VOS + VGPD.
Both RS-422 and RS-485 standards stipulate that VOS ≤ 3V, but VGPD can vary widely (dozens of volts), possibly accompanied by strong interference signals, causing the common mode input VCM at the receiver to exceed the normal range and generate interference currents on the transmission line, which may affect normal communication or even damage the communication interface circuit. 2. (EMI) issue: The common mode part of the output signal from the sending driver requires a return path; without a low-resistance return path (signal ground), it will return to the source in the form of radiation, making the entire bus act like a large antenna radiating electromagnetic waves. For the reasons mentioned above, even though RS-422 and RS-485 use differential balanced transmission methods, a low-resistance signal ground must be present for the entire RS-422 or RS-485 network. A low-resistance signal ground connects the working grounds of the two interfaces, short-circuiting the common mode interference voltage VGPD. This signal ground can be an additional line (non-shielded twisted pair) or the shield layer of a shielded twisted pair. This is the most common grounding method. It is worth noting that this approach is only effective for high-resistance common mode interference; since the internal resistance of the interference source is large, short-circuiting will not generate significant grounding loop current, thus not affecting communication. When the internal resistance of the common mode interference source is low, significant loop current may form on the grounding line, affecting normal communication. The author believes that the following three measures can be taken:
(1) If the resistance of the interference source is not very small, a current-limiting resistor can be added to the grounding line to limit the interference current. Increasing the grounding resistance may raise the common mode voltage, but as long as it is controlled within an appropriate range, it will not affect normal communication.
(2) Use floating ground technology to isolate grounding loops. This is a common and effective method. When the internal resistance of the common mode interference is very small and the above methods fail, one can consider floating the nodes introducing interference (for example, field devices in harsh working environments), isolating the system’s circuit ground from the chassis or ground, thus breaking the grounding loop and preventing large loop currents from forming.
(3) Use isolation interfaces. In some cases, for safety or other reasons, the circuit ground must be connected to the chassis or ground and cannot float. In this case, isolation interfaces can be used to break the grounding loop, but there should still be a ground wire connecting the common terminal on the isolated side with the working ground of other interfaces.
7. Network Failure Protection for RS-422 and RS-485
Both RS-422 and RS-485 standards specify a receiver threshold of ±200mV. This specification provides relatively high noise suppression capability. As mentioned earlier, when the voltage level of receiver A is more than +200mV higher than that of receiver B, the output is positive logic; conversely, it outputs negative logic.
However, due to the existence of the third state, when the host finishes sending a piece of information data, the bus is set to the third state, meaning that no signal drives the bus when it is idle, causing the voltage between A and B to drop to -200 to +200mV until it approaches 0V, leading to an issue where the output state of the receiver is uncertain.
If the output of the receiver is 0V, the slave in the network will interpret this as a new start bit and attempt to read subsequent bytes. Since there will never be a stop bit, a frame error will occur, and no devices will request the bus, causing the network to be paralyzed.
In addition to the mentioned condition where the bus is idle causing the voltage difference between the two wires to drop below 200mV, open or short circuits can also cause this situation. Therefore, certain measures should be taken to prevent the receiver from being in an uncertain state.
Typically, a bias is added to the bus; when the bus is idle or open, bias resistors will bias the bus to a defined state (differential voltage ≥ -200mV). As shown in Figure 1, A is pulled to ground, and B is pulled down to 5V, with typical resistor values being 1kΩ, varying with the capacitance of the cable.
The above method is a classic approach, but it still cannot solve the problem of bus short circuits. Some manufacturers have moved the receiver threshold to -200mV/-50mV to resolve this issue.
8. Transient Protection for RS-422 and RS-485
The signal grounding measures mentioned earlier only protect against low-frequency common mode interference and are ineffective against high-frequency transient interference. Since transmission lines behave like inductors for high-frequency signals, the grounding line effectively becomes an open circuit for high-frequency transient interference. Although such transient interference lasts only a short time, it may have voltages of hundreds to thousands of volts. In practical application environments, there is still a possibility of high-frequency transient interference occurring. Generally, switching large inductive loads such as motors, transformers, relays, etc., or during lightning events generates high-amplitude transient interference. If not properly protected, it can damage the RS-422 or RS-485 communication interfaces. Protection against such transient interference can be achieved through isolation or bypass methods.
1. Isolation Protection Method
This scheme effectively transfers transient high voltages to the isolation layer of the isolation interface. Due to the high insulation resistance of the isolation layer, damaging surge currents do not occur, thus protecting the interface.
High-frequency transformers, optocouplers, and other components are typically used to achieve electrical isolation. Some device manufacturers have integrated all these components into a single IC, making it very convenient to use. The advantage of this scheme is that it can withstand high voltages and long-duration transient interference, and it is also relatively easy to implement, but it is more expensive.
2. Bypass Protection Method
This scheme uses transient suppression components (such as TVS, MOV, gas discharge tubes, etc.) to divert harmful transient energy to the ground. The advantage is low cost, but the disadvantage is limited protective capability, only protecting against transient interference within a certain energy range and for a limited duration, and it requires a good connection to the ground for effective implementation.
In practical applications, these two schemes are often combined flexibly. In this method, the isolation interface isolates significant transient interference, while the bypass components protect the isolation interface from being damaged by excessive transient voltages.
9. When Using RS-485 Interfaces, How to Consider the Length of the Transmission Cable?
Answer: When using RS485 interfaces, the maximum allowable cable length for the specific transmission line from the generator to the load is a function of the data signal transmission rate, mainly limited by signal distortion and noise.
The relationship curve between maximum cable length and signal rate shown below is derived from using 24AWG copper-core twisted telephone cable (wire diameter 0.51mm), inter-wire bypass capacitance of 52.5PF/M, and a terminal load resistance of 100 ohms. (The curve is referenced from GB11014-89 Appendix A).
As can be seen from the figure, when the data signal rate drops below 90Kbit/S, assuming a maximum allowable signal loss of 6dBV, the cable length is limited to 1200M. In practice, the curve is quite conservative, and it is entirely possible to achieve larger cable lengths in practical use.
When using cables of different wire diameters, the maximum cable length will differ. For example, when the data signal rate is 600Kbit/S, using 24AWG cable, the maximum cable length is 200m; if using 19AWG cable (wire diameter 0.91mm), the cable length can exceed 200m; if using 28AWG cable (wire diameter 0.32mm), the cable length can only be less than 200m.
10. How to Achieve RS-485/422 Multipoint Communication?
Answer: At any time on the RS-485 bus, there can only be one transmitter sending. In half-duplex mode, only one master can send. In full-duplex mode, the master station can always send, but the slave station can only send one (controlled by DE).
11. Under What Conditions Do RS-485/RS-422 Interfaces Need Terminal Matching? How to Determine the Resistance Value? How to Configure Terminal Matching Resistors?
Answer: During long line signal transmission, in general, to avoid signal reflection and echo, termination matching resistors need to be connected at the receiving end. The value of the termination matching resistor depends on the impedance characteristics of the cable and is independent of the length of the cable.
RS-485/RS-422 generally uses twisted pairs (shielded or unshielded) for connection, and the terminal resistance typically ranges between 100 to 140Ω, with a typical value of 120Ω. In practical configurations, one termination resistor is connected at each of the two terminal nodes of the cable, that is, at the nearest and farthest ends, while nodes in the middle section should not connect a termination resistor; otherwise, it will lead to communication errors.
12. If the RS-485 Network Does Not Know Which is the Farthest Station, How Should Matching Resistors Be Connected?
Answer: This situation arises when users form an RS-485 network without following the principle that the wiring from the station to the bus should be as short as possible. If the bus wiring adheres to this principle, there would be no uncertainty about which station is the farthest. Moreover, it is important to note that such wiring will result in poor system performance.
13. Why Does the RS-485/RS-422 Receiver Still Output Data When Communication Stops?
Answer: After data transmission is completed, RS-485/RS-422 requires all sending enable control signals to be turned off while keeping the receiving enable active. At this point, the bus driver enters a high-impedance state, and the receiver can monitor whether there is new communication data on the bus.
However, since the bus is in a passive driving state at this time (if there are termination resistors, the differential level between A and B lines is 0, and the receiver’s output is uncertain and very sensitive to changes in the differential signal on the AB lines; if there are no termination resistors, the bus is in a high-impedance state, and the receiver’s output is uncertain), it can easily be affected by external noise interference.
When the noise voltage exceeds the input signal threshold (typical value ±200mV), the receiver will output data, leading to invalid data being received by the corresponding UART, causing subsequent normal communication to fail; another situation may occur during the moment of turning the sending enable control on or off, which can also cause the receiver to output signals, leading to UART receiving errors.
Solutions:
1) Use the method of pulling up the in-phase input (line A) and pulling down the inverted input (line B) on the communication bus to clamp the bus, ensuring the receiver output is fixed at a “1” level;
2) Replace the interface circuit with the MAX308x series interface products, which have built-in fault tolerance;
3) Eliminate through software, i.e., add 2-5 start synchronization bytes in the communication data packet, only beginning actual data communication after satisfying the synchronization header.
14. Three Factors Affecting RS-485 Bus Communication Speed and Reliability
Signal Reflections in Communication Cables
During communication, signal reflections can occur due to two reasons: impedance discontinuity and impedance mismatch. Impedance discontinuity occurs when the signal suddenly encounters a much smaller or even zero impedance at the end of the transmission line, causing reflections at this point, as shown in Figure 1.
The principle of this signal reflection is similar to light reflecting when transitioning from one medium to another. To eliminate this reflection, a termination resistor equal to the characteristic impedance of the cable must be connected at the end of the cable to ensure continuity.
Since signals on the cable are transmitted bidirectionally, a termination resistor of the same size can be connected at the other end of the communication cable; theoretically, as long as a termination resistor matching the cable’s characteristic impedance is connected at the end of the transmission cable, signal reflections will no longer occur.
However, in practical applications, because the characteristic impedance of the transmission cable is related to the communication baud rate and other application environments, it is unlikely that the characteristic impedance will perfectly match the termination resistor, resulting in some level of signal reflection.
The other reason for signal reflections is the impedance mismatch between the data transceiver and the transmission cable. This causes reflections primarily when the communication line is idle, leading to data confusion across the entire network.
The impact of signal reflections on data transmission ultimately arises because the reflected signal triggers the comparator at the receiver input, causing the receiver to receive incorrect signals, leading to CRC validation errors or entire data frame errors. In signal analysis, the parameter used to measure the strength of reflected signals is RAF (Reflection Attenuation Factor). Its calculation formula is as follows: RAF = 20lg(Vref/Vinc) (1) where Vref is the voltage of the reflected signal; Vinc is the voltage of the incident signal at the connection point of the transceiver or termination resistor. The specific measurement method is shown in Figure 3. For example, experiments show that the peak-to-peak voltage of a 2.5MHz incident sine wave signal is +5V, and the peak-to-peak voltage of the reflected signal is +0.297V, thus the reflection attenuation factor of this communication cable at a 2.5MHz communication rate is: RAF = 20lg(0.297/2.5) = -24.52dB. To reduce the impact of reflected signals on the communication line, noise suppression and bias resistor methods are generally used. In practical applications, for relatively small reflected signals, the bias resistor method is often used for simplicity and convenience. The principle of how to improve communication reliability by adding bias resistors in communication lines will be detailed later.
15. Signal Attenuation in Communication Cables
The second factor affecting signal transmission is the attenuation of the signal during transmission through the cable. A transmission cable can be viewed as an equivalent circuit composed of distributed capacitance, distributed inductance, and resistance. The distributed capacitance C of the cable is primarily generated by the two parallel conductors of the twisted pair. The resistance of the conductors has a minimal effect on the signal and can be ignored.
Signal loss is mainly caused by the LC low-pass filter formed by the distributed capacitance and distributed inductance of the cable. The attenuation coefficients of standard LAN-type two-core inductors used in PROFIBUS (the standard cable selected by Siemens for the DP bus) at different baud rates are shown in Table 1.
16. Pure Resistive Load in Communication Cables
The third factor affecting communication performance is the size of the pure resistive load (also known as DC load). This refers to the pure resistive load primarily composed of termination resistors, bias resistors, and RS-485 transceivers. When discussing the EIARS-485 specification, it was mentioned that RS-485 drivers can output at least 1.5V differential voltage when configured with 32 nodes and a 150Ω termination resistor. The input resistance of a receiver is 12kΩ, and the equivalent circuit of the entire network is shown in Figure 5. Based on this calculation, the load capacity of the RS-485 driver is: RL = 32 input resistors in parallel || 2 termination resistors = ((12000/32)×(150/2))/((12000/32)+(150/2)) ≈ 51.7Ω. Currently, commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and the SN75176A/D used by Holley Technology, among others, some of which can achieve a load capacity of up to 20Ω. Ignoring other numerous factors, based on the relationship between driving capability and load, the maximum number of nodes that a driver can support will far exceed 32.
When the communication baud rate is relatively high, bias resistors on the line are necessary. The connection method for bias resistors is shown in Figure 6. Their role is to pull the bus voltage away from 0V when there is no data (idle mode), as shown in Figure 7.
This way, even if relatively small reflected signals or interference occur in the line, the data receivers connected to the bus will not produce false actions due to these signals. The following example illustrates how to calculate the size of the bias resistors: termination resistors Rt1=Rr2=120Ω; assuming the maximum peak-to-peak value of the reflected signal Vref≤0.3Vp-p, then the negative half-cycle voltage Vref≤0.15V; the reflected current Iref caused by the reflected signal on the termination resistor ≤0.15/(120||120)=2.5mA. The hysteresis voltage value of general RS-485 transceivers (including SN75176) is 50mV, thus:
(Ibias-Iref)×(Rt1||Rt2)≥50mV. Therefore, it can be calculated that the bias current generated by the bias resistors Ibias≥3.33mA+5V=Ibias(R上拉+R下拉+(Rt1||Rt2)) (2). From equation (2), it can be calculated that R上拉=R下拉=720Ω.
In practical applications, there are two methods for adding bias resistors to the RS-485 bus:
(1) Distributing the bias resistors evenly to each transceiver on the bus. This method adds bias resistors to each transceiver connected to the RS-485 bus, providing a bias voltage to each transceiver.
(2) Using a pair of bias resistors on one segment of the bus. This method is effective for large reflected signals or interference signals on the bus. It is worth noting that adding bias resistors increases the load on the bus.
17. The Relationship Between Load Capacity of the RS-485 Bus and the Length of Communication Cables
When designing the network configuration composed of the RS-485 bus (bus length and number of loads), three parameters should be considered: pure resistive load, signal attenuation, and noise margin. The pure resistive load and signal attenuation have been discussed earlier; now we will discuss the noise margin (Noise Margin). The noise margin for RS-485 bus receivers should be at least greater than 200mV. The previous discussions assumed a noise margin of 0. In practical applications, to improve the bus’s anti-interference capability, the system’s noise margin is generally expected to be better than stipulated in the EIARS-485 standard. The following formula shows the relationship between the number of loads on the bus and the length of communication cables: Vend=0.8(Vdriver-Vloss-Vnoise-Vbias) (3), where Vend is the signal voltage at the end of the bus, which is specified as 0.2V during standard measurements; Vdriver is the output voltage of the driver (related to the number of loads). The number of loads ranges between 5 and 35; Vdriver=2.4V; when the number of loads is less than 5, Vdriver=2.5V; when the number of loads exceeds 35, Vdriver≤2.3V; Vloss is the loss of signal during transmission in the bus (related to the specifications and length of the communication cable), which can be calculated based on the standard cable’s attenuation coefficients provided in Table 1; for a communication baud rate of 9.6kbps and cable length of 1km, Vloss=Vin-Vout=0.6V (Note: if the baud rate increases, Vloss will increase accordingly); Vnoise is the noise margin, which is specified as 0.1V during standard measurements; Vbias is the bias voltage provided by the bias resistors (typically 0.4V).
In equation (3), multiplying by 0.8 ensures that the communication cable does not enter a fully loaded state. From equation (3), it can be seen that the size of Vdriver is inversely proportional to the number of loads on the bus, while the size of Vloss is inversely proportional to the length of the bus; the other parameters are only related to the type of driver used.
Thus, once the driver for the RS-495 bus is selected, under a certain communication baud rate, the number of loads directly correlates with the maximum distance the signal can be transmitted. Specifically, within the allowable range of the bus, the more loads there are, the shorter the distance the signal can be transmitted; the fewer loads there are, the further the signal can be transmitted.
18. The Impact of Distributed Capacitance on RS-485 Bus Transmission Performance
The distributed capacitance of the cable is primarily generated by the two parallel conductors of the twisted pair. Additionally, there is distributed capacitance between the conductors and ground, although it is minimal, it should not be ignored in analysis. The impact of distributed capacitance on bus transmission performance is mainly due to the transmission of fundamental wave signals on the bus, where the signal representation has only “1” and “0”.
In special bytes, for example, 0x01, the signal “0” allows sufficient charging time for the distributed capacitance, while when the signal “1” arrives, the charge in the distributed capacitance cannot discharge in time, resulting in (Vin+)-(Vin-)- still being greater than 200mV, which causes the receiver to mistakenly identify it as “0,” ultimately leading to CRC validation errors and errors in the entire data frame transmission.
Due to the influence of distribution on the bus, data transmission errors occur, thereby degrading the performance of the entire network. There are two ways to solve this issue:
(1) Reduce the baud rate of data transmission; (2) Use cables with small distributed capacitance to improve the quality of the transmission line.
19. Definitions of Simplex, Half-Duplex, and Full-Duplex
If information can only be transmitted from one party A to another party B at any moment during the communication process, it is called simplex.
If at any moment, information can be transmitted from A to B and from B to A, but only one direction of transmission exists, it is called half-duplex transmission.
If at any moment, there is bidirectional signal transmission on the line from A to B and from B to A, it is called full-duplex. A telephone line is a two-wire full-duplex channel.
Due to the use of echo cancellation technology, bidirectional transmission signals do not become confused. Duplex channels sometimes separate the receiving and transmitting channels, using separate lines or frequency bands to transmit signals in opposite directions, such as in loopback transmission.
Popular Recommendations
S7-200–Key Knowledge Introduction
Selection of Distribution Cabinet Models and Related Drawings Explained!
Is a 1P or 2P circuit breaker better for home distribution boxes? (Should each group of neutral wires go through a circuit breaker?)?
Three Steps and Eight Techniques for Electrical Fault Repair
Latest Wire (Conductor) Connection Methods (Essential for Electricians)
40 Electrical Calculation EXCEL Sheets, Software Collection
Electricians, do you know what the standard signal for transmitters is? Eighty percent of craftsmen cannot answer.
What are the dangers of not grounding sockets at home?
Factories are always recruiting electricians, and wages have gone up, so why can’t they find suitable electricians?
Seven Common Faults and Repair Methods for Induction Cookers
All You Need to Know About Molded Case Circuit Breakers!
