Applied Science and Innovative Research ISSN 2474-4972 (Print) ISSN 2474-4980 (Online) Vol. 7, No. 2, 2023 www.scholink.org/ojs/index.php/asir 52 Original Paper Design of Smart Agricultural Monitoring and Management System Zhang Bin1, Lin Xiaodan1 & Jiao Renlei2 1 College of Mechanical and Electrical Engineering, Tarim University, Aral, China 2 Aerospace Stellar Technology Co., Ltd, Beijing, China Received: March 2, 2023 Accepted: March 18, 2023 Online Published: March 23, 2023 doi:10.22158/asir.v7n2p52 URL: http://doi.org/10.22158/asir.v7n2p52 Abstract One of the important contents of China’s agricultural construction is vegetable planting, and most of the vegetable planting technology is relatively backward. The commonly used greenhouse planting technology is simply using special mechanical planting management methods, which cannot realize real-time monitoring of crop growth. In order to optimize the crop growth environment and improve the yield, a smart agricultural monitoring and management system based on PLC and MCGS configuration technology is designed. The system combines PLC technology, configuration technology and sensor technology to complete the overall structure design of the control system, and separately explains the hardware design, software design and operation and debugging of the system. The experimental results show that the system can remotely monitor and control the growing environment of crops, such as soil moisture, gas temperature and humidity, light intensity and other parameters, and the operation and maintenance are convenient, which provides a reference method for the intelligent development of agriculture. Keywords PLC, smart agriculture, MCGS, Remote monitoring 1. Introduction Some areas are arid and have plenty of sunshine. Especially in autumn and winter, the climate is dry and the temperature difference is large, which seriously restricts the planting of crops. With the continuous development of society, in order to meet the supply of vegetables in the region, the vegetable cultivation method has changed from traditional outdoor type to greenhouse cultivation. Although the impact of external environmental factors on crops is greatly reduced, most greenhouses still use simple means such as light and insulation materials to control the growth of crops, and cannot www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 53 Published by SCHOLINK INC. achieve precise control and realization to monitor the various environmental factors required by the crop. In order to solve the above problems, this experiment based on PLC and MCGS configuration technology, designed a smart agricultural monitoring and management system, which not only has the function of real-time monitoring of soil moisture, air temperature and humidity, and light intensity in the shed, but also can be remotely adjusted and controlled according to the set value of the touch screen, and then drive the cold and hot fans, sunshades, ventilation fans, sprinkler irrigation equipment, drip irrigation equipment, fill lights and other equipment, which can realize the automatic control of the crop greenhouse production environment. 2. Overall System Design This smart agriculture monitoring and management system needs to monitor the growth environment values of crops in real time, mainly including air temperature and humidity, light intensity, soil moisture, etc. According to the management and monitoring and control functions that the system can achieve, the overall structure design of the smart agricultural monitoring and management system is shown in Figure 1, and the composition of the system is mainly summarized into three parts, namely data collection, data processing and execution agencies. Figure 1. Overall System Design Data acquisition part: mainly rely on sensors (air temperature and humidity sensor, light intensity sensor, soil moisture sensor) to convert the collected environmental values (temperature value, humidity value, light value) into electrical signals, and then convert the electrical signals into digital signals through the analog module EM235 to transmit to the PLC, and wait in the data storage area inside the PLC to prepare for the program and further data analysis and processing. Data processing part: It is the core of the smart agricultural monitoring and management system, which is mainly composed of PLC and touch screen. PLC is mainly responsible for receiving the collected data information and performing calculation processing through the program, and transmitting a part of the operation results to the actuator to control the operation of each executive component; Part of it is transmitted to the touch screen for real-time display and monitoring of various parameters and equipment operating status, and the touch screen can also control the operation of the actuator through www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 54 Published by SCHOLINK INC. the setting of the configuration screen button. Actuator: It is the terminal of this system and belongs to the lower computer part of the system. It mainly includes cold and hot fans, fill lights, ventilation fans, sun blinds, drip irrigation equipment, sprinkler irrigation equipment, etc., which complete the operation of each mechanism by receiving PLC and touch screen instructions respectively, and finally achieve accurate control of the crop growth environment. 3. Hardware Design 3.1 Hardware Selection 3.1.1 PLC PLC as a programmable logic controller, widely used in industrial production, it has the advantages of stable operation, strong control function, high reliability and convenient maintenance, so through the combing and analysis of its control system, clarify the number of control objects and actuators of the system, and select Siemens series PLC as the control unit. At the same time, according to the control function that this management system can achieve, determine the number of I/O points of the PLC it needs, comprehensively consider the performance of the PLC, price and other factors, and determine the selection of the S7-200 series CPU226 model, which can basically meet the functional requirements of the system. 3.1.2 Sensor According to the function of the system and the growth environment factor of the crop, the system mainly requires 4 types of sensors, which are to monitor the air temperature and humidity, soil moisture and illuminance sensor of the greenhouse, and its output current is 4~20 mA or output DC voltage 0~10 V, and it is required to have certain moisture-proof, anti-corrosion and waterproof functions. Among them, the sensor used to monitor air temperature and humidity is the RS-WS-120-1A-5 of Jianda Renke, and its temperature detection range is -40°C~+80°C, measurement accuracy of ±0.5°C; The humidity detection range is 0%~100%RH, and the measurement accuracy is ±3%RH. The sensing model used to monitor soil moisture is RS-WS-120-TR of Jianda Renke, which has a humidity detection range of 0%~100%RH and a measurement accuracy of ±3%RH. The sensor used to monitor the light intensity is VMS-3002-GZ-N01-65535, which has a light intensity detection range of 0~200,000 Lux and a measurement accuracy of ±5%. 3.1.3 Expansion Modules After the sensor collects data (temperature, humidity, light intensity, etc.), and then converts the physical quantity of the corresponding data into a standard electrical signal, the electrical signal is an analog value, and the PLC cannot directly receive the analog signal. Therefore, the expansion module EM235 needs to convert it into a digital signal, which is then passed to the PLC for processing. Since there are four analog inputs in the monitoring system, the Siemens EM235 analog input module is selected for the acquisition of analog signals of the system. www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 55 Published by SCHOLINK INC. 3.1.4 Touch Screen The touch screen has the outstanding characteristics of powerful function, simple operation, friendly human-computer interaction and easy maintenance. At the same time, it can be combined with other hardware devices to quickly and easily develop functions for various data collection, data processing and control actuators. Based on its powerful image display and processing functions, this system chooses Kunlun Tong’s TPC1061TD high-performance touch screen as the host computer, which can realize the control function requirements of displaying monitoring operation status information, controlling system operation, processing multiple data, status alarms and a variety of touch screen display effects. 3.2 System Hardware Composition According to the requirements of the monitoring and control function of the smart agricultural monitoring and management system, in order to realize the control of the system computer to the lower computer, the system is required to have corresponding input signals and output signals. The input signals are mainly start, stop, limit switch, sensor signal, etc.; The main equipment controlled by the output signal is hot and cold fan, heater, ventilation fan, fill light, sprinkler irrigation equipment, etc., so it is necessary to assign the address of the I/O port of the PLC. The I/O address allocation table can get the wiring mode of PLC, PLC as the core of the control system, the purpose is to receive the switching and analog signals, through the internal program operation processing, the results are transmitted to the output signal and then control the actuators, the output signal control actuators include fans, lights, pumps, etc. Since the rated current of the PLC output point is up to 0.75 A, it cannot directly drive the high-current load, so the output control intermediate relay is used to control the actuator equipment, so as to realize the PLC indirect control of the load equipment, the specific PLC hardware wiring diagram is shown in Figure 2. Figure 2. Hardware Wiring Diagram of PLC 4. Software Design 4.1 PLC Software Programming When the system starts, first detect various environmental variables in the greenhouse, compare and analyze the measured variable values with the set value of the system, and control each actuator according to the comparison results. The temperature value suitable for the growth of different crops in www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 56 Published by SCHOLINK INC. the greenhouse is generally about 25 °C, but the air humidity required for the growth and development of different vegetables is different, for example, the humidity suitable for the growth of nightshade fruits and vegetables is 50% ~ 60%, and the humidity suitable for the growth of cucumbers, potatoes and root vegetables is 70% ~ 80%, so crop greenhouse managers can set parameters for different crops. Figure 3. Air Temperature Control Flowchart Due to different crop types and different growth stages, the required air greenhouse degree, soil moisture, light intensity and other parameters are also different, so crop planting greenhouse managers can set various parameter values suitable for crop growth in the configuration screen according to their own needs. For example, the greenhouse set temperature standard value of 25 °C, through the air temperature sensor to the temperature of the greenhouse detection, the detection value with the PLC program set the standard value comparison, according to the difference to control the actuator to achieve the purpose of constant temperature, the work flow chart as shown in Figure 3, temperature control is mainly through the control of the sun blind, indoor heating method, can also be by controlling the fan to achieve the purpose, and other parameters of the system control process is the same. Figure 4. Acquisition Temperature Procedure www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 57 Published by SCHOLINK INC. The sensor transmits the collected analog signal to the PLC, and the touch screen can display and monitor its signal in real time through the communication established with the PLC; At the same time, through the touch screen, each parameter variable such as air temperature, humidity, light intensity, soil moisture and so on can be adjusted according to the needs of different growth periods of plants. As shown in Figure 4, the sensor will detect the temperature electrical signal value through the analog module EM235 to convert it into a digital value, and then through the analog input port AIW0, the value is transmitted to the PLC, in order to simplify the writing of the program, it can use the PLC’s own library instruction S_ITR to calculate, through the operation of the program and finally save the result to the VD100 register, for the subsequent program operation. Subsequently, the PLC program compares the collected temperature value with the set value in the PLC, and controls the operation of the hot and cold fan equipment through the comparison results, as shown in Figure 5, and the control mode of other parameters in the same system is the same, realizing the intelligent control of the system. Figure 5. Control the Fan Program 4.2 MCGS Configuration Design 4.2.1 Build the Project MCGS and PLC are connected by Siemens standard PC/PPI communication cable, and in the MCGS system, the system and PLC connection is established through the equipment window, so that MCGS can read data from the PLC and monitor its work in real time. Enter the MCGS configuration software development interface, create a new project “Smart Agriculture Monitoring and Management System”, and select the type of TPC as “TPC1061TD”. After entering the system workbench interface, three user windows are established, which are the main interface, the real-time curve, and the parameter interface. 4.2.2 Build a Real-Time Database Real-time database as the core of MCGS, mainly used for data exchange and processing, in the real-time database interface to establish PLC system related data variables, real-time database as a common area to exchange data, to achieve the coordination of various parts, form an interrelated whole, www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 58 Published by SCHOLINK INC. there are three main variable types, respectively data type, switch type, character type, the main variable type established. 4.2.3 Configuration Screen Design According to the functional requirements of its management system, a total of 4 analog parameters need to be acquired, and each actuator can be controlled on the configuration screen according to the acquired signals, so the human-computer interaction interface designed in the MCGS configuration software is shown in Figure 6. Figure 6. Smart Agriculture Monitoring and Management System Interface The main interface mainly includes the following modules: the working status monitoring module of hot and cold fans, sprinkler irrigation, greenhouse lighting, sun visors and other equipment; Temperature and humidity and illuminance display module; Manual/automatic control modules for each actuator equipment; Curve interface and parameter interface setting module. Among them, the working status monitoring module of the equipment can display the operating status of each equipment in real time in the form of animation, which is convenient for the operator to view; The temperature, humidity and illuminance display module can display the growth environment value of crops in the greenhouse in real time through program processing. Crop managers can enter the real-time growth environment value of crops in the parameter setting module “input box”, when the parameter display value exceeds the corresponding set value, the corresponding actuator will be started to run, so that its parameter value is reduced, and the operator can also set a parameter range in the parameter interface. Through the parameter interface setting button of the main interface, to the setting interface, the operator can set and modify the control range of the parameters according to the different growth cycles of the crop, and if the parameters exceed the upper limit or lower than the lower limit, the corresponding equipment will be driven to work. In order to facilitate viewing the real-time data of each variable parameter, the curve interface setting button is set, and the curve interface contains the real-time curve of each parameter, and is animated with the variable established in the real-time database. www.scholink.org/ojs/index.php/asir Applied Science and Innovative Research Vol. 7, No. 2, 2023 59 Published by SCHOLINK INC. 5. Conclusion Aiming at the main environmental factors affecting crop growth, such as air temperature and humidity, soil moisture, light intensity, etc., a set of intelligent agricultural monitoring and management system is designed based on PLC and MCGS configuration technology. The main content of the design is the hardware selection of the system, the allocation of I/O addresses, the hardware wiring of the PLC and the design of the configuration screen. The experimental results show that the system completes the human-computer interaction through the touch screen, realizes the monitoring and remote control of the operating state of the lower computer according to the change of crop growth environmental parameters, has a high degree of visualization, is easy to operate, and runs stably and safely. Compared with other traditional greenhouse control equipment technologies, it has high stability and strong anti-interference ability; At the same time, it can be combined with the Internet of Things technology for secondary development, configure the monitoring screen on the mobile phone, and realize remote mobile monitoring and control, which has important guiding significance for the development of smart agriculture. Acknowledgement This paper is one of the phased results of the following research project. Topic of project: Tarim University President’s Fund Project. Project number: TDZKSS202015. References H, R. Q. (2022). Design of temperature and humidity monitoring and regulation system in greenhouse based on STM32. Electronic Quality, 8, 99-103. L, Z. Y. (2022). Design of flower greenhouse Temperature and humidity monitoring system based on PLC and Kingview. Journal of Henan Agricultural Sciences, 2, 159-168. Wang, K. Y. (2020). Design and application of PLC remote monitoring system. Industry and Information Technology Education, 10, 64-68. Y, C. Q. (2019). Application of touch screen analog volume control based on MCGS. Wireless Internet Technology, 7, 29-29. Z, H. W. (n.d.). Design of multi-parameter monitoring system for greenhouse based on PLC. Measurement and Control PLC. Measurement & Control Technology, 6, 130-144.