What Is a RS 485 Transceiver?
Smart meters have developed with the maturity of single-chip microcomputer technology in the early 1980s. Now the world's meter market is basically monopolized by smart meters. This is due to the needs of enterprise informationization. One of the necessary conditions for enterprises to select meters is Networked communication interface. Initially it was a simple process of data analog signal output. Later, the instrument interface was an RS232 interface. This interface can achieve a point-to-point communication method, but this method cannot achieve the networking function. The subsequent RS485 solved this problem.
RS-485
- RS-485 is also known as TIA-485-A, ANSI / TIA / EIA-485 or TIA / EIA-485.
- RS485 is a standard that defines the electrical characteristics of drivers and receivers in a balanced digital multipoint system, which is defined by the Telecommunications Industry Association and the Electronics Industry Alliance. Digital communication networks using this standard can effectively transmit signals under long-distance conditions and environments with large electronic noise. RS-485 makes it possible to configure inexpensive local networks and multi-drop communication links. [s1]
- RS485 has two-wire system and four-wire system. The four-wire system can only realize the point-to-point communication mode. It is rarely used now. The two-wire system is now used. This connection mode is a bus topology. Up to 32 nodes can be connected on the same bus.
- In the RS485 communication network, the master-slave communication method is generally used, that is, one master with multiple slaves. In many cases, when connecting an RS-485 communication link, simply connect the "A" and "B" ends of each interface with a pair of twisted pairs, and ignore the signal ground connection. This connection method is used in many cases. The occasion can work normally, but it lays a lot of hidden dangers. Reason 1 is common mode interference: RS-485 interface adopts differential mode to transmit signals. It does not need to detect signals relative to a reference point. The system only It is sufficient to detect the potential difference between the two wires, but it is easy to overlook that the transceiver has a certain common-mode voltage range. The RS-485 transceiver has a common-mode voltage range of -7 to + 12V. Only if the above conditions are met, the entire network Can work normally; 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; the second reason is the problem of EMI: the common mode part of the output signal of the driver needs a return path, if there is no one The low-resistance return channel (signal ground) will return to the source end in the form of radiation, and the entire bus will radiate electromagnetic waves outwards like a huge antenna.
- For low-speed, short-distance, and interference-free occasions, ordinary twisted pair cables can be used. Conversely, for high-speed and long-line transmission, an RS485 special cable (STP-120 (for RS485 CAN), a pair of 18AWG), and armored twisted-pair shielded cable (ASTP-120 (for RS485 & CAN), a pair of 18AWG) should be used in the harsh environment
- When using the RS485 interface, for a specific transmission line, the data signal transmission from the RS485 interface to the load is allowed.
- The network topology generally adopts a bus-type structure with matching terminals. When building a network, 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 wires from the bus to each node should be as short as possible, so that the reflected signals in the lead wires have the lowest impact on the bus signals. Although some network connections are not correct, they may still work normally at short distances and low rates. However, as the communication distance increases or the communication rate increases, the adverse effects will become more and more serious. The main reason is that the signals are reflected at the ends of the branches. After superimposing with the original signal, the signal quality will be reduced.
- (2) Pay attention to the continuity of the characteristic impedance of the bus, and signal reflection will occur at the impedance discontinuity point. This discontinuity is likely to occur in the following situations: different cables are used in different sections of the bus, or too many transceivers are installed close to each other on a certain section of the bus, and too long branch lines are led to the bus. In short, a single, continuous signal path should be provided as a bus.
- (3) Pay attention to the problem of terminal load resistance. In the case of short distances and short distances, the entire network can work well without adding terminal load resistance, but the performance will decrease as the distance increases. Theoretically, when sampling at the midpoint of each received data signal, as long as the reflected signal is attenuated sufficiently low at the beginning of sampling, matching can be disregarded. But this is actually difficult to grasp. An article from the United States MAXIM company mentioned an empirical principle that can be used to determine what data rate and cable length need to be matched: when the signal conversion time (rise or fall time) When the electrical signal exceeds three times the time required for one-way transmission along the bus, no matching is required.
- Generally, the terminal resistance method is used for termination matching. RS-485 should be connected in parallel with the terminal resistance at the beginning and end of the bus cable. The termination resistance is 120 in the RS-485 network. The resistance is equivalent to the characteristic impedance of the cable, because the characteristic impedance of most twisted-pair cables is about 100 ~ 120. This matching method is simple and effective, but there is a disadvantage. The matching resistor consumes a large amount of power, which is not suitable for systems with strict power consumption restrictions. Another power-saving matching method is RC matching. Using a capacitor C to cut off the DC component can save most of the power. However, the value of capacitor C is a difficult point, and there is a trade-off between power consumption and matching quality. There is also a matching method using a diode. Although this solution does not achieve true "matching", it uses the clamping effect of the diode to quickly weaken the reflected signal and achieve the purpose of improving the signal quality. The energy saving effect is significant.