Greenhouse environment control system

By designing a greenhouse environment control system combining a microcontroller and multiple detection modules, the existing system has solved the problems of high cost and complex operation, and the automatic regulation of the greenhouse environment and strong applicability are achieved.

CN119960531APending Publication Date: 2025-05-09QINGDAO AGRI UNIV +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510046462.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing automatic greenhouse control system has high construction and maintenance costs and complex operations, making it difficult to adapt to different types of greenhouses, which limits its promotion and application at the grassroots level in rural China.

Method used

A greenhouse environment control system is designed, and a microcontroller minimum circuit is combined with temperature, humidity, light intensity, carbon dioxide detection module, relay module and stepper motor drive module to realize automatic regulation of the greenhouse environment.

Benefits of technology

It realizes automatic regulation of greenhouse environment, reduces construction costs, simplifies operation and maintenance, is highly applicable, and can adapt to various types of greenhouses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960531A_ABST
    Figure CN119960531A_ABST
Patent Text Reader

Abstract

The invention discloses a greenhouse environment control system, which relates to the field of greenhouse control and comprises a single-chip microcomputer minimum circuit, and a temperature detection module, a soil humidity detection module, an illumination intensity detection module, a carbon dioxide detection module, a relay module and a stepping motor driving module which are connected with the single-chip microcomputer minimum circuit, the relay module is connected with the heater, the fan, the sprayer and the sunshade net, and the stepping motor driving module is connected with a stepping motor of the sunshade net. The system can realize automatic regulation and control of the environment in the greenhouse based on a single-chip microcomputer minimum circuit, a temperature detection module, a soil humidity detection module, an illumination intensity detection module, a carbon dioxide detection module, a relay module and a stepping motor driving module. The system has the advantages of being low in construction cost, easy to operate and maintain and high in applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of greenhouse control, and in particular to a greenhouse environment control system. Background Art

[0002] At present, China's greenhouse automatic control system has reached a relatively advanced level, but it is limited by its high construction and later maintenance costs, requires producers to have a certain level of scientific and cultural literacy, and is difficult to adapt to different types of greenhouses, making it difficult to promote and apply it in China's vast rural grassroots. Therefore, developing a greenhouse environment control system with low construction cost, simple operation, easy maintenance, and strong applicability is the key to improving the level of automation in China's facility agriculture. However, there is currently no such greenhouse environment control system with low construction cost, simple operation, easy maintenance, and strong applicability. Summary of the invention

[0003] The purpose of this application is to provide a greenhouse environment control system with the characteristics of low construction cost, simple operation and easy maintenance, and strong applicability.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] The present application provides a greenhouse environment control system, which includes a single-chip microcomputer minimum circuit and a temperature detection module, a soil moisture detection module, a light intensity detection module, a carbon dioxide detection module, a relay module and a stepper motor drive module connected to the single-chip microcomputer minimum circuit; the relay module is connected to a heater, a fan, a sprayer and a sunshade net; the stepper motor drive module is connected to a stepper motor of the sunshade net;

[0006] The temperature detection module is used to detect the temperature in the greenhouse in real time, and send the temperature to the single-chip minimum circuit; the soil moisture detection module is used to detect the soil moisture in the greenhouse in real time, and send the soil moisture to the single-chip minimum circuit; the light intensity detection module is used to detect the light intensity in the greenhouse in real time, and send the light intensity to the single-chip minimum circuit; the carbon dioxide detection module is used to detect the carbon dioxide concentration in the greenhouse in real time, and send the carbon dioxide concentration to the single-chip minimum circuit;

[0007] The single-chip computer minimum circuit is used to control the relay module to turn on the heater for heating and heating when the temperature is lower than the minimum temperature setting value, and to control the relay module to turn on the fan for ventilation and cooling when the temperature is higher than the maximum temperature setting value. It is also used to control the relay module to turn on the sprayer for spray humidification when the soil moisture is lower than the minimum soil moisture setting value, and to control the relay module to turn on the fan for ventilation and dehumidification when the soil moisture is higher than the maximum soil moisture setting value. It is also used to control the relay module to turn on the sunshade net when the light intensity is greater than the maximum light intensity setting value, and to control the stepper motor drive module to drive the stepper motor of the sunshade net to rotate forward and unfold the sunshade net for shading and avoiding light, and to control the stepper motor drive module to drive the stepper motor of the sunshade net to reverse when the light intensity is less than the minimum light intensity setting value, and to retract the sunshade net for supplementary light, and to control the relay module to close the sunshade net at the same time. It is also used to control the relay module to turn on the fan for ventilation and reduce the carbon dioxide concentration when the carbon dioxide concentration is higher than the maximum carbon dioxide concentration setting value.

[0008] Optionally, the greenhouse environment control system further includes a key module;

[0009] The key module is connected to the single-chip microcomputer minimum circuit; the key module is used to set the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, and send the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value to the single-chip microcomputer minimum circuit.

[0010] Optionally, the greenhouse environment control system further includes an LCD display module;

[0011] The LCD display module is connected to the single-chip microcomputer minimum circuit; the LCD display module is used to display the temperature sent to the single-chip microcomputer minimum circuit by the temperature detection module, and is also used to display the soil moisture sent to the single-chip microcomputer minimum circuit by the soil moisture detection module, and is also used to display the light intensity sent to the single-chip microcomputer minimum circuit by the light intensity detection module, and is also used to display the carbon dioxide concentration sent to the single-chip microcomputer minimum circuit by the carbon dioxide detection module.

[0012] Optionally, the button module detects the state change of the button, converts the state change into an electrical signal and sends it to the single-chip microcomputer minimum circuit to realize the threshold setting function and the interface switching function; the state change includes pressing and releasing; the threshold setting function is the function of setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value; the interface switching function is the function of switching the interface displayed on the LCD display module; the interface displayed on the LCD display module includes the interface for setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, and the interface for displaying the temperature, the soil moisture, the light intensity and the carbon dioxide concentration.

[0013] Optionally, the greenhouse environment control system further includes a power supply module;

[0014] The power supply module is connected to the minimum circuit of the single-chip microcomputer; the power supply module is used to supply power to the minimum circuit of the single-chip microcomputer.

[0015] Optionally, the greenhouse environment control system further includes an A / D converter;

[0016] The A / D converter is respectively connected to the light intensity detection module, the soil moisture detection module and the single-chip microcomputer minimum circuit; the A / D converter is used to perform analog-to-digital conversion on the light intensity in the greenhouse detected in real time by the light intensity detection module and then send it to the single-chip microcomputer minimum circuit, and is also used to perform analog-to-digital conversion on the soil moisture in the greenhouse detected in real time by the soil moisture detection module and then send it to the single-chip microcomputer minimum circuit.

[0017] Optionally, the single-chip microcomputer minimum circuit includes a single-chip microcomputer chip, a clock circuit, a power supply circuit and a reset circuit; the single-chip microcomputer chip is a STC89C52 single-chip microcomputer.

[0018] Optionally, the relay includes a heating relay, a ventilation relay, a humidification relay and a fill light relay;

[0019] The heating relay is connected to the heater; the heating relay is used to turn on or off the heater under the control of the single-chip microcomputer minimum circuit; the ventilation relay is connected to the fan; the ventilation relay is used to turn on or off the fan under the control of the single-chip microcomputer minimum circuit; the humidification relay is connected to the sprayer; the humidification relay is used to turn on or off the sprayer under the control of the single-chip microcomputer minimum circuit; the fill light relay is connected to the sunshade net; the fill light relay is used to turn on or off the sunshade net under the control of the single-chip microcomputer minimum circuit.

[0020] Optionally, the model of the heating relay, the ventilation relay, the humidification relay and the fill light relay is SRD-05.

[0021] Optionally, the model of the stepper motor drive module is ULN2003A.

[0022] According to the specific embodiments provided in this application, this application has the following technical effects:

[0023] The present application provides a greenhouse environment control system, which can realize automatic control of the environment in a greenhouse based on a single-chip microcomputer minimum circuit and a temperature detection module, a soil moisture detection module, a light intensity detection module, a carbon dioxide detection module, a relay module and a stepper motor drive module connected to the single-chip microcomputer minimum circuit. The whole system has low construction cost, simple operation and easy maintenance. The main control core of the single-chip microcomputer minimum circuit can connect to or replace different detection modules according to actual needs, and can connect and replace different controlled devices. It has the characteristics of scalability and strong applicability (i.e. adaptability), and can be adapted to various types of greenhouses. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 A schematic diagram of the structure of a greenhouse environment control system provided in one embodiment of the present application;

[0026] Figure 2 This is the minimum system schematic diagram of the single-chip microcomputer for this application;

[0027] Figure 3 This is the schematic diagram of the temperature detection module of this application;

[0028] Figure 4 This is a schematic diagram of the display module circuit of this application;

[0029] Figure 5 This is the circuit schematic diagram of the light intensity detection module of this application;

[0030] Figure 6 This is the schematic diagram of the ADC0832 analog-to-digital converter circuit of this application;

[0031] Figure 7 This is the principle diagram of the soil moisture detection module of this application;

[0032] Figure 8 This is the schematic diagram of the CO2 detection module of this application;

[0033] Fig. 9 This is the circuit schematic diagram of the stepper motor drive module of this application;

[0034] Fig.10 The schematic diagram of the relay module circuit of this application;

[0035] Fig.11 This is the schematic diagram of the key module of this application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0037] The purpose of this application is to provide a greenhouse environment control system with the characteristics of low construction cost, simple operation and easy maintenance, and strong applicability.

[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0039] like Figure 1 As shown, a greenhouse environment control system provided by the present application includes a single-chip microcomputer minimum circuit and a temperature detection module, a soil moisture detection module, a light intensity detection module, a carbon dioxide detection module, a relay module and a stepper motor drive module connected to the single-chip microcomputer minimum circuit; the relay module is connected to the heater, the fan, the sprayer and the sunshade net; the stepper motor drive module is connected to the stepper motor of the sunshade net.

[0040] The temperature detection module is used to detect the temperature in the greenhouse in real time and send the temperature to the minimum circuit of the single-chip microcomputer; the soil moisture detection module is used to detect the soil moisture in the greenhouse in real time and send the soil moisture to the minimum circuit of the single-chip microcomputer; the light intensity detection module is used to detect the light intensity in the greenhouse in real time and send the light intensity to the minimum circuit of the single-chip microcomputer; the carbon dioxide detection module is used to detect the carbon dioxide concentration in the greenhouse in real time and send the carbon dioxide concentration to the minimum circuit of the single-chip microcomputer.

[0041] The minimum circuit of the single-chip microcomputer is used to control the relay module to turn on the heater for heating when the temperature is lower than the minimum temperature setting value, and to control the relay module to turn on the fan for ventilation and cooling when the temperature is higher than the maximum temperature setting value. It is also used to control the relay module to turn on the sprayer for spray humidification when the soil moisture is lower than the minimum soil moisture setting value, and to control the relay module to turn on the fan for ventilation and dehumidification when the soil moisture is higher than the maximum soil moisture setting value. It is also used to control the relay module to turn on the sunshade net when the light intensity is greater than the maximum light intensity setting value, and at the same time control the stepper motor drive module to drive the stepper motor of the sunshade net to rotate forward, unfold the sunshade net for shading and avoiding light, and when the light intensity is less than the minimum light intensity setting value, control the stepper motor drive module to drive the stepper motor of the sunshade net to reverse, retract the sunshade net for supplementary light, and control the relay module to close the sunshade net. It is also used to control the relay module to turn on the fan for ventilation and reduce the carbon dioxide concentration when the carbon dioxide concentration is higher than the maximum carbon dioxide concentration setting value.

[0042] Among them, the minimum circuit of the single-chip microcomputer includes a single-chip microcomputer chip, a clock circuit, a power supply circuit and a reset circuit; the single-chip microcomputer chip is a STC89C52 single-chip microcomputer.

[0043] The relay includes a heating relay, a ventilation relay, a humidification relay and a fill light relay; the heating relay is connected to the heater; the heating relay is used to turn on or off the heater under the control of the single-chip microcomputer minimum circuit; the ventilation relay is connected to the fan; the ventilation relay is used to turn on or off the fan under the control of the single-chip microcomputer minimum circuit; the humidification relay is connected to the sprayer; the humidification relay is used to turn on or off the sprayer under the control of the single-chip microcomputer minimum circuit; the fill light relay is connected to the sunshade net; the fill light relay is used to turn on or off the sunshade net under the control of the single-chip microcomputer minimum circuit. The model of the heating relay, ventilation relay, humidification relay and fill light relay is SRD-05.

[0044] The model of the stepper motor driver module is ULN2003A.

[0045] In addition, the greenhouse environment control system also includes a key module, an LCD display module, a power supply module and an A / D converter.

[0046] Among them, the key module is connected to the minimum circuit of the single-chip microcomputer; the key module is used to set the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, and send the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value to the minimum circuit of the single-chip microcomputer.

[0047] The LCD display module is connected to the single-chip microcomputer minimum circuit; the LCD display module is used to display the temperature sent to the single-chip microcomputer minimum circuit by the temperature detection module, and is also used to display the soil moisture sent to the single-chip microcomputer minimum circuit by the soil moisture detection module, and is also used to display the light intensity sent to the single-chip microcomputer minimum circuit by the light intensity detection module, and is also used to display the carbon dioxide concentration sent to the single-chip microcomputer minimum circuit by the carbon dioxide detection module.

[0048] The key module detects the state change of the key, converts the state change into an electrical signal and sends it to the minimum circuit of the single-chip microcomputer to realize the threshold setting function and the interface switching function; the state change includes pressing and releasing; the threshold setting function is the function of setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value; the interface switching function is the function of switching the interface displayed on the LCD display module; the interface displayed on the LCD display module includes the interface for setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, as well as the interface for displaying temperature, soil moisture, light intensity and carbon dioxide concentration.

[0049] The power supply module is connected to the minimum circuit of the single-chip microcomputer; the power supply module is used to supply power to the minimum circuit of the single-chip microcomputer.

[0050] The A / D converter is connected to the light intensity detection module, the soil moisture detection module and the single-chip microcomputer minimum circuit respectively; the A / D converter is used to perform analog-to-digital conversion on the light intensity in the greenhouse detected in real time by the light intensity detection module and then send it to the single-chip microcomputer minimum circuit, and is also used to perform analog-to-digital conversion on the soil moisture in the greenhouse detected in real time by the soil moisture detection module and then send it to the single-chip microcomputer minimum circuit.

[0051] The technical solution of this application is described below with a specific embodiment:

[0052] This application provides a Figure 1The greenhouse environment control system shown. In order to realize the functions of low construction cost, simple operation and easy maintenance, and strong applicability of the system, this application adopts a single-chip microcomputer as the main control core (i.e., the main control chip), uses a liquid crystal display module (i.e., LCD display module) to display real-time data, uses a temperature and humidity sensor (i.e., a temperature detection module and a soil moisture detection module) to monitor the temperature and humidity parameters in the greenhouse in real time, and uses a relay module (i.e., a relay control module) to realize the start and stop of the execution equipment, such as heaters, fans, sprayers, and sunshade nets. On the premise of meeting the design requirements and being economical, this application selects the following main equipment to constitute a greenhouse environment control system, as shown in Table 1:

[0053] Table 1 Main equipment and their models

[0054] Serial number name model 1 Control Core STC89C52 MCU 2 Display Module LCD1602 Liquid Crystal Display 3 Light detection module 5516 4 Temperature sensor module DS18B20 5 Relay Module SRD-05 6 Soil moisture detection module YL69 7 <![CDATA[CO2 detection module]]> SGP30

[0055] The control core (i.e., single-chip microcomputer chip), display module (i.e., LCD display module), light detection module (i.e., light intensity detection module), temperature sensor module (i.e., temperature detection module), relay module, soil moisture detection module, CO2 detection module (i.e., carbon dioxide detection module), stepper motor drive module, and key module that constitute the greenhouse environment control system are common Internet of Things modules on the market, that is, this application uses the currently existing single-chip microcomputer minimum circuit, temperature detection module, soil moisture detection module, light intensity detection module, carbon dioxide detection module, relay module, stepper motor drive module, key module, LCD display module, power supply module, and A / D converter that are common on the market to constitute the greenhouse environment control system, and this application does not make any changes to their respective circuits. The following is a detailed introduction to the various structures that constitute the greenhouse environment control system of this application:

[0056] 1. Control core (i.e. main control circuit module):

[0057] As a low-power and high-performance CMOS 8-bit controller, STC89C52 has 8K programmable Flash memory, 512 bytes RAM, 32-bit I / O lines, watchdog timer, built-in 4KBEEPROM, MAX810 reset circuit, three 16-bit timers / counters, a 6-vector 2-level interrupt structure, and a full-duplex serial port. It is also relatively cheap, suitable for cost-sensitive applications, easy to use, and has a wide range of application support and information for reference.

[0058] The STC89C52 microcontroller is a high-performance microcontroller based on the 8051 core. It has rich functions and a wide range of applications. In the greenhouse environment detection system of this application, the STC89C52 microcontroller undertakes the following main functions:

[0059] (1) Data acquisition and processing: The STC89C52 microcontroller is connected to the sensor module (such as temperature and photoresistor) through GPIO pins and analog input pins. It is responsible for collecting sensor data and processing and analyzing the data.

[0060] (2) Control and regulation: Based on the collected data, the STC89C52 microcontroller is connected to the relay circuit of the actuator (heater, fan, sprayer, stepper motor) through the GPIO pin, and is responsible for controlling and regulating parameters such as temperature, humidity and light in the greenhouse to achieve automated environmental control.

[0061] (3) User interaction: The STC89C52 microcontroller is connected to the buttons and LCD display through the GPIO pins to achieve interaction with the user. Parameters such as threshold and fill light time can be set through buttons, and the monitored temperature, humidity, light and other data can be displayed on the LCD screen.

[0062] The single-chip microcomputer minimum circuit refers to the most basic and simplest circuit configuration in the single-chip microcomputer system, which usually includes the single-chip microcomputer chip, clock circuit, power supply circuit and reset circuit. Among them, the single-chip microcomputer is the core of the system, responsible for controlling and executing programs. It contains CPU, memory, input and output interfaces, etc., and can realize preset calculation and control operations; the crystal oscillator circuit provides the clock signal of the single-chip microcomputer, so that the single-chip microcomputer can execute instructions and operations according to a certain time sequence; the reset circuit is used to initialize the single-chip microcomputer when power is turned on or reset, and ensure that the system starts from a known state. The reset circuit usually includes power reset and external reset; the power supply circuit provides a stable power supply voltage for the entire system to enable the single-chip microcomputer and other components to work normally. The schematic diagram of the single-chip microcomputer minimum system (i.e., the single-chip microcomputer minimum circuit) of this application is as follows Figure 2 As shown, Figure 2 Part (a) shows the microcontroller reset circuit. Figure 2 Part (b) shows the crystal oscillator circuit of the microcontroller. Figure 2 Part (c) indicates the data upload and download port of the microcontroller. Figure 2 Part (d) shows the microcontroller power supply circuit. Figure 2 Part (e) represents the microcontroller circuit.

[0063] 2. Temperature sensor module (i.e. temperature detection module circuit):

[0064] The temperature detection module DS18B20 has high temperature measurement accuracy, a resolution of 0.5°C, and low measurement error. It can communicate through a digital interface without the need for analog-to-digital conversion, so it can be more conveniently integrated with a single-chip microcomputer. It also supports long-line transmission, so the sensor can be installed away from the control circuit, providing greater flexibility.

[0065] The main function of the DS18B20 temperature detection module is to measure the ambient temperature and convert the temperature value into a digital signal and output it to the microcontroller. The VCC pin of the DS18B20 is connected to the positive power supply of the microcontroller, the GND is connected to the ground of the microcontroller, and the I / O pin is connected to the I / O port of the microcontroller for data transmission and communication. In this application, the No. 2 I / O pin of the temperature detection module is connected to the P33 pin of the microcontroller. By configuring the corresponding pins as input and output in the microcontroller program and using the single bus protocol for communication, the DS18B20 temperature detection module can be controlled and data read. The schematic diagram of the temperature detection module is shown below. Figure 3 shown.

[0066] 3. Display module (i.e. display module circuit):

[0067] The LCD1602 display module is a commonly used character liquid crystal display device, which is mainly composed of LCD, drive circuit and extended drive circuit. It can display up to 2 lines of 16 characters, with an operating voltage of 5V, an 8-bit data bus and 3 control ports. It has low cost and good readability and anti-interference ability.

[0068] The single-chip microcomputer can control the pin signals of the LCD1602 display module to send data and commands to the display module to control the content displayed on the LCD screen. The DB0-DB7 pins of the display module are used to transmit data; the RS pin is used to select whether to send commands or data; the RW pin is used to select whether it is a read or write operation; the E pin is used to control data transmission and read and write operations; the BL pin is connected to the backlight control line to control the backlight switch; the D0 to D2 pins are data lines for transmitting data. The single-chip microcomputer transmits the characters or commands to be displayed to the LCD1602 display module through the D4 to D7 pins. After receiving the data sent by the single-chip microcomputer, the display module performs corresponding operations according to the commands. The schematic diagram of the display module is shown as follows Figure 4 shown.

[0069] 4. Light detection module (i.e. light intensity module circuit):

[0070] The 5516 photoresistor uses the LM393 voltage comparator. When the voltage at the positive input is greater than the negative input, the output is high. When the voltage at the negative input is greater than the voltage at the positive input, the output is low. Because the sensor is normally open, when no light is detected, the sensor is disconnected, the voltage at the LM393 positive input is greater than the inverting input, and the output is high. When light is detected, the sensor is turned on, the voltage at the inverting input is greater than the positive input, and the output is low. The 5516 photoresistor has high accuracy and sensitivity, is compact, and has a wide range of applications.

[0071] The 5516 photoresistor changes its resistance value by sensing the intensity of light. The light intensity is negatively correlated with the resistance value. The 5516 photoresistor outputs an analog signal, so it must be used in conjunction with the ADC0832 analog-to-digital converter (i.e., A / D converter). One pin of the 5516 photoresistor is connected to a positive voltage supply, and the other pin is connected to the input pin CH0 of ADC0832. The DI pin of ADC0832 is connected to the IO port of the microcontroller for serial data input. The DO pin is connected to the IO port of the microcontroller for serial data output. The CS pin is connected to the IO port of the microcontroller for chip select input, which puts ADC0832 into working mode. The output pin of the 5516 photoresistor is connected to the CH0 pin of ADC0832, and the analog light signal is input to ADC0832 for analog-to-digital conversion. ADC0832 converts the analog signal into a digital signal and outputs it to the microcontroller through the DO pin for processing. The microcontroller sends a serial data request to the DI pin of ADC0832 through the P16 pin to obtain the digital data of light intensity and make judgments based on the digital data of light intensity. When the light intensity is greater than the set maximum value, the control pin outputs a high level to start the forward rotation of the stepper motor of the sunshade net. When the light intensity is less than the set minimum value, the control pin outputs a low level to start the reverse rotation of the stepper motor of the sunshade net. The light intensity detection module circuit is as follows Figure 5 The ADC0832 analog-to-digital converter circuit is shown in Figure 6 shown.

[0072] 5. Soil humidity detection module (i.e. soil humidity detection module circuit):

[0073] The working principle of the YL69 soil moisture sensor is that soil conductivity is affected by soil moisture content. The two electrodes of the sensor are inserted into the soil to detect changes in conductivity, and then output a proportional analog voltage through a series voltage divider circuit.

[0074] The main function of the soil humidity detection module is to measure soil humidity and convert the humidity value into an analog signal and output it to the analog input channel of the CH0 pin of ADC0832. The microcontroller determines whether the soil humidity is lower than the set minimum value or higher than the set maximum value by reading the converted value. According to the change of humidity value, the corresponding water pump can be used to add water or the fan can be used to dehumidify. The schematic diagram of the soil humidity detection module is shown in the figure. Figure 7 shown.

[0075] 6.CO2 detection module (i.e. CO2 detection module circuit):

[0076] The main working principle of the SGP30 CO2 concentration sensor is that reducing gas will reduce the oxygen concentration on the surface of the sensor's gas-sensitive material and thus change the semiconductor resistance value. The resistance is then detected, signal processed and converted through the circuit (ASIC) to finally obtain the gas value.

[0077] The main function of the SGP30 CO2 detection module is to measure the CO2 concentration in the environment and provide CO2 concentration data for the microcontroller to use through communication with the microcontroller. The SGP30 CO2 detection module uses a sensor chip to measure the CO2 concentration in the environment. The sensor chip contains a series of chemical sensors that react with gases in the environment to generate measurable electrical signals. The SGP30 CO2 detection module outputs CO2 concentration data through the I2C communication protocol with the microcontroller. Its SDA pin is connected to the data line of the I2C bus of the microcontroller for data transmission and communication. The SCL pin is connected to the clock line of the I2C bus of the microcontroller for synchronous data transmission. In this application, this pin should be connected to the P24 pin of the microcontroller. By configuring the corresponding pins as the I2C communication interface in the microcontroller program and using the I2C protocol for communication, data interaction with the SGP30 CO2 detection module can be achieved. According to the CO2 concentration value read, it can be determined whether it is higher than the set maximum value and trigger the corresponding control operation. The schematic diagram of the CO2 detection module is as follows Figure 8 shown.

[0078] 7. Stepper motor module (i.e. stepper motor drive module) circuit:

[0079] The stepper motor is composed of multiple electromagnetic coils, each of which generates a magnetic field. By activating these coils in sequence, the motor can be rotated to a certain angle. The stepper motor achieves precise angular displacement by changing the activation order and timing of the coils according to the changes in the input electrical signal. The IN1-IN4 pins of the stepper motor driver module ULN2003A need to be connected to the P34-P37 pins of the microcontroller to receive the pulse signal output by the microcontroller and control the movement of the stepper motor (the function of the stepper motor module is to drive the stepper motor of the sunshade net to achieve the movement of the sunshade net). At the same time, the output terminals OT1-OT4 of IN1-IN4 of the stepper motor driver module ULN2003A need to be connected to the corresponding coils of the stepper motor to control the activation of the coils. By controlling the input terminal of the driver module through the signal output by the microcontroller, precise control of the stepper motor can be achieved. The schematic diagram of the stepper motor module is as follows Fig. 9 shown.

[0080] 8. Relay module circuit:

[0081] In this application, in addition to the temperature detection module, soil moisture detection module and CO2 detection module, four relays are also used to control heating, ventilation, water addition and fill light and other execution devices. The relay module is mainly used to control the switching of different devices or circuits to achieve control of the execution equipment. Its working principle is to control the opening and closing of the main contacts by controlling the on and off of the electromagnetic coil. The VCC pin of the relay is connected to the positive pole of the power supply, the GND pin is connected to the GND of the microcontroller, and the control signal pin is connected to the I / O port of the microcontroller to control the switching operation of the relay. In this application, four relays (ie, four relay modules) are required to control heating, ventilation, water addition and fill light respectively. The schematic diagram of the relay module is as follows Fig.10 As shown, since the four relay module circuit diagrams are essentially the same, that is, the same schematic diagram, Fig.10 Only one relay module circuit diagram is shown as a schematic.

[0082] 9. Button module circuit:

[0083] The key module is used to receive the user's key operations and transmit the key information to the single-chip microcomputer for corresponding processing. The key module can detect the state changes of the key, such as pressing and releasing, and convert these state changes into electrical signals, which are connected to the single-chip microcomputer through pins. In the present application, the key module is used to implement threshold setting and interface switching functions. Among them, the K1 pin is connected to the P20 pin of the single-chip microcomputer for switching the display interface; the K2 pin is connected to the P21 of the single-chip microcomputer for setting the value +1 operation in the interface for setting parameters; the K3 pin is connected to the P22 pin of the single-chip microcomputer for setting the value -1 operation in the interface for setting parameters. The schematic diagram of the key module is as follows Fig.11 shown.

[0084] Compared with the currently available greenhouse environment control systems, the greenhouse environment control system provided by this application is scalable. The main control core can connect to or replace different detection modules according to actual needs, and can connect and replace different controlled devices, making it more adaptable.

[0085] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A greenhouse environment control system, characterized in that: The greenhouse environment control system includes a single-chip microcomputer minimum circuit and a temperature detection module, a soil moisture detection module, a light intensity detection module, a carbon dioxide detection module, a relay module and a stepper motor drive module connected to the single-chip microcomputer minimum circuit; the relay module is connected to the heater, the fan, the sprayer and the sunshade net; the stepper motor drive module is connected to the stepper motor of the sunshade net; The temperature detection module is used to detect the temperature in the greenhouse in real time, and send the temperature to the single-chip microcomputer minimum circuit; the soil moisture detection module is used to detect the soil moisture in the greenhouse in real time, and send the soil moisture to the single-chip microcomputer minimum circuit; The light intensity detection module is used to detect the light intensity in the greenhouse in real time, and send the light intensity to the single-chip minimum circuit; the carbon dioxide detection module is used to detect the carbon dioxide concentration in the greenhouse in real time, and send the carbon dioxide concentration to the single-chip minimum circuit; The single-chip computer minimum circuit is used to control the relay module to turn on the heater for heating and heating when the temperature is lower than the minimum temperature setting value, and to control the relay module to turn on the fan for ventilation and cooling when the temperature is higher than the maximum temperature setting value. It is also used to control the relay module to turn on the sprayer for spray humidification when the soil moisture is lower than the minimum soil moisture setting value, and to control the relay module to turn on the fan for ventilation and dehumidification when the soil moisture is higher than the maximum soil moisture setting value. It is also used to control the relay module to turn on the sunshade net when the light intensity is greater than the maximum light intensity setting value, and to control the stepper motor drive module to drive the stepper motor of the sunshade net to rotate forward and unfold the sunshade net for shading and avoiding light, and to control the stepper motor drive module to drive the stepper motor of the sunshade net to reverse when the light intensity is less than the minimum light intensity setting value, and to retract the sunshade net for supplementary light, and to control the relay module to close the sunshade net at the same time. It is also used to control the relay module to turn on the fan for ventilation and reduce the carbon dioxide concentration when the carbon dioxide concentration is higher than the maximum carbon dioxide concentration setting value.

2. The greenhouse environment control system according to claim 1, characterized in that: The greenhouse environment control system also includes a key module; The key module is connected to the single-chip microcomputer minimum circuit; the key module is used to set the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, and send the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value to the single-chip microcomputer minimum circuit.

3. The greenhouse environment control system according to claim 2, characterized in that: The greenhouse environment control system also includes an LCD display module; The LCD display module is connected to the single-chip microcomputer minimum circuit; the LCD display module is used to display the temperature sent to the single-chip microcomputer minimum circuit by the temperature detection module, and is also used to display the soil moisture sent to the single-chip microcomputer minimum circuit by the soil moisture detection module, and is also used to display the light intensity sent to the single-chip microcomputer minimum circuit by the light intensity detection module, and is also used to display the carbon dioxide concentration sent to the single-chip microcomputer minimum circuit by the carbon dioxide detection module.

4. The greenhouse environment control system according to claim 3, characterized in that: The key module detects the state change of the key, converts the state change into an electrical signal and sends it to the single-chip microcomputer minimum circuit to realize the threshold setting function and the interface switching function; the state change includes pressing and releasing; the threshold setting function is the function of setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value; the interface switching function is the function of switching the interface displayed on the LCD display module; the interface displayed on the LCD display module includes the interface for setting the minimum temperature setting value, the maximum temperature setting value, the minimum soil moisture setting value, the maximum soil moisture setting value, the maximum light intensity setting value, the minimum light intensity setting value and the maximum carbon dioxide concentration setting value, and the interface for displaying the temperature, the soil moisture, the light intensity and the carbon dioxide concentration.

5. The greenhouse environment control system according to claim 1, characterized in that: The greenhouse environment control system also includes a power supply module; The power supply module is connected to the minimum circuit of the single-chip microcomputer; the power supply module is used to supply power to the minimum circuit of the single-chip microcomputer.

6. The greenhouse environment control system according to claim 1, characterized in that: The greenhouse environment control system also includes an A / D converter; The A / D converter is respectively connected to the light intensity detection module, the soil moisture detection module and the single-chip microcomputer minimum circuit; the A / D converter is used to perform analog-to-digital conversion on the light intensity in the greenhouse detected in real time by the light intensity detection module and then send it to the single-chip microcomputer minimum circuit, and is also used to perform analog-to-digital conversion on the soil moisture in the greenhouse detected in real time by the soil moisture detection module and then send it to the single-chip microcomputer minimum circuit.

7. The greenhouse environment control system according to claim 1, characterized in that: The single-chip microcomputer minimum circuit includes a single-chip microcomputer chip, a clock circuit, a power supply circuit and a reset circuit; the single-chip microcomputer chip is a STC89C52 single-chip microcomputer.

8. The greenhouse environment control system according to claim 1, characterized in that: The relays include a heating relay, a ventilation relay, a humidification relay and a fill light relay; The heating relay is connected to the heater; the heating relay is used to turn on or off the heater under the control of the single-chip microcomputer minimum circuit; the ventilation relay is connected to the fan; the ventilation relay is used to turn on or off the fan under the control of the single-chip microcomputer minimum circuit; the humidification relay is connected to the sprayer; the humidification relay is used to turn on or off the sprayer under the control of the single-chip microcomputer minimum circuit; the fill light relay is connected to the sunshade net; the fill light relay is used to turn on or off the sunshade net under the control of the single-chip microcomputer minimum circuit.

9. The greenhouse environment control system according to claim 8, characterized in that: The model of the heating relay, the ventilation relay, the humidification relay and the fill light relay is SRD-05.

10. The greenhouse environment control system according to claim 1, characterized in that: The model of the stepper motor driver module is ULN2003A.