Farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning
The farmland RS485 bus intelligent converter with dynamic error-avoiding port scanning solves the problems of low polling efficiency, rate-distance contradiction and insufficient scalability of RS485 bus communication system in multi-node sensor network, and realizes efficient and stable data transmission and management.
Patent Information
- Application Number
- CN202422877010.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2034-11-25
AI Technical Summary
The existing RS485 bus communication system has problems in multi-node sensor networks, such as low polling efficiency, difficulty in balancing communication rate and distance, and insufficient system scalability, especially in long-distance and complex network environments.
A farmland RS485 bus intelligent converter based on dynamic error-avoidance port scanning is adopted. Through the combination of a microprocessor, a port scanning module, a multi-channel RS485 communication interface, a storage unit and a clock module, dynamic detection and screening of normal communication interfaces are achieved. A star topology connection method is adopted, combined with differential signal transmission and non-volatile storage, to optimize the data transmission process.
It significantly improves communication efficiency, reduces data response time, enhances system stability and scalability, ensures the integrity and reliability of data transmission, and adapts to the flexible access of various sensor types.
Smart Images

Figure CN223463076U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to long distance high speed data communication technical field of multi -node sensor network especially, it is a kind of farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning. BACKGROUND
[0002] RS485 bus is a commonly used communication mode, with long distance transmission capability and strong anti-interference performance, is widely used in multi-node sensor network and industrial control system. Its basic principle is to use differential signal transmission data, connect multiple devices through a bus, support half-duplex communication. This technology in high-standard farmland and other distributed sensor scenarios, can meet the basic needs of long distance sensor data acquisition. However, the prior art has multiple problems and limitations in application, and needs to be improved.
[0003] In the prior art, RS485 bus is usually used to connect multiple sensors through fixed polling to realize data acquisition and communication management. This way in long distance, complex network environment, the following technical defects can be caused:
[0004] 1. Low polling efficiency: in the scene of multiple nodes in parallel, the fixed polling mechanism cannot dynamically adapt to the device state change. When some sensors are offline or communication is abnormal, the bus will still poll them invalidly, causing the system response time to be prolonged, especially in real-time monitoring scenarios that require second-level response.
[0005] 2. Conflict between communication rate and distance: in order to realize long distance transmission, RS485 bus usually needs to reduce the communication rate, while in the scene of high-speed transmission (such as high-frequency data acquisition), the long distance transmission capability is limited, and it is difficult to balance the two.
[0006] 3. Poor system scalability: when multiple sensor types need to be connected, the existing fixed topology RS485 system is difficult to adapt to different data interfaces and priority devices flexibly, and the expansion capability is insufficient, affecting the overall efficiency.
[0007] In order to solve the above problems in the industry, the method usually adopted is that, for the problem of low polling efficiency, some schemes try to optimize data communication through multi-master multi-slave mode, but the multi-master multi-slave architecture is complex, and is easy to cause bus conflict and signal interference, and the system stability decreases; for the conflict between rate and distance, some application scenarios use TTL or RS232 interface for short distance high speed communication, but the transmission distance of this kind of interface is limited, and it is difficult to meet the long distance monitoring demand; for the problem of insufficient scalability, some systems introduce additional relay devices or segmented management mode, but this kind of scheme increases the hardware cost and maintenance difficulty, and the practical application is limited.
[0008] Therefore, how to improve the polling efficiency of the multi-node RS485 bus communication system, optimize the balance of communication rate and transmission distance, and enhance the system expansion capability become technical problems to be solved by the utility model. Utility model content
[0009] The utility model solves the technical problem for the defects in the prior art, provides a farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning, to solve the problems of low polling efficiency, difficulty in balancing communication rate and distance and insufficient system expansion in the background art.
[0010] To solve the above technical problems, the technical scheme adopted by the utility model is as follows:
[0011] A farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning, comprising a microprocessor, a port scanning module, a multi-channel RS485 communication interface, a storage unit, a clock module and a power supply module;
[0012] The microprocessor is arranged as the core of the whole intelligent converter, is installed at the central position of the device, and is electrically connected with the multi-channel RS485 communication interface, the port scanning module, the storage unit, the clock module and the power supply module;
[0013] The multi-channel RS485 communication interface is distributed at the periphery of the microprocessor, is connected to the microprocessor in a star-shaped topological mode, and is configured to realize parallel communication of multiple RS485 devices;
[0014] The port scanning module is arranged on one side of the microprocessor, is electrically connected with the microprocessor, and is configured to perform real-time scanning on the multi-channel RS485 communication interface and transmit the online state signal of each interface to the microprocessor;
[0015] The storage unit is arranged on the other side of the microprocessor, is electrically connected with the microprocessor, and is used for buffering the data transmitted through the multi-channel RS485 communication interface to avoid data loss caused by mismatching of data transmission rate;
[0016] The clock module is arranged on one side of the microprocessor and is electrically connected with the microprocessor;
[0017] The power supply module is arranged at one end of the intelligent converter and is electrically connected with the microprocessor, the storage unit and the clock module.
[0018] As a further scheme of the utility model, the port scanning module is connected to the multi-channel RS485 communication interface and the microprocessor through a signal line, and comprises a signal detection unit and a signal control unit;
[0019] The signal detection unit is arranged at the input end of the port scanning module, and is used for detecting the signal state of the multi-channel RS485 communication interface in real time, so as to distinguish the normal communication interface from the communication interface with connection abnormality.
[0020] The signal control unit is arranged at the output end of the port scanning module, and is electrically connected with the signal detection unit, and is used for selectively transmitting the signal from the normal communication interface to the microprocessor according to the detection result of the signal detection unit, while shielding the signal from the communication interface with connection abnormality.
[0021] As a further scheme of the utility model, the storage unit is a nonvolatile memory for temporarily storing data exceeding the processing speed in the high-speed transmission process.
[0022] As a further scheme of the utility model, the multi-channel RS485 communication interface is connected with external sensor equipment through a differential signal transmission mode, and each communication interface supports a highest transmission rate of not less than 115.2 kbps.
[0023] As a further scheme of the utility model, the clock module adopts a crystal oscillator module with low temperature drift and high stability, and the frequency accuracy is higher than ±10 ppm.
[0024] As a further scheme of the utility model, each interface of the multi-channel RS485 communication interface is connected to the microprocessor through an independent signal line, and the signal lines are uniformly distributed in the peripheral region of the microprocessor.
[0025] As a further scheme of the utility model, the port scanning module and the multi-channel RS485 communication interface are connected through an interface board, the interface board is arranged between the microprocessor and the multi-channel RS485 communication interface, and is used for correspondingly connecting the signal input of the port scanning module with the signal output of the multi-channel RS485 communication interface.
[0026] Compared with the prior art, the utility model has the beneficial effects that:
[0027] 1. Dynamic error avoidance and improved communication efficiency: through the cooperation of the signal detection unit and the signal control unit of the port scanning module, the online state of the multi-channel RS485 communication interface is detected in real time, and the normal communication interface is dynamically screened for signal transmission, so that invalid polling caused by offline ports is effectively avoided.
[0028] 2. Modular design, enhance system stability: the device adopts star topology way connects multiple RS485 communication interface, and is distributed to microprocessor through signal line radially, has optimized the signal distribution path between equipment. This modular design not only improves the expansion capability of the overall system, but also enhances the anti-interference in long distance data transmission, ensures the reliability of data communication in large scale sensor network.
[0029] 3. Efficient data management, prevent data loss: by arranging non-volatile storage unit near microprocessor, buffer the temporary data accumulation caused by rate difference in high-speed data transmission process, reduce the risk of data loss.
[0030] The additional aspects and advantages of the present application will be partially given in the following description, some will become apparent from the following description, or be understood by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical scheme in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiment or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor under the premise of not paying.
[0032] Figure 1 The system architecture diagram of the present application. DETAILED DESCRIPTION
[0033] The technical scheme in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.
[0034] Please refer to Figure 1 In the embodiments of the present application, an intelligent converter for farmland RS485 bus based on dynamic error avoidance port scanning includes a microprocessor, a port scanning module, a multiple RS485 communication interface, a storage unit, a clock module and a power supply module. The microprocessor is set as the core of the entire intelligent converter and is installed at the central position of the device and is electrically connected with the multiple RS485 communication interface, the port scanning module, the storage unit, the clock module and the power supply module. The multiple RS485 communication interface is distributed at the periphery of the microprocessor and is connected to the microprocessor in a star topology mode and is configured to realize parallel communication of multiple RS485 devices.
[0035] The port scanning module is arranged on one side of the microprocessor and is electrically connected with the microprocessor, configured to scan the multi-channel RS485 communication interface in real time and transmit the online state signal of each interface to the microprocessor; the storage unit is arranged on the other side of the microprocessor and is electrically connected with the microprocessor, used for buffering the data transmitted through the multi-channel RS485 communication interface to avoid data loss caused by mismatch of data transmission rate; the clock module is arranged on one side of the microprocessor and is electrically connected with the microprocessor; and the power supply module is arranged at one end of the intelligent converter and is electrically connected with the microprocessor, the storage unit and the clock module.
[0036] and, Figure 1 A system architecture of a farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning is shown in FIG. 1. The system architecture mainly consists of external sensors, an intelligent converter and a monitoring terminal. The external sensors are connected to the intelligent converter through multiple RS485 communication lines (line 1 to line N). The intelligent converter includes core modules such as a microprocessor, a port scanning module, a storage unit, a clock module and a power supply module. The port scanning module is responsible for real-time scanning of the online status of each RS485 line and transmitting the detection results to the microprocessor. The storage unit is used to buffer the data collected by the sensors to avoid data loss caused by mismatch of data rates. The clock module provides an accurate time reference for data transmission and time synchronization. The power supply module provides stable power support for all components. The intelligent converter communicates with the monitoring terminal through uplink and downlink RS485 lines. The monitoring terminal is used to receive and display environmental parameter data collected by the sensors, realizing efficient monitoring and management of the multi-node distributed sensor network. This architecture can effectively improve the polling efficiency, ensure data integrity, and maintain the stability and efficiency of communication in long-distance transmission scenarios.
[0037] The port scanning module is connected to the multi-channel RS485 communication interface and the microprocessor through signal lines and includes a signal detection unit and a signal control unit. The signal detection unit is arranged at the input end of the port scanning module and is used to detect the signal state of the multi-channel RS485 communication interface in real time to distinguish between normal communication interfaces and communication interfaces with connection abnormalities. The signal control unit is arranged at the output end of the port scanning module and is electrically connected with the signal detection unit. According to the detection results of the signal detection unit, the signal control unit selectively transmits signals from normal communication interfaces to the microprocessor while shielding signals from communication interfaces with connection abnormalities.
[0038] The storage unit is a non-volatile memory for temporarily storing data exceeding the processing speed in the high-speed transmission process; the multi-channel RS485 communication interface is connected with external sensor equipment through a differential signal transmission mode, and each communication interface supports a maximum transmission rate of not less than 115.2 kbps; the clock module adopts a low-temperature drift high-stability crystal oscillator module, and the frequency accuracy is higher than ±10 ppm; each interface of the multi-channel RS485 communication interface is connected to the microprocessor through an independent signal line, and the signal lines are uniformly distributed in the peripheral area of the microprocessor; the port scanning module is connected between the multi-channel RS485 communication interface through an interface board, the interface board is arranged between the microprocessor and the multi-channel RS485 communication interface, and is used for corresponding connection of signal input of the port scanning module and signal output of the multi-channel RS485 communication interface.
[0039] Embodiment 1
[0040] In a real-time data monitoring system of high-standard farmland, a large number of sensors are usually deployed to collect environmental parameters such as soil humidity, temperature, and light intensity, and the data is transmitted to the monitoring end through the communication network. Limited by the dispersion of farmland terrain and the complexity of equipment, the traditional RS485 communication system is difficult to meet the efficient and stable data transmission demand, and there are problems such as low polling efficiency, data loss, and communication speed and distance cannot be considered. To solve the above problems, the embodiment provides an intelligent converter of farmland RS485 bus based on dynamic error-avoiding port scanning, which realizes efficient sensor network management and data communication in this scenario.
[0041] The intelligent converter includes a microprocessor, a port scanning module, a multi-channel RS485 communication interface, a storage unit, a clock module, and a power supply module, which work cooperatively to form an efficient multi-node sensor communication system.
[0042] In a farmland area, for example, several RS485 sensors are distributed in each small field, and each sensor is connected to the multi-channel RS485 communication interface of the intelligent converter through a signal line. The multi-channel RS485 communication interface is connected with the microprocessor in a star topology, which ensures uniform distribution of signals and reduces interference on the transmission path.
[0043] The port scanning module monitors the online state of each RS485 communication interface in real time through a signal detection unit and a signal control unit. After the microprocessor receives the online state signal from the port scanning module, it can automatically skip the offline sensor port and only poll and transmit data to the normally communicating sensors. The specific implementation steps are as follows:
[0044] 1. Initialization phase: After the intelligent converter is powered on, the power supply module provides stable power supply to the microprocessor, port scanning module, storage unit and clock module; the clock module starts and provides high-precision time reference to the microprocessor. The microprocessor loads the sensor polling list and starts the port scanning module.
[0045] 2. Real-time scanning and dynamic error avoidance: The port scanning module periodically detects the signal state of the multi-channel RS485 communication interface through the signal detection unit. For the interface detected to be offline or having communication abnormalities, the signal control unit immediately shields the signal thereof, ensuring that no invalid request is initiated to it during the polling process.
[0046] 3. Data acquisition and transmission: The microprocessor queries the online sensors one by one according to the polling list, and receives the environmental parameter data returned by the sensors through the multi-channel RS485 communication interface. When multiple sensors return data at the same time, the storage unit acts as a cache area to temporarily store the data to avoid data loss due to rate mismatch. Subsequently, the microprocessor sequentially packages and transmits the data to the remote monitoring end according to the reception time and priority order.
[0047] 4. Efficient data management and feedback: After all online sensors complete a data acquisition, the microprocessor checks the integrity and timestamp of the data based on the time reference of the clock module, and generates a feedback signal to the monitoring end. The offline sensor state is also recorded in the storage unit for subsequent maintenance reference.
[0048] The utility model discloses a port scanning module dynamic monitoring and shielding offline interface, avoids the invalid operation of traditional fixed polling, makes the response speed of system in the multi -node environment significantly improve. Experiments show that the system in the scene of 50 sensor nodes, response delay reduces by more than 30%. The introduction of storage unit makes the data loss problem that can be caused by rate mismatch in the data transmission process be solved effectively, ensures the stable operation of large -scale sensor network. The cooperation of differential signal transmission and high -precision clock module makes the system still can keep 115.2kbps communication rate under the transmission distance of 1200 meters, provides technical guarantee for the efficient monitoring of wide area farmland. The star topology design of multi-channel RS485 communication interface simplifies the extension process of multi -node sensor, and the intelligent converter can be flexibly adapted to various types of sensors, has higher applicability.
[0049] Example 2:
[0050] In the real-time monitoring system of industrial automation production line, it is usually required to collect and centrally manage the running state of equipment, environmental parameters (such as temperature and humidity, gas concentration, etc.) at multiple points. Due to the wide distribution and complex layout of production line equipment, the existing communication system based on RS485 has obvious shortcomings in long distance, high speed and multi-node management, which is difficult to meet the requirements of real-time and reliability. The embodiment provides a farmland RS485 bus intelligent converter based on dynamic error avoidance port scanning for the scene, which optimizes the communication structure and dynamic management strategy to effectively improve the system performance.
[0051] A plurality of RS485 sensors are installed beside different devices of the production line for collecting device state and environmental parameters. These sensors are connected to the multi-channel RS485 communication interface of the intelligent converter through signal lines. The communication interface is connected to the microprocessor of the intelligent converter in a star topology, which facilitates rapid expansion of the number of nodes and reduces interference on the signal transmission path.
[0052] The port scanning module detects the online state of the RS485 communication interface in real time through the signal detection unit. If a sensor is offline due to failure or maintenance, the signal control unit will shield its interface signal to avoid invalid polling. The storage unit caches high-frequency data returned by the sensor to ensure that the microprocessor can process and forward data at a stable rate. The clock module provides a precise reference for data timestamping to ensure the timing consistency of all data in the system. The specific operation process is as follows:
[0053] 1. System initialization: after the intelligent converter is connected to the power supply, the power supply module starts to supply power to the microprocessor, the port scanning module, the storage unit and the clock module. The clock module starts timing, and the microprocessor loads the polling list and initializes the port scanning module.
[0054] 2. Real-time data acquisition: the microprocessor selects the currently online sensor interface through the port scanning module. In each round of polling, only the online interface is queried, and the faulty or offline interface is skipped, significantly reducing communication delay. The data returned by the online sensor is received by the multi-channel RS485 communication interface and temporarily stored in the storage unit.
[0055] 3. Data packaging and transmission: the microprocessor extracts the cached data from the storage unit and generates a timestamp in combination with the clock module to package, sort and send the data to the monitoring system. For offline sensors, the microprocessor records the state and marks it in the log for subsequent maintenance and repair.
[0056] 4. Expansion and dynamic adjustment: when a new sensor is connected, the microprocessor can automatically detect the new interface through the port scanning module and update the polling list without changing the original system structure.
[0057] The utility model discloses dynamic avoid offline or fault interface, reduce invalid communication significantly, and experimental data show that the system reduces 40% response time under the scene of 100 sensor nodes.Differential signal transmission mode and accurate clock control make the system still keep 115.2kbps communication rate on 1200 meters transmission distance.The modular design of star topology is convenient for sensor access and extension, and intelligent port scanning avoids the conflict problem in multi-node polling, ensures long-term stable operation of the system;The storage unit effectively alleviates the problem of data processing rate and transmission rate mismatch, ensures the integrity of high-frequency acquisition data in the transmission process.
[0058] In the utility model, unless another definite provision and limit, the term " install " " set " " connect " " fixed " " screw " and so on the term should do broad sense understanding, for example, can be fixed connection, also can be detachable connection, or be integrated;Can be mechanical connection, also can be electrical connection;Can be directly connected, also can be indirectly connected through intermediate medium, can be the communication or the interaction of two elements of two elements inside, unless another definite limit, for the ordinary skill of the art, can understand the concrete meaning of the above-mentioned term in the utility model according to specific circumstances.
[0059] For those skilled in the art, it is obvious that the utility model is not limited to the details of the above exemplary embodiments, and the utility model can be realized in other specific forms without departing from the spirit or basic features of the utility model. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the utility model is defined by the appended claims rather than the above description, and therefore all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the utility model.
Claims
1. A farmland RS485 bus intelligent converter based on dynamic error-avoiding port scanning, characterized in that: The intelligent converter comprises a microprocessor, a port scanning module, a multi-channel RS485 communication interface, a storage unit, a clock module and a power supply module. The microprocessor is arranged at the core of the intelligent converter and is electrically connected to the multi-channel RS485 communication interface, the port scanning module, the storage unit, the clock module and the power supply module. The multi-channel RS485 communication interface is arranged at the periphery of the microprocessor and is connected to the microprocessor in a star topology. The port scanning module is arranged at one side of the microprocessor and is electrically connected to the microprocessor. The storage unit is arranged at the other side of the microprocessor and is electrically connected to the microprocessor. The clock module is arranged at one side of the microprocessor and is electrically connected to the microprocessor. The power supply module is arranged at one end of the intelligent converter and is electrically connected to the microprocessor, the storage unit and the clock module.
2. The smart RS485 bus converter based on dynamic error-avoiding port scanning for farmland according to claim 1, characterized in that, The port scanning module is connected to the multi-channel RS485 communication interface and the microprocessor through signal lines and comprises a signal detection unit and a signal control unit. The signal detection unit is arranged at the input end of the port scanning module and is used for detecting the signal state of the multi-channel RS485 communication interface in real time to distinguish between normal communication interfaces and communication interfaces with connection abnormalities. The signal control unit is arranged at the output end of the port scanning module and is electrically connected to the signal detection unit.
3. The smart RS485 bus converter based on dynamic error-avoiding port scanning for farmland according to claim 1, characterized in that, The storage unit is a non-volatile memory and is used for temporarily storing data that exceeds the processing speed in the high-speed transmission process.
4. The smart RS485 bus converter based on dynamic error-avoiding port scanning for farmland according to claim 1, characterized in that, The multi-channel RS485 communication interface is connected to external sensor devices through a differential signal transmission mode, and each communication interface supports a maximum transmission rate of not less than 115.2 kbps.
5. The smart RS485 bus converter based on dynamic error-avoiding port scanning for farmland according to claim 1, characterized in that, The clock module adopts a crystal oscillator module with low temperature drift and high stability, and the frequency accuracy is higher than ±10 ppm.
6. The smart RS485 field bus converter based on dynamic error-avoiding port scanning according to claim 1, characterized in that, Each interface of the multi-channel RS485 communication interface is connected to the microprocessor through an independent signal line, and the signal lines are uniformly distributed in the peripheral area of the microprocessor.
7. The smart RS485 field bus converter based on dynamic error-avoiding port scanning according to claim 1, characterized in that, The port scanning module and the multi-channel RS485 communication interface are connected through an interface board arranged between the microprocessor and the multi-channel RS485 communication interface, and the signal input of the port scanning module is connected to the signal output of the multi-channel RS485 communication interface.