Greenhouse environment monitoring system and method based on 485 bus
By using a greenhouse environment monitoring system based on 485 bus in a greenhouse environment, and using the RS485 bus to realize data transmission between the upper computer and the lower computer, the problem of poor intelligence in the existing system is solved, remote monitoring and control of the greenhouse environment is realized, and the system intelligence and communication stability are improved.
Patent Information
- Application Number
- CN202411729094.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-04
AI Technical Summary
The existing greenhouse environment monitoring system is poorly intelligent and it is difficult to achieve remote monitoring and control of the greenhouse environment.
A greenhouse environment monitoring system based on 485 bus is adopted, and data transmission is carried out through the RS485 bus between the near-terminal subsystem and the far-terminal subsystem, master and slave control relationship between the upper and lower computers is realized, and sensor data is monitored and controller control execution is performed.
Remote monitoring and control of greenhouse environments is realized, the intelligence of the system is improved, multi-point monitoring and multi-point control can be achieved, and the stability and anti-interference ability of the communication network are improved.
Smart Images

Figure CN119556619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent monitoring technology, and in particular to a greenhouse environment monitoring system and method based on a 485 bus. Background Art
[0002] In the related art, the distributed monitoring system in the field of greenhouse environment control has the characteristics of many nodes, long transmission distance and bad on-site working conditions. The current greenhouse environment monitoring has poor intelligence. Summary of the invention
[0003] The present invention provides a greenhouse environment monitoring system and method based on 485 bus. The technical solution is as follows:
[0004] On the one hand, a greenhouse environment monitoring system based on a 485 bus is provided, the system comprising: a proximal subsystem at a proximal greenhouse environment and a remote subsystem at a remote greenhouse environment; the remote subsystem comprises a host computer and a first RS232-485 converter; the proximal subsystem comprises: a slave computer, a second RS232-485 converter, a plurality of controllers and a plurality of sensors; the first RS232-485 converter is connected to the second RS232-485 converter via an RS485 bus, one end of the second RS232-485 converter is connected to the slave computer, and the other end is connected to the plurality of sensors via a 485 bus; the slave computer is connected to the plurality of controllers;
[0005] The upper computer and the lower computer perform data transmission via the RS485 bus, with the upper computer initiating the master control and the lower computer executing the slave control.
[0006] In a possible implementation, the host computer issues a monitoring instruction, the first RS232-485 converter converts the monitoring instruction into a digital signal, and sends it to the second RS232-485 converter through the 485 bus, and the second RS232-485 converter converts the monitoring instruction into an analog signal and sends it to the slave computer;
[0007] The lower computer acquires the state value of the sensor corresponding to the first address by using the RS485 bus between the second RS232-485 converter and the sensor according to the first address carried by the monitoring instruction, and feeds the state value back to the upper computer.
[0008] In a possible implementation, the host computer is further used to send a control instruction according to the state value fed back by the host computer;
[0009] The lower computer sends the control instruction to the controller corresponding to the second address according to the second address carried by the control instruction, so that the corresponding controller realizes the control state corresponding to the control instruction.
[0010] In a possible implementation, the lower computer also stores a correspondence between the greenhouse state and the control state;
[0011] The lower computer, before sending the control instruction to the controller corresponding to the second address, is also used to determine whether the current greenhouse state matches the control state corresponding to the control instruction based on the corresponding relationship. If so, the control instruction is directly sent to the controller with the second address; otherwise, the upper computer is requested to confirm again whether the control instruction is executed.
[0012] In a possible implementation, the method further includes:
[0013] The single chip microcomputer connected to the multiple sensors is used as an auxiliary controller to obtain the status value of each sensor.
[0014] In a possible implementation, there are several single-chip microcomputers, each of which is connected to at least one sensor, and different single-chip microcomputers are located in different areas of the greenhouse environment.
[0015] In one possible implementation, the host computer determines the target address of the target microcontroller based on the first address, and sends a request carrying the target address to each microcontroller. The target microcontroller responds to the request sent by the host computer. The host computer sends the monitoring instruction to the target microcontroller, and the target microcontroller responds to the host computer with a status value.
[0016] In a possible implementation, the lower computer is a STM32F103ZE microcontroller.
[0017] On the other hand, a greenhouse environment monitoring method based on a 485 bus is provided, and the method is implemented using any of the above-mentioned greenhouse environment monitoring based on a 485 bus.
[0018] The technical solution provided by the present invention can at least bring the following beneficial effects:
[0019] By setting a proximal subsystem near the greenhouse environment and a remote subsystem far from the greenhouse environment, the proximal subsystem and the remote subsystem are connected via an RS485 bus, so as to utilize the RS485 bus to realize data transmission between the upper computer in the remote subsystem and the lower computer in the proximal subsystem, the upper computer initiates the master control, and the lower computer executes the slave control, thereby realizing data monitoring of the sensor in the greenhouse environment and control execution of the controller. It can be seen that this solution can realize remote monitoring and control of the greenhouse environment, and is more intelligent. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 It is a schematic diagram of a greenhouse environment monitoring system based on 485 bus provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0023] Please refer to Figure 1 , a greenhouse environment monitoring system based on 485 bus is provided in an embodiment of the present invention, the system comprising: a proximal subsystem at a proximal greenhouse environment and a remote subsystem at a remote greenhouse environment; the remote subsystem comprises a host computer and a first RS232-485 converter; the proximal subsystem comprises: a slave computer, a second RS232-485 converter, a plurality of controllers and a plurality of sensors; the first RS232-485 converter is connected to the second RS232-485 converter via an RS485 bus, one end of the second RS232-485 converter is connected to the slave computer, and the other end is connected to the plurality of sensors via a 485 bus; the slave computer is connected to the plurality of controllers;
[0024] The upper computer and the lower computer perform data transmission via the RS485 bus, with the upper computer initiating the master control and the lower computer executing the slave control.
[0025] In the embodiment of the present invention, by setting a proximal subsystem at a proximal greenhouse environment and a remote subsystem at a remote greenhouse environment, the proximal subsystem and the remote subsystem are connected via an RS485 bus, so as to utilize the RS485 bus to realize data transmission between the upper computer in the remote subsystem and the lower computer in the proximal subsystem, the upper computer initiates the master control, and the lower computer executes the slave control, thereby realizing data monitoring of the sensor in the greenhouse environment and control execution of the controller. It can be seen that this solution can realize remote monitoring and control of the greenhouse environment, and is more intelligent.
[0026] In addition, the greenhouse environment monitoring system of the embodiment of the present invention can realize multi-point monitoring and multi-point control, which fully meets the requirements of the complex environment in the greenhouse, and the communication network established in this way is more stable than other communication networks, has a longer transmission distance, and has a strong anti-interference ability. It can be widely used in the intelligent control of agricultural greenhouses, and can effectively solve the automatic detection and control of various environmental indexes inside the greenhouse, greatly saving manpower input, reducing labor intensity, and improving production efficiency.
[0027] The data transmission between the upper computer and the lower computer at least includes the monitoring instructions and control instructions issued by the upper computer.
[0028] In one implementation, the upper computer issues a monitoring instruction, the first RS232-485 converter converts the monitoring instruction into a digital signal, and sends it to the second RS232-485 converter via the 485 bus, and the second RS232-485 converter converts the monitoring instruction into an analog signal and sends it to the lower computer;
[0029] The lower computer acquires the state value of the sensor corresponding to the first address by using the RS485 bus between the second RS232-485 converter and the sensor according to the first address carried by the monitoring instruction, and feeds the state value back to the upper computer.
[0030] In another implementation, the host computer is further used to send a control instruction according to the state value fed back by the host computer;
[0031] The lower computer sends the control instruction to the controller corresponding to the second address according to the second address carried by the control instruction, so that the corresponding controller realizes the control state corresponding to the control instruction.
[0032] In one embodiment of the present invention, the lower computer also stores the corresponding relationship between the greenhouse state and the control state;
[0033] The lower computer, before sending the control instruction to the controller corresponding to the second address, is also used to determine whether the current greenhouse state matches the control state corresponding to the control instruction based on the corresponding relationship. If so, the control instruction is directly sent to the controller with the second address; otherwise, the upper computer is requested to confirm again whether the control instruction is executed.
[0034] In this way, when the upper computer and the lower computer jointly control the controller in the greenhouse environment, the lower computer reconfirms the control instructions of the upper computer, thereby ensuring that the control state in the greenhouse environment matches the greenhouse state.
[0035] In one embodiment of the present invention, the system may further include: a single chip microcomputer connected to the multiple sensors, used as an auxiliary controller to obtain the state value of each sensor.
[0036] In one embodiment of the present invention, there are several single chip microcomputers, each single chip microcomputer is connected to at least one sensor, and different single chip microcomputers are located in different areas of the greenhouse environment.
[0037] In one embodiment of the present invention, the host computer determines the target address of the target microcontroller based on the first address, and sends a request carrying the target address to each microcontroller. The target microcontroller responds to the request sent by the host computer. The host computer sends the monitoring instruction to the target microcontroller, and the target microcontroller responds with a status value to the host computer.
[0038] In one embodiment of the present invention, the lower computer is a STM32F103ZE microcontroller. The single-chip microcomputer may be a STC12C5A60S2 51 single-chip microcomputer.
[0039] Furthermore, the host computer of the remote subsystem may include a display screen for displaying the greenhouse status and control status.
[0040] Each unit is described below.
[0041] First, focus on the host computer.
[0042] The host computer can use the traditional x86 chip architecture, and the communication interface uses the RS232 interface to convert to the RS485 interface. The single-chip microcomputer uses RS485 for serial communication, and the TTL level serial interface needs to be converted to the RS485 serial interface through the chip. This system uses the MAX485 chip. Using the existing RS232 interface of the host computer, a dedicated RS232 / 485 converter is used in the system to achieve this. One side of the RS232 / 485 converter is connected to the RS232 standard 9-pin interface, and the other end is connected to the RS485 bus.
[0043] Then target the lower machine.
[0044] In the embodiment of the present invention, the lower computer can adopt the STM32F103ZE enhanced series, using high-performance Cortex TM -M3 32-bit RISC core, operating frequency of 72MHz, built-in high-speed memory (up to 512K bytes of flash memory and 64K bytes of SRAM), rich enhanced I / O ports and peripherals connected to two APB buses. This ensures high-performance, low-cost, and low-power embedded applications.
[0045] Next, let’s focus on the microcontroller.
[0046] In the embodiment of the present invention, there may be several single chip microcomputers.
[0047] When the lower computer uses an STM32F103ZE microcontroller, the microcontroller can be connected to the RS485 bus after level conversion through the serial port via the MAX485 chip. As the host device of the bus, it is responsible for coordinating the communication between the slaves (51 single-chip microcomputers or AD conversion modules with serial port communication functions) connected to the bus.
[0048] Assume that there are two single-chip computers, namely Node A and Node B, which are installed in different locations in the greenhouse to monitor the environment in different areas. When the host computer needs to obtain the status value of each area, it sends a request with the target address to the two single-chip computers as slaves. The target address is the device address of the target single-chip computer. The target single-chip computer responds, and the host sends a monitoring command, and the target single-chip computer responds to the host computer with the status value. During this period, other single-chip computers receive the request with the target address for address comparison. Since the address does not match, they will not make any response, that is, they will not upload monitoring data.
[0049] In the embodiment of the present invention, the sensors connected to the single chip microcomputer may include: soil EC value sensor, soil pH value sensor, light radiation sensor, temperature sensor, humidity sensor, wind speed and direction sensor, etc.
[0050] In the embodiment of the present invention, the controller connected to the lower computer may include: a fan, a lighting control, etc.
[0051] In the embodiment of the present invention, the communication distance of the RS485 bus meets the transmission distance requirement from the upper computer to the lower computer, and can work normally and stably at a long distance, which is convenient for installation, maintenance and upgrading; and the 51 single-chip microcomputer can meet the basic requirements of various sensors with its simple operation and stable performance.
[0052] In a second aspect, an embodiment of the present invention further provides a greenhouse environment monitoring method based on a 485 bus, and the method is implemented using any of the greenhouse environment monitoring based on a 485 bus described in the above embodiments.
[0053] In one embodiment of the present invention, the software design of the monitoring system can be realized on the host computer side. WebAccess is a browser-based human-machine interface (HMI) and supervisory control and data acquisition (SCADA) software that can run on operating systems such as Windows NT / 2000 / XP / 2003. It is a real-time monitoring system based on technologies such as ActiveX and ASP, which is applied in the Internet or Intranet environment. It not only has powerful configuration functions, but also breaks through the network technology bottleneck of traditional configuration software development.
[0054] In addition to the common drawing, point creation, animation, data display, trend chart, time alarm, record and report functions of general configuration software, the biggest feature of WebAccess that distinguishes it from other software is that all engineering configuration, database settings, drawing production and software management can be completed remotely using a standard browser through the Internet or Intranet. When abnormal conditions occur on site or timely modifications are required, engineering maintenance personnel can make corresponding adjustments in a timely manner through the network anywhere, making engineering maintenance work timely and efficient, and reducing engineering maintenance costs. At the same time, the client based on the Web browser can both monitor and control, that is, Internet users can access real-time data on the production site from the Web server through the Web browser, and can realize remote monitoring, remote fault diagnosis, remote command and dispatch, and remote equipment management based on the Internet.
[0055] The main interface of the software monitoring can clearly view the current greenhouse environment conditions, including indoor and outdoor temperature and humidity, soil humidity, soil EC value, pH value, and the current status of various control equipment, such as skylights, internal sunshades, sprinklers, drip irrigation, etc. The control method that combines automatic adjustment and manual adjustment can more flexibly and conveniently adjust the greenhouse environment conditions to ensure normal growth conditions for plants.
[0056] In the embodiment of the present invention, the greenhouse monitoring system software designed based on the WebAccess configuration software is easy to operate, has a simple interface, can realize remote operation, and greatly increases the real-time performance of the system.
[0057] It should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0058] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A greenhouse environment monitoring system based on 485 bus, characterized in that: The system comprises: a proximal subsystem in a proximal greenhouse environment and a remote subsystem in a remote greenhouse environment; the remote subsystem comprises an upper computer and a first RS232-485 converter; the proximal subsystem comprises a lower computer, a second RS232-485 converter, a plurality of controllers and a plurality of sensors; the first RS232-485 converter is connected to the second RS232-485 converter via an RS485 bus, one end of the second RS232-485 converter is connected to the lower computer, and the other end is connected to the plurality of sensors via a 485 bus; the lower computer is connected to the plurality of controllers; The upper computer and the lower computer perform data transmission via the RS485 bus, with the upper computer initiating the master control and the lower computer executing the slave control.
2. The greenhouse environment monitoring system based on 485 bus according to claim 1 is characterized in that: The host computer issues a monitoring instruction, the first RS232-485 converter converts the monitoring instruction into a digital signal, and sends it to the second RS232-485 converter via a 485 bus, and the second RS232-485 converter converts the monitoring instruction into an analog signal and sends it to the slave computer; The lower computer acquires the state value of the sensor corresponding to the first address by using the RS485 bus between the second RS232-485 converter and the sensor according to the first address carried by the monitoring instruction, and feeds the state value back to the upper computer.
3. The greenhouse environment monitoring system based on 485 bus according to claim 2 is characterized in that: The host computer is also used to send control instructions according to the state value fed back by the host computer; The lower computer sends the control instruction to the controller corresponding to the second address according to the second address carried by the control instruction, so that the corresponding controller realizes the control state corresponding to the control instruction.
4. The greenhouse environment monitoring system based on 485 bus according to claim 3 is characterized in that: The lower computer also stores the corresponding relationship between the greenhouse state and the control state; The lower computer, before sending the control instruction to the controller corresponding to the second address, is also used to determine whether the current greenhouse state matches the control state corresponding to the control instruction based on the corresponding relationship. If so, the control instruction is directly sent to the controller with the second address; otherwise, the upper computer is requested to confirm again whether the control instruction is executed.
5. The greenhouse environment monitoring system based on 485 bus according to claim 4 is characterized in that: Also includes: The single chip microcomputer connected to the multiple sensors is used as an auxiliary controller to obtain the status value of each sensor.
6. The greenhouse environment monitoring system based on 485 bus according to any one of claim 5, characterized in that: There are several single chip microcomputers, each of which is connected to at least one sensor, and different single chip microcomputers are located in different areas of the greenhouse environment.
7. The greenhouse environment monitoring system based on 485 bus according to any one of claim 6, characterized in that: The host computer determines the target address of the target microcontroller according to the first address, and sends a request carrying the target address to each microcontroller. The target microcontroller responds to the request sent by the host computer. The host computer sends the monitoring instruction to the target microcontroller, and the target microcontroller responds to the host computer with a status value.
8. The greenhouse environment monitoring system based on 485 bus according to any one of claims 1 to 7, characterized in that: The lower computer is a STM32F103ZE microcontroller.
9. A greenhouse environment monitoring method based on 485 bus, characterized in that: The method is implemented by using the greenhouse environment monitoring system based on 485 bus as described in any one of claims 1-8.