Thursday, December 23, 2010
【 Weak current College 】 raise RS-485 bus reliability methods and maintenance
In the middle and long distance communication between the MCU in many scenarios, a simple hardware design RS-485, control of convenient, low cost and widely used in factory automation, industrial control, community control, water automatic logging, etc. However, RS-485 bus in anti-jamming, adaptive, communication efficiency is defective, some details of mishandled communication failures or even regular system breakdown, malfunction, RS-485 bus operating reliability is critical. 1. RS-485 interface circuit of hardware design 1, bus match bus matches there are two ways, one is combined with matching resistor, shown in Figure 1a. Located in the bus at both ends of the difference between VA and VB port should match resistor 120 Ω crossover to reduce mismatch due to reflection, absorption, noise, effectively suppresses noise interference. But matching resistor consumes large currents, does not apply to the power of ad system. Another comparison saving match programme is RC match (Figure 2) using a capacitor C partition DC component, you can save most of the power, but the value of the capacitor C is difficult, you need to match the power and quality tradeoff between. In addition to the above two, there is also a match using diode (Figure 3), which although not true match, but it uses the clamp diode, rapidly weakening reflecting signal reaching the aim of improving the quality of the signal, a significant energy saving effect. 2, RO and DI-end configuration pull-up resistor asynchronous communication data in bytes, of the transmission of one byte in each transmits, prior to adoption of a low level initiation for handshake. To prevent interference signal error triggered RO (receiver output) negative hopping, the receiving end of the entry into the receiving State, MCU recommends RO external 10 k Ω pull-up resistor. 3, to ensure that the system is electrified RS-485 chip is in receipt of input status for transceiver control-TC recommended MCU PIN through the inverter control, should not be used for direct control MCU pin, to prevent the MCU is electrified interference on the bus, as shown in Figure 4. 4. bus isolated RS-485 bus-and received-two-wire interface, once a chip failure might be bus "La death" and, therefore, on the second line of VA, between VB and bus should be quarantined. Usually in VA and VB and bus between threaded a 4 ~ 10 Ω for PTC resistor, and the crossover between the TVS diode, 5V to remove line surge. In the absence of PTC resistance and TVS diode, available ordinary resistors and voltage tube in place. 5. reasonable choice of chips for example, on an external device to prevent strong electromagnetic (lightning), it is proposed to adopt the TI 75LBC184, lightning chip, the number of nodes required more optional SIPEX's SP485R. 2. RS-485 network configuration 1, network nodes network nodes and the selected RS-485 chip driver and receiver input impedance, such as 75LBC184 nominal maximum is 64 points, SP485R nominal maximum of 400 points. The actual use, the result of cable length, diameter, network distribution, transfer rate, the actual number of nodes may not reach the theoretical value. For example, the application distribution in 75LBC184 500m RS-485 network of more than 50 on a node or a rate greater than 9.6kb/s, the noticeable decline in the reliability of work. Usually recommended nodes by RS-485 chip maximum 70% of selection, transfer rate in 1200 ~ choose between 9600b/s. Communication distance 1km, from communication efficiency, nodes, such as integrated communications from considering the selection of the best 4800b/s. Communication distance 1km above should be taken into account by increasing the relay module or reduce the rate of increase data transfer reliability. 2, nodes, and trunk distance theory, RS-485 node and the distance between the trunk (T head, also known as PIN) as short as possible. T head is smaller than the node using 10m T-type, connected to the network matching little bearing, can rest assured that use, but for node spacing is very small (less than 1m, such as the LED module combination screens) should be used in a star join, the use of t-or wire-connection is not working properly. RS-485 is a half-duplex communication bus structure, mostly used for a one-point communications system, so the host (PC) should be placed at the end, not in the middle to form the backbone of the t-distribution. III. improve communication efficiency RS-485 RS-485 is usually applied to a one-point-slave response-communication system, such as full duplex bus RS-232 low efficiency, so the selection of appropriate communication protocols and control is important. 1. bus steady control (handshake signals) most users select in the data before sending and receiving control-1ms to TC reset into high level so that the bus into stable delivery status before sending the data; the data sent to delay 1ms rear TC-end into a low level, allowing reliable send finished to receive status. According to the author to use TC-delay has four machine cycle was satisfy requirements; 2, to ensure data transmission quality, each byte checksum, should minimize features Word and check word usage of packet format by the boot code, length code, code, command, code, data, parity-check codes and code, each packet length up to 20 ~ 30 bytes. In RS-485 system this agreement less concise. Recommend users use MODBUS Protocol, which has been widely used in water management, hydrology and electric power industries equipment and system of international standard. IV. RS-485 interface circuit of power supply and grounding for the MCU with RS-485 micro system established and control network, should give priority to the use of the micro-system independent power supply scheme, it is best not to adopt a national power supply to the micro system parallel power supply, power cord (AC and DC) cannot be RS-485 signal lines sharing the same unit of multi-core cable. RS-485 signal line to choose section 0.75mm2 above twisted pair instead of a flat line. For each small capacity DC power use linear power supply LM7805 selection switch power than the more appropriate. Of course it should be noted that the protection: LM7805 1, LM7805 input andTo crossover 220 ~ 1000 μ F Electrolytic Capacitor; 2, LM7805 input and output side reverse 1N4007 diode; 3, LM7805 output and to crossover 470 ~ 1000 μ F electrolytic capacitor and 104pF monolithic capacitor and reverse 1N4007 diode; 4, input voltage to 8 ~ 10V, maximum allowable range 6.5 ~ 24V. You can use the alternative LM7805 PT5100 TI to achieve 9 ~ 38V's super wide voltage input. 5. photoelectric isolation in some areas of industrial control, because the situation is very complex, each node is high common-mode voltage. Although RS-485 interface is differential transmission mode, with a certain degree of resistance to common mode interference capability, but when common-mode voltage exceeds the limit of RS-485 receiver that receives the voltage is greater than + 12V or less than-7V, the receiver will no longer work, serious or even burnt chip and equipment. Solving such problems by DC-DC the system power and RS-485 transceiver power isolation; through the optical coupling signal isolation, complete elimination of the effects of common-mode voltage. Ways of implementing this programme can be divided into: 1, with optical coupling, isolated RS-485 of DC-DC, build circuit chip; 2, use the second integrated chip, such as MAX1480 PS1480, etc. VI. common fault RS-485 systems and processing methods RS-485 is a low-cost, easy communication system, but at the same time competing with weak stability. normally has a node failure will cause the system to a total or partial paralysis, and it is difficult to determine. Therefore the reader some common methods of maintaining RS-485. 1, if the system completely, mostly because a node chip VA, VB on power breakdown, using a multimeter VA and VB-differential mode voltage is zero, but on the ground of common-mode voltage greater than 3V, this time by measuring the size to troubleshoot common-mode voltage, common-mode voltage greater description from the point of failure, on the contrary, the farther away the closer; 2, bus continuous several nodes does not work properly. Is normally provided by a node failure. A node can cause adjacent 2 ~ 3 node (typically a follow-up) cannot communicate, so will its individually and bus off, if a node cannot recover from normal after bus, the node failure; 3, centralized supply of RS-485 system in power is often part of the node is not working properly, but each time was not exactly the same. This is due to the transceiver control end RS-485 TC design unreasonable, micro-system power-on State of confusion when node transceiver causing bus plug. Improved by various micro system with the power switch and then power-up; 4, system basically normal but occasionally a communication failure occurs. General is unreasonable because the network construction results in system reliability in a critical state, it is best to change the alignment or increase relay module. One of the emergency method will appear to the failed node to replace into performance better chip; 5, TC-MCU failure is in the State and the bus with long hair, died. Remind readers forget on TC-side checks. Notwithstanding the provisions of the differential mode voltage RS-485 than 200mV is working properly. But the actual measurement: a well-functioning system of their differential mode voltage General around the 1.2V (for network distribution and rate difference may make differential mode voltage in range 0.8 ~ 1.5V).
Labels:
[:]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment