I. Introduction to RS485
Intelligent instruments emerged with the maturation of microcontroller technology in the early 1980s, and now the global instrument market is largely dominated by them. This is primarily due to the need for enterprise informatization; a crucial requirement for enterprises when selecting instruments is the presence of a network communication interface. Initially, instruments output simple process quantities as analog signals. Later, the RS232 interface was adopted, enabling point-to-point communication but lacking network connectivity. The subsequent development of RS485 solved this problem. Below, we will briefly introduce RS485.
II. RS485 Interface
RS485 uses differential signal negative logic, where +2V to +6V represents "0" and -6V to -2V represents "1".
RS485 has two-wire and four-wire connection methods. The four-wire method can only realize point-to-point communication and is rarely used now. The two-wire connection method is more commonly used now. This connection method is a bus topology structure, and up to 32 nodes can be connected on the same bus.
In RS485 communication networks, a master-slave communication mode is generally used, meaning one master device supports multiple slave devices. In many cases, connecting an RS-485 communication link simply involves connecting the "A" and "B" terminals of each device with a twisted pair cable, neglecting the ground connection. While this connection method may work correctly in many situations, it introduces significant hidden dangers for two reasons:
(1) Common-mode interference problem: The RS-485 interface uses differential signal transmission and does not require signal detection relative to a reference point; the system only needs to detect the potential difference between the two lines. However, people often overlook the fact that transceivers have a certain common-mode voltage range. The common-mode voltage range of RS-485 transceivers is -7 to +12V. Only when this condition is met can the entire network work normally. When the common-mode voltage of the network line exceeds this range, it will affect the stability and reliability of communication and may even damage the interface.
(2) EMI problem: The common mode part of the output signal of the sending driver needs a return path. If there is no low-impedance return path (signal ground), it will return to the source in the form of radiation, and the entire bus will radiate electromagnetic waves outward like a giant antenna.
Since PCs only have an RS232 interface by default, there are two methods to obtain an RS485 circuit for the PC host computer:
(1) Convert the PC serial port RS232 signal to RS485 signal through RS232/RS485 conversion circuit. For complex industrial environments, it is best to choose a product with surge protection and isolation.
(2) Through the PCI multi-serial port card, an expansion card with an output signal of RS485 type can be directly selected.
III. RS485 cable
In general situations, ordinary twisted-pair cables are sufficient, while shielded coaxial cables can be used in more demanding environments. When using an RS485 interface, for a specific transmission line, the maximum allowable cable length for data signal transmission from the RS485 interface to the load is inversely proportional to the signal transmission baud rate. This length is mainly affected by signal distortion and noise.
Theoretically, RS485 can transmit up to 1200 meters, but in practice, the actual transmission distance is shorter than 1200 meters, depending on the surrounding environment. During transmission, repeaters can be added to amplify the signal; up to eight repeaters can be added, meaning the theoretical maximum transmission distance of RS485 can reach 9.6 kilometers. For truly long-distance transmission, optical fiber can be used as the propagation medium, with a photoelectric converter at each end. Multimode fiber has a transmission distance of 5-10 kilometers, while single-mode fiber can reach a propagation distance of up to 50 kilometers.
IV. RS485 Wiring
Network topology typically uses a bus structure with terminal matching, and does not support ring or star networks. When constructing a network, the following points should be noted:
(1) Use a twisted-pair cable as the bus to connect all nodes in series. The length of the lead-out line from the bus to each node should be as short as possible so as to minimize the impact of reflected signals in the lead-out line on the bus signal. Some network connections may still work normally over short distances and at low speeds even if they are not correct. However, as the communication distance increases or the communication rate increases, their adverse effects will become more and more serious. The main reason is that the signal is reflected at the end of each branch and superimposed on the original signal, which will cause a decrease in signal quality.
(2) Attention should be paid to the continuity of the characteristic impedance of the bus. Signal reflection will occur at the point of impedance discontinuity. The following situations are prone to this discontinuity: different sections of the bus use different cables, or too many transceivers are installed close together on a certain section of the bus, or excessively long branch lines are led out to the bus.
In summary, a single, continuous signal path should be provided as the bus.
Another issue to consider in RS485 networking is the terminating load resistance. While the network may function well without terminating load resistance when there are few devices and short distances, performance degrades with increasing distance. Theoretically, when sampling at the midpoint of each received data signal, matching can be disregarded as long as the reflected signal attenuates sufficiently at the start of sampling. Matching is also unnecessary when the signal transition time (rise or fall time) exceeds three times the time required for unidirectional transmission of the electrical signal along the bus.
Generally, terminating resistors are used for matching. In RS-485, terminating resistors should be connected in parallel at both the beginning and end of the bus cable. The terminating resistor in an RS-485 network is typically 120Ω, equivalent to the characteristic impedance of the cable, as most twisted-pair cables have a characteristic impedance of approximately 100-120Ω. This matching method is simple and effective, but it has a drawback: the matching resistor consumes a significant amount of power, making it unsuitable for systems with strict power consumption limitations. Another more energy-efficient matching method is RC matching. Using a capacitor C to block the DC component can save a large amount of power. However, choosing the value of capacitor C is challenging, requiring a trade-off between power consumption and matching quality. There is also a matching method using diodes. While this scheme doesn't achieve true "matching," it utilizes the clamping effect of the diode to quickly weaken reflected signals, thereby improving signal quality and resulting in significant energy savings.
In the past two years, some companies have launched serial port servers to replace multi-serial port cards, based on the fact that some enterprise informatization has been completed and local area networks have been laid in the factory, extending to every office and control room in the workshop. This is mainly to reduce line investment and save costs by utilizing the existing local area network resources of the enterprise. It is equivalent to placing multi-serial port cards on the field through TCP/IP.
Differences between RS485 and other bus networks:
We categorize industrial networks into three types: RS485 networks, HART networks, and fieldbus networks.
HART Networking: HART is a transitional bus standard proposed by Emerson. It primarily uses digital signals superimposed on 4-20 mA current signals, employing BELL202 frequency shift keying technology at the physical layer to achieve some smart meter functions. However, this protocol is not a truly open standard; joining the foundation requires a fee. The technology is mainly monopolized by a few large foreign companies. In recent years, some domestic companies have also started developing it, but they haven't yet reached the level of foreign companies. Currently, a large number of smart meters have HART round cards and HART communication capabilities. However, in China, this functionality hasn't been fully utilized; at most, it's used for parameter setting via handheld devices, failing to leverage the full potential of HART smart meters and lacking network connectivity for device monitoring. In the long run, due to HART's low communication speed and network difficulties, the procurement volume of HART meters will decline. However, since HART meters have been around for over a decade and are currently installed in large numbers, there is still significant potential for system integrators.
Fieldbus Networks: Fieldbus technology is one of the hottest development trends in the field of automation today. It is hailed as the computer local area network of automation, and its emergence marks the beginning of a new era in automation control technology. Fieldbus is a digital, serial, multi-station communication network connecting instruments located in the control field with control equipment located in the control room. Its key feature is its ability to support bidirectional, multi-node, bus-based, fully digital communication. In recent years, fieldbus technology has become a hot topic in international automation and instrumentation development. Its emergence has revolutionized the traditional control system structure, propelling automatic control systems towards intelligence, digitalization, informatization, networking, and decentralization, forming a new type of network-integrated, fully distributed control system—the Fieldbus Control System (FCS). However, various fieldbus standards currently coexist and each has its own niche, without a truly unified standard. Crucially, it's unclear when a unified standard will be formed, and the technology is not yet mature enough. Furthermore, the variety of fieldbus instruments is relatively limited, offering little choice, and prices are relatively high. From the end-user's perspective, most are still in a wait-and-see mode, wanting to wait for the technology to mature before considering it, resulting in limited implementation at present.
RS485 Networking: RS485/MODBUS is a popular networking method, characterized by its simplicity and convenience in implementation. Furthermore, a large number of instruments support RS485, especially in the oil industry where RS485/MODBUS is virtually ubiquitous. Instrument manufacturers are increasingly switching to RS485/MODBUS because it's difficult and expensive to find adapters for older HART instruments, while RS485 adapters are much cheaper and more diverse. At least in the low-end market, RS485/MODBUS will remain the primary networking method.
Disclaimer: This article is a reprint. If it involves copyright issues, please contact us promptly for deletion (QQ: 2737591964). We apologize for any inconvenience.