Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 11, No. 3, 2024 57 Intelligent Soil Quality Monitoring Device based on Internet of Things Technology Chao Zhang, Litao Xie Taishan University School of Physics and Electronic Engineering, Tai’an, Shandong, China Abstract: The intelligent soil quality monitoring device based on the Internet of Things technology adopts the Internet of Things technology, sensor technology, FDR technology, frequency domain reflection measurement technology and multi-channel data acquisition technology, MQTT protocol, controller local area network technology, Ali Cloud OSS upload technology and other technologies, with the function of monitoring soil moisture and soil protection. The equipment can realize automatic detection in different soils, analyze nitrogen, phosphorus and potassium in the soil, pH value, temperature and humidity, electrical conductivity and light intensity, measure soil water content, soil temperature and other indicators, real-time monitoring of the land, through the Internet of things technology feedback to the terminal for analysis, controlled by the terminal to supplement the soil water and other functions. Finally, it is concluded that specific land protection should be carried out for different land pollution. Keywords: Single-chip Microcomputer; SMT32 Chip; Soil Nitrogen Phosphorus Potassium Sensor; Soil Detection Module; Soil Remediation Module. 1. Introduction: In recent years, with the continuous progress of intelligent agricultural technology and the wide application of sensors, data analysis, automation equipment and robots, farmland management has ushered in a revolution[1]. Soil quality is one of the important factors in agricultural production, ecological environmental protection and sustainable development, so soil monitoring and assessment has been attracting people's attention[2]. The traditional soil quality monitoring method has some limitations in real-time and comprehensiveness, and consumes a lot of manpower and material resources. In the new era, strengthening soil environmental monitoring capacity and system construction, and actively carrying out soil pollution remediation are the key contents of soil environmental protection[3]. Therefore, it is of great practical significance to design an intelligent soil quality monitoring device based on Internet of Things technology. This paper aims to discuss the design and implementation of intelligent soil quality monitoring device based on Internet of Things technology, and will elaborate the overall design scheme of intelligent soil quality monitoring device, including the design of hardware system and software system, as well as the function module and implementation principle of the system. 2. Project Background and Basic Functions 2.1. Project Background of Soil Quality Monitoring Device At present, the soil environmental quality in China is becoming increasingly severe[4]. Among them, soil pollution is the main cause of severe soil environment, and soil remediation is the main measure to improve the situation. Soil pollution is characterized by concealability, long-term nature and irreversibility, directly or indirectly polluting groundwater, air, harming crops and organisms, and even endangering human health and life[5]. Therefore, soil pollution remediation has become an important research field[6]. The quality of soil remediation projects is related to various resources such as water resources and atmospheric resources[7]. Actively promoting soil remediation projects can not only effectively improve environmental pollution, but also actively promote the implementation of environmental prevention and control methods[8]. Soil remediation is mainly the use of physical, chemical and biological methods, so that the contaminated soil can be directly restored to normal state. Through the analysis of the basic content of soil environmental protection, we can clearly understand that this work is the basis for the smooth development of ecological work at this stage, but the time, energy and cost required in the development process is large, so we have to attach great importance to it. The traditional soil detection method has the disadvantages of slow detection efficiency, complex form and low anti- interference degree. By strengthening soil testing, we can grasp the real situation of soil, take effective measures to improve soil, protect ecological environment, and promote the improvement of people's living standards and the stable development of industrial production[9]. Therefore, we study and propose an intelligent soil quality monitoring device based on the Internet of Things technology to monitor the soil composition in real time and perform a series of operations according to the soil composition, so as to realize multi- parameter monitoring and restoration of existing soil and protect our precious land resources. 2.2. Basic Functions of Soil Quality Monitoring Device In this project, STM32 single chip microcomputer is used to control the whole circuit for overall control, and highly integrated agricultural sensor, soil water stratification observation sensor, soil nitrogen, phosphorus and potassium sensor and light intensity sensor are used in independent research. The sensor is used to detect various meteorological, hydrological, temperature, humidity, crop data, salinity, conductivity and pH values of the soil. The data collected by 58 the soil detection module is transmitted to the cloud through the Internet of Things technology, and the cloud analyzes and generates the data. After viewing the report, the user will decide whether to use the soil repair module. Soil repair module We innovate the use of self-designed servo motor and intelligent peristaltic pump modules, servo motor integration is high, the need for fewer peripheral components, increase the use of the device space, intelligent peristaltic pump precise control is to improve the overall accuracy of the device detection data. Users can view the data through the WEB or APP, use the control module to control the soil repair module to select irrigation or fertilization and other functions, and support the equipment's independent monitoring and regulation, so as to ensure that the soil will not be damaged when planting crops and solve the fertilizer and water resources. The real-time monitoring module will monitor the location of the land in real time and monitor the safety of the device. In addition, the alarm light is set up to realize the rapid removal of obstacles and soil abnormal alarm function of the monitoring device. 2.3. Innovation of Soil Quality Monitoring Device The innovation point of the device is the independent design of highly integrated agricultural sensor including water demand forecast, data acquisition and processing functions, a variety of meteorological, hydrological, temperature, humidity, crop data, salt and pH value data monitoring, high integration, convenient and efficient. The device detects a wide variety of elements to monitor changes in surface soil quality, and has probes with highly integrated sensors such as agricultural sensors to monitor soil temperature, humidity, salinity and pH. It has the function of irrigation and fertilization, which can be automatically irrigated and fertilized according to the status of land detection. The alarm system and power supply system also improve the safety of the device and reduce power consumption. 3. Design Ideas and Technical Route of Soil Quality Monitoring Device 3.1. Design Ideas and Hardware Selection In terms of embedded program development for system hardware, our team will further compile code using STM32Cube MX and MaixPy IDE. Realize a variety of functions based on single chip microcomputer. Such as the realization of soil quality collection, analysis, soil irrigation and fertilization, monitoring of soil testing zones, human- computer interaction, solar power supply and other functions. In terms of hardware selection, we choose STM32G431 series single chip microcomputer as the main control of the intelligent soil quality monitoring device based on the Internet of Things, and adopt a modular design, which divides the monitoring device into five modules: soil detection module, irrigation and fertilization module, real-time monitoring module, control module and power management module. The soil detection module adopts self-designed highly integrated agricultural sensor, soil water stratification observation sensor, soil nitrogen, phosphorus and potassium sensor and light intensity sensor. Irrigation and fertilization module built-in 485 bus control electrical appliances such as servo motor, peristaltic pump and diaphragm pump and other devices lead out the connection interface of each electrical appliance, which is convenient for later adaptation connection as required. The main controller of the real-time monitoring module is K210, which uses NB-IOT technology to access Alibaba Cloud, and the monitoring data is uploaded and stored in real time. STM32G431 is the main controller of the control module, and the self-developed chip is adopted to identify the communication protocol and quickly identify the connection module time. After testing, it supports the access of up to 1024 modules at present. The offline control adopts the TFT resistance screen, including the LCD screen and the resistance touch screen controller, and adopts the self- designed UI to display the touch interface. The control interface can carry out information exchange for all connected modules of the device. The online control uses PC terminal, mobile phone APP and other Internet of thing’s devices for remote monitoring regardless of distance. The power management module includes the switching power supply, solar panel power supply, and DC-DC buck module. The 220V power supply is divided into 220V, 12V, and 5V power supply nodes through the power cable connected to the built- in power management module. 3.2. Comparison of Technical Routes and Parameters The main body of the research is divided into five modules: soil detection module, soil remediation module, real-time monitoring module, control module and power management module. 3.2.1. Soil Detection Module The soil detection module uses the STM32G431 series chip as the main control. At present, the highly integrated agricultural sensor, soil water stratification observation sensor, soil nitrogen, phosphorus and potassium sensor, soil temperature and humidity sensor and light intensity sensor are used. The module can change the type of sensor at any time according to needs. The module can be quickly installed and disassembled, and can provide complete monitoring data for soil detection of shallow root crops. 3.2.2. Soil Remediation Module The soil repair module is controlled by STM32G431, with built-in 485 bus to control electrical appliances such as servo motor, intelligent peristaltic pump, diaphragm pump and other modules to lead out the electrical connection interface, which is convenient for later adaptation and connection as required. The PCB integrated circuit board is designed independently, which can independently control the receiving spectrum during the plant growth cycle, and independently study the communication protocol. Ensure stable information transmission, high efficiency, rich peripheral resources, high reliability, with the help of the built-in watchdog circuit, you can achieve stable and continuous operation of the system. 3.2.3. Real-time Monitoring Module The main controller of the real-time monitoring module is K210, which applies NB-IOT technology to access Alibaba Cloud, and the monitoring data is uploaded and stored in real time. At the same time, the alarm light and soil abnormal alarm function are set. The alarm light is on when the sensor is not faulty, and the alarm light is blinking when the fault occurs. 59 Figure 1. Detection process Figure 2. PCB layout 3.2.4. Control Module The control module is controlled by STM32G431, and adopts self-developed chip identification communication protocol to quickly identify the connection module time. After testing, it supports the access of up to 1024 modules at present. The offline control adopts TFT capacitive screen including LCD screen and capacitive touch screen controller, and adopts self-designed UI display touch interface. The control interface can carry out information exchange for all connected modules of the device. The online control uses PC terminal, mobile phone APP and other Internet of things devices for remote monitoring regardless of distance. 3.2.5. Power Management Module The power management module includes the switching power supply, solar panel power supply, and DC-DC buck module. The 220V power supply is divided into 220V, 12V, and 5V power supply nodes through the power cable connected to the built-in power management module. 3.2.6. Parameter Comparison In terms of data collection, processing and transmission: sensors collect environmental parameter data and upload it to the Internet of Things cloud platform through network protocols. The iot cloud platform sends the data to the control module. The results are obtained through the analysis of the control module and the integration of the existing data, and the analysis results are presented to the human-computer interaction interface, and the operator carries out the next command operation through the human-computer interaction interface. Environmental data mainly include: hydrology, temperature, humidity, crop data, salinity, pH, carbon dioxide concentration and other gas concentrations. The analysis and comparison of the control module is mainly based on the previously input and collected environmental data to determine whether the soil is missing a certain element, and to supplement it. Table 1. Sensor parameters Soil temperature and humidity sensor Measuring range: - 50+60℃ Accuracy ±3%RH(0- 90%RH) ±5%RH (90- 100%RH) Soil temperature sensor Platinum resistance sensor Pt100 is used as thermal element Accuracy of 0.2 ° C Soil water stratification sensor It can measure the soil water content at the depth of 10, 20, 30 and 50cm at the same time, and the measurement range is 0 ~ 100% Accuracy of ±2% Small program design: we plan to use Bluetooth module to 60 develop a simple APP, and our team is ready to further optimize it. It is expected that the APP mainly includes three interfaces: home page, motor control page, and supply page. The home page includes a display of information such as alerts. Motor control page: with a variety of control buttons, adjust the speed of the servo motor, adjust the number of servomotor turns, etc. Recharge page: With various control buttons, control the soil repair module to recharge the soil with water, fertilizer, etc. 4. Summary and Outlook The intelligent soil quality monitoring device based on the Internet of Things technology can realize automatic detection in different soils, analyze nitrogen, phosphorus and potassium in the soil, pH value, temperature and humidity, electrical conductivity and light intensity, measure soil water content, soil temperature and other indicators, conduct real-time monitoring of the land, and feed back to the terminal for analysis through the Internet of Things technology. By the terminal control of the soil water supplement and other functions, through embedded development, NB-IOT and other technologies to achieve intelligent and high-precision detection of soil quality, and highly integrated agricultural sensors as the starting point, in order to provide solutions and add collaborative processing on the traditional soil monitoring device, to solve the rapid development of industrial and agricultural pain points - ecological environment damage, Soil resources are eroded. References [1] Cao Jianshu, Zhai Jingbo. Application research of intelligent agricultural technology in crop growth monitoring and management [J]. Digital Agriculture and Intelligent Agricultural Machinery, 2023(12):30-32. [2] WANG X. Research on soil quality monitoring and evaluation method based on remote sensing technology [J]. Leather production and Environmental Protection Technology, 2024, 5(1): 81-83. [3] Zhang Yunfei. Overview of soil environmental monitoring and pollution remediation technologies [J]. Real Estate, 2021(6):2. [4] ZHANG X. Status, problems and countermeasures of soil environmental monitoring in China. Science and Information Technology, 2022(8):28-30. [5] Fan Baoguang. Analysis on the status quo of soil pollution and supporting technologies of soil remediation [J]. Science and Breeding, 2016(3):244-245. (in Chinese) [6] Hu Likai. Contaminated soil remediation technologies research front and prospect [J]. Journal of comprehensive utilization of resources in China, 2020, 38 (2): 3. DOI: CNKI: SUN: ZWZS. 0.2020-02-036. [7] Hu Yiming. Environmental pollution prevention and management in soil remediation engineering [J]. Contemporary Chemical Industry Research, 2023(7):69-71. (in Chinese) [8] Song Yaxin. Research on Environmental pollution prevention and Management in soil remediation engineering [J]. China Science and Technology Journal Database Industry A, 2023. [9] CHENG P. Soil detection and its significance for environmental protection. Heilongjiang Environmental Bulletin, 2024, 37 (04): 55-57. (in Chinese)