Aiming at the low degree of automation and waste of water resources in traditional greenhouse vegetable greenhouse in Northwest China, an automatic sprinkler irrigation controller based on single chip computer was designed. The system has the functions of threshold setting, real-time detection, thermostatic element over-limit alarm, intelligent adjustment and so on. Through the application example, the system has the advantages of low maintenance cost, good use effect and simple operation.
It can meet the daily needs of small and medium-sized vegetable greenhouse growers for water-saving irrigation, improve production efficiency and have certain economic benefits. In arid and semi-arid areas of Northwest China, groundwater resources are relatively scarce, coupled with the impact of climate, uneven distribution of rainfall, leading to seasonal water shortage in some areas. The Decision on Accelerating the Reform and Development of Water Conservancy, No. 1 of the Central Committee of China in 2011, put forward that the lag of the construction of farmland water conservancy facilities has affected the steady development of agricultural development in China. In the future, 4 trillion yuan will be invested in the construction of farmland water conservancy facilities, and the promotion and application of water-saving irrigation technology in agricultural production will be accelerated [1]. At present, with the continuous improvement of manufacturing industry, information technology and mechanical and electrical equipment manufacturing level and the continuous popularization of greenhouse planting technology, automatic and intelligent water-saving irrigation equipment is increasingly widely used in vegetable planting greenhouse. After years of research and development and promotion, a large number of powerful automatic irrigation control systems have been put into use. However, these systems are generally expensive, complex in function, difficult in operation and high in maintenance cost, which makes most small and medium-sized farmers hesitate [2]. Therefore, the design of an automatic sprinkler irrigation controller for vegetable greenhouse with low price, sufficient functions and simple maintenance can meet the needs of most small and medium-sized farmers engaged in greenhouse vegetable cultivation, and has broad promotion significance and social benefits. The system can automatically and real-time detect soil moisture, according to the needs of different crops for soil moisture, set the threshold through keyboard, when soil moisture exceeds the set value, automatically open the submersible pump to sprinkle irrigation on crops, until the maximum soil moisture meets the needs of crops, close the pump; during the sprinkler irrigation process, the indicator lights up, after the end of sprinkler irrigation finger. The indicator is turned off so that the staff can get the working state of the pump in time. The system has three working states: automatic, manual and stopping. The three-position switching switch SA is used to complete the switching of various states. The “stop” working state is used when the system is not working. The “manual” working state is used in the process of debugging and maintenance of equipment. It can also be used to temporarily open the system according to the special needs of the staff. The “automatic” working state is also used. The state is used in the daily operation of the system and the normal growth of crops to realize the automatic operation and unattended of sprinkler irrigation in vegetable greenhouse [4]. The core controller of the system is STC89C52 microcontroller, the detection module is soil moisture sensor, and the actuator is a micro submersible pump (or centrifugal pump) with a head of 2 meters. After the system is powered on, all modules of the system are electrified, and the green indicator lights up, which indicates that the staff system is in a waiting state.
After that, the detection part can automatically detect the data information of soil moisture and transmit it to the controller in real time. The staff can set the upper and lower thresholds of soil moisture in advance through the keyboard, and the MCU can continuously set them with the set values. When the soil moisture is too low, that is, when the soil is short of water, the MCU sends out instructions to drive the submersible pump (or centrifugal pump) to work. At the same time, the red indicator lights up, reminding the staff that the system is working at present. After a period of irrigation, when the soil moisture reaches the maximum moisture required by crops, the MCU sends out instructions. Stop the submersible pump (or centrifugal pump) working, and the red indicator lights out, the green indicator lights up again, and the system returns to the waiting state. The system structure block diagram is shown in Figure 1. STC89C52 microcontroller produced by Hongjing Company has the characteristics of high performance, low power consumption, fast running speed, and can be fully compatible with 51 microcontroller. This type of microcontroller has 8-bit CPU to provide operation and control functions for the system. Four parallel I/O ports can be used as input/output ports [5]. RAM RAM has 256 bytes of capacity and can be extended to 64KB to store intermediate results and temporary data. ROM user memory has 8KB capacity and can be extended to 64KB for program storage. Universal registers are set up in RAM area for temporary data [6]. It also has six interrupt sources such as T/C0, T/C1, T/C2, serial interrupt, INT0, INT1, four internal interrupt sources such as T/C0, T/C1, T/C2 and serial interrupt, and three timing counters such as T/C0, T/C1 and T/C2 [7]. This type of MCU has powerful functions and can fully meet the needs of the system control function. The system uses a small sensor with DO output. In order to improve the conductivity of the device, the surface of the device is treated with nickel plating and widened. This process can not only prevent the device from rusting due to the transition contact with soil, but also effectively prolong the service life of the device. The sensing part can detect soil moisture in a wide range, convert it into electrical signals, and control the corresponding threshold through potentiometer regulation (that is, how wet is wet, which is often called sensitivity).
When the humidity is lower than the set value, DO outputs a high level. When the humidity is higher than the set value, DO outputs a low level. If the p2.3 port of MCU detects a high level [8]. ] It means that the humidity is low and water should be replenished. If the low level is detected, it means that the humidity is high and no replenishment is needed. The system controls the soil moisture by switching quantity, connects directly with the I/O port of the single chip computer, and detects the high and low level of the soil moisture by the single chip computer. The physical object is shown in Fig. 2, and the interface circuit with the single chip computer is shown in Fig. 3. Considering the characteristics of water-saving irrigation and the structure of greenhouse vegetable greenhouse, FL6208 type adjustable copper sprinkler AC pump is used as sprinkler irrigation execution equipment. Its performance characteristics are shown in Table 1. It should be noted that the outlet and the inlet are different from each other. The direction of arrow on the pump is the outlet. The water pipe can not be connected back, otherwise the pump will burn out. The control part of the system is composed of single chip computer, sensor and so on. The working voltage is mostly 5V. Therefore, the power supply module of the system uses self-made power supply to supply power for each module.
Its realization method is to change 220 V AC into 5V DC after voltage conversion, rectification, filtering and voltage stabilization, and to supply power for the controller, sensor and weak part. The power supply circuit design is shown in Figure 4. In the system, the operating voltage of the executing equipment and the indicator lamp is 220 V AC, and that of the controller is 5 V. Therefore, it is necessary to isolate the executing equipment from the controller to ensure the normal operation of the system [10]. G3MB2O2P solid state relay has the characteristics of high security, no arc when the circuit is on and off, and high insulation resistance between input and output terminals. It is an ideal equipment for strong and weak electric isolation. Because of topography, light, soil properties and other factors, greenhouse vegetable greenhouse greenhouse greenhouse greenhouse mostly sits in the north and south, using earth wall or brick wall with steel structure, so reasonable design of pipeline assembly system will help to play the largest role of water-saving irrigation [11], greenhouse structure and pipeline configuration sketch map as shown in Fig. 5. According to the width of vegetable planting greenhouse, arrange some branch pipelines along its length direction. Valve 1 is the main valve of trunk road, which opens or closes manually. It is used to open and close pipelines without irrigation task or when the whole pipeline network stops for maintenance, installation and debugging for a certain period of time. Valves 2 and 5 are solenoid valves of each branch, which are used in automatic mode. The valves 3, 4, 6 and 7 are manual valves of each branch for replacing solenoid valves or closing the branch when there is no irrigation task. According to the control requirements, the system adopts the idea of combining multiple subprogram modules. After power-on, the main program first initializes, then enters the parameter preset subroutine, uses the keyboard to set or read the upper and lower limits of the humidity requirements of the planted crops, and then systematically detects the current soil humidity, compares it with the set values and obtains the results. If the current soil humidity is lower than the set minimum value, the pump will be driven to move and the water pump will be driven. Turn on the solenoid valve and drive the alarm subroutine to light the red indicator and turn off the green indicator until the current value reaches the set maximum and stops. If it is not lower than the set minimum value, the output instruction lights up the green indicator and measures the current value again after a delay, so the cycle.
The program flow chart is shown in Figure 6. The control system was designed and manufactured in March 2015, and tested and applied in a small greenhouse vegetable greenhouse in Dazhai Town, Yangling Demonstration Zone. The greenhouse is 50 m long and 5.8 m wide. It mainly planted tomatoes out of season.
According to the needs of crop growth and the coverage area of sprinkler irrigation equipment, a main pipe is laid along the length direction near the middle line of the greenhouse, and a sprinkler is laid every 4 m, with a total of 12 sprinklers. Pump selection submersible pump is installed in the water tank outside the greenhouse. The control box is installed in the control room. The controller is connected with the conductor and the solenoid valve through the conductor. The prototype is shown in Fig. 7. In order to test whether the measured data of the sensor is normal and whether the accuracy meets the requirements, we make the controller work in the automatic mode, and at the same time, through the instrument to intervene in the field environment artificially to raise its temperature, and carry out manual measurement to compare the error with the automatic measurement. The performance test data of the soil moisture sensor is shown in Table 1, the test table. It is clear that the maximum error of humidity detection and manual detection in the control system is 2, and the minimum error is – 1, and the error is small. After one year’s test and operation, the system can set up and precisely sprinkle irrigation the soil moisture required by various crops, so as to ensure that the soil moisture in the greenhouse meets the needs of the crops planted, accurately control the growth of crops, and greatly improve the survival rate of crops, reduce labor costs and save water resources. In addition, the system is cheap, easy to operate, easy to maintain and install, and can meet the needs of small and medium-sized vegetable greenhouse growers, which is greatly welcomed by users.