IoT AND ARTIFICIAL INTELLIGENCE SUPPORTED SMART SYSTEM DESIGN TO INCREASE PRODUCTIVITY IN AGRICULTURE
Full text
IoT AND ARTIFICIAL INTELLIGENCE SUPPORTED SMART SYSTEM DESIGN TO INCREASE PRODUCTIVITY IN AGRICULTURE Köksal GÜNDOĞDU 1 Ali ÇALHAN 2 [email protected] [email protected] ORCID Kimliği: 0000-0001-7694-1841 ORCID Kimliği: 0000-0002-5798-3103 Murtaza CİCİOĞLU 3 [email protected] ORCID Kimliği: 0000-0002-5657-7402 1Electrical, Electronic and Computer Engineering, Düzce University, Düzce, TÜRKİYE 2 Computer Engineering, Düzce University, Düzce, TÜRKİYE 3 Computer Engineering, Bursa Uludağ University, Bursa, TÜRKİYE
ABSTRACT The agricultural sector is increasing its strategic importance daily due to the increasing population worldwide and the decreasing labor force in rural areas. In today's world, where the demand for basic resources such as food, water, and energy is rapidly increasing, the inadequacy of traditional agricultural methods has made it necessary to use new technologies effectively in agriculture. Therefore, concepts such as Agriculture 4.0, artificial intelligence, Internet of Things (IoT), sensor technologies, and digital transformation have become the main tools to increase productivity in agricultural production and prevent resource waste. This study developed a user-friendly, low-cost, modular IoT-based system that does not require technical knowledge to address the problems encountered in agriculture. The system includes a multi-sensor structure that can measure environmental variables such as soil moisture, air temperature, humidity, gas concentration, wind speed, and direction, and it provides real-time monitoring and analysis by transferring these data to cloud-based servers. Processing the data obtained with artificial intelligence-supported algorithms enables applications such as an integrated smart agricultural station, climate control in the greenhouse, and a plant health monitor. The system has a flexible structure that agricultural engineers, agricultural organizations, and farmers can adapt to their needs. In addition, it is designed with the “plug-and-play” principle so that non-technical users can easily install and use the system. Digital training materials encourage users to develop their applications on the system. This solution aims to eliminate barriers to digitalization in agriculture, such as complexity, high cost, and the need for expertise, and it offers a practical, accessible, and scalable path to sustainable agriculture. Key Words: Agriculture 4.0, Artificial Intelligence, Internet of Things, Digital Transformation, Smart Agriculture System I. INTRODUCTION Agriculture is of critical importance in the world. In other words, it is a strategic product [1]. The European Commission has emphasized the importance of Agriculture and prepared various strategic plans. There are approximately 9.5 million farmers and 10.8 million holdinglevel agricultural companies in Europe [2]. As can be seen in Figure 1, the share of agricultural employment is 17.7% in Türkiye [3]. Figure 1. Turkish Statistical Institute 2018 Labor Force and Employment Table [3]
While the world population is increasing, the number of people engaged in agriculture is decreasing. For this reason, Agriculture 4.0 and the use of technology in agriculture have become inevitable. While technology increases productivity in agriculture, it also reduces the required labor force [4-13]. In the coming years, fewer resources for a growing world will exist. However, it will be necessary to produce more food, feed, fuel, and fiber. Smart agriculture and digitalization in agriculture will be the most important factor in overcoming these challenges [14]. Realizing these situations globally, countries have invested heavily in smart agriculture and IOT applications [5]. The European Investment Bank has allocated 32 billion euros more to smart agriculture between 2014 and 2018 [15]. The United Kingdom allocates a budget of 4.7 billion pounds for applications that will be realized as Agriculture 4.0, artificial intelligence, and precision agriculture [16]. It is predicted that the world population will exceed 9 billion by 2050, and the urbanization rate will increase to 70% [7, 17]. If we do not use the resources we have effectively, the world will inevitably face hunger soon. While the share of agricultural land in total land in the world is 38%, Türkiye is in a lucky position with 51% [18]. However, unconscious agriculture leads to a decrease in the productivity of our agricultural lands and even to the destruction of agricultural lands. Excessive irrigation causes the soil pores to be filled and the soil to be airless. It destroys minerals useful for the soil on sloping lands. It also causes plant roots to rot. Pump irrigation causes water loss up to 50% and unnecessary energy consumption [18, 19]. Unnecessary and untimely spraying causes excessive damage to plants and soil by creating pesticide residues. Unnecessary fertilization makes the soil inefficient financially and changes the mineral and PH balances of the soil. One of the most common problems is agricultural frost. The main cause of frost is the cooling of the soil surface as a result of the loss of energy from the soil by ground radiation in cloudless, clear, dry air. A frost event can cause large harvest records for the farmers [20]. Although digitalization is quite common in agriculture, it is seen that these systems, which have a standard structure today, have very low yield rates in some cases, or even reduce productivity, depending on the land conditions or the product in the agricultural area. Challenges such as the complexity of digitalization, high costs, electronic information requirements, and lack of skills are among the obstacles to the use of this technology [4-9]. In this study, a set has been developed to enable agricultural engineers, authorized institutions in the field of agriculture, or farmers to produce their solutions to the problems in agricultural lands. With this set, people working in the field of agriculture can easily read the sensors on the device and write the results to the cloud server. They will be able to produce solutions by evaluating the written results themselves or with authorized organizations. The system is as simple as a child assembling Legos and can be used without requiring electronic knowledge. In other words, it does not contain technical complexity. It can be used with plug-and-play logic. In addition, digital course content has been created for users who want to improve themselves and make different artificial intelligence-based applications on the set. In this way, users in the field of agriculture will be able to create their own IOT systems and create smart agricultural systems suitable for their lands. II.SYSTEM DESIGN A. SYSTEM OVERVIEW As seen in Figure 2, our system consists of four main parts. The first part is the “Measurement Unit”, where the measurement results are taken using sensors in the agricultural land. The second part is the “Evaluation and Management Unit”, where the measurement results are evaluated and the evaluation results are transferred to the wireless communication unit and written to the database. The third part is the “Wireless
Communication Unit” that enables the system to be used as an IOT device and to transmit data wirelessly. The fourth part is the “Database and User Interface”, which contains the database in which the data is stored, and the data in the database is displayed to the user via the Web and mobile devices. Figure 2. Block Diagram of the Designed System B. MEASUREMENT UNIT The Measurement Unit has the sensors for the values needed in the agricultural field, and the values that need to be measured are located. It contains sensors for Soil Moisture Measurement, Soil Temperature Measurement, Ambient Moisture Measurement, Ambient Temperature Measurement, Ambient Light Amount Measurement, Air Quality Measurement, Air Pressure Measurement, Wetness Measurement (for leaves, trees, or similar objects), Rainfall measurement, Wind intensity measurement, and Wind direction measurement. The probe for the air quality sensor is shown in Figure 3. Figure 3. Air Quality Sensor Probe As can be seen in Figure 3, the sensors are easy to use and plug-and-play. It does not require any technical knowledge and is designed for agricultural land. Atmosphere Sensor is a sensor that can measure from a depth of -500m to 9000m above sea level. This sensor can operate between -40°C and +85°C temperature levels. Thanks to the sensor, the atmospheric pressure of the agricultural land is measured. Soil Temperature Sensor can measure soil temperature between -55°C and +125°C. It works according to ±0.5°C degree of accuracy. The Soil Moisture Sensor operates with 16-bit sensitivity. It has an operating current of approximately 20mA. It works according to the principle of electrical conductivity between two probes planted in the soil. If the soil is moist, conductivity increases; if the soil is dry, conductivity
decreases. The Ambient Temperature Sensor can measure ambient temperature between - 40°C and +80°C. It works according to ±0.5°C accuracy. The Ambient Humidity Sensor works according to a 0% ~ 100% RH range. It has ±1% RH humidity sensitivity. The Ambient Light Amount Measurement Sensor is 540 nanometers in wavelength. The air quality measurement sensor is 10-100 ppm. Precipitation amount, wind intensity, and wind direction sensors can produce accurate measurement results between -40°C and +80°C. C. EVALUATION AND MANAGEMENT UNIT Evaluation and Management Unit; as can be seen in Figure 4, there is an RP2040 microcontroller inside. It contains a dual-core ARM Cortex M0+ 133 MHZ processor. It has 264KB SRAM and 2MB on-board memory. It has low power consumption. It has 26 GPIO units, 2xSPI, 2xI2C, 2xUART, 3x12-bit ADC, and 16x controllable PWM channels. It includes an internal temperature sensor, a timer, and a clock module [21]. There is a Micro USB on the board to program the board. It has a Buzzer and SMD LEDs on it to give warnings. There are special socket inputs for sensor connections. There are special sockets to connect wireless communication units. Figure 4. Evaluation and Management Unit D. WIRELESS COMMUNICATION UNIT The Wireless Communication Unit provides pins for the Wifi, GSM module, ZigBee, LoRa, and Bluetooth modules. There are sockets in the Evaluation and Management Unit where these modules are connected. The default wireless communication method of the set is wireless data transfer with a GSM module. A visual of the wireless communication units used on the board is shown in Figure 5. Figure 5. Wireless Communication Units
E. DATABASE AND USER INTERFACE A Linux-based database was created for the system, and database operations were performed with MYSQL. IOT data is written to the database in this way. The data received from the database is displayed to the user as in Figure 6. Figure 6. User Interface The user interface is built using PHP, HTML, MYSQL, and JavaScript. Mobile compatibility is provided with the Bootstrap method. In this way, it can be used on both web and mobile devices. III. FINDINGS AND DISCUSSION A. PLUG AND PLAY OPERATION Figure 7 shows the system in use on agricultural land. As can be seen, it is sufficient to place our system on the agricultural land to be measured. Then, the data is written to the database in the cloud server as soon as we energize it. The measurement results are sent at one-minute intervals. Figure 7. Physical State of the System
When we plug the sensors of the values to be measured into the sockets shown in Figure 8, the sensor starts to work and automatically sends the measurement results to the cloud server. In this way, it is enough to energize the system after connecting the sensors whose values we want to observe and evaluate. For example, if we want to measure and observe Air Quality, we should connect the sensor S5 shown in Figure 3 to the S5 socket shown in Figure 8. Then, when we energize the system, the measurement results are automatically sent to the cloud server. Figure 8. Connection Sockets B. POWER CALCULATION The system shown in Figure 7 is a green energy system [22]. The power from the solar panel is stored in a battery. The system is fed with power from the battery, and a green energy system cycle is created. The block diagram of the system is shown in Figure 9. Figure 9. Power Block Diagram of the System The power calculation based on the current and voltage values of the system is as follows. Solar_Panel_Produced_Power = VoltageValue* CurrentValue = 9V*0,033A ≈ 3W (1) Battery_Power = 12V*6A=72W (2)
Table 1. Calculation of Maximum Power Consumed by the System Power Consuming Unit Amount of Power Consumed (P=V*A) Amount of Power Consumed (W) Soil Moisture Sensor 5V*20mA=100mW 0.1W Soil Temperature Sensor 5V*1.5mA=7.5mW 0.0075W Air Moisture Sensor 5V*0.5mA=2.5mW 0.0025W Air Temperature Sensor Ambient Light Amount Sensor Daytime(1KΩ) I=5V/(1 KΩ +10 KΩ)=2.25mW Night(1MΩ) I=5V/(1 MΩ +10 KΩ)=4.95µW 0.00225W Air Quality Sensor 5V*0.16A=0.8W 0.8W Air Pressure Sensor 3.3V*0.000012A=0.0396mW 0.0000396W Leaf Wetness Sensor 5V*20mA=100mW 0.1W Precipitation Amount Sensor 5V*0.2mA=1mW 0.001W Wind Intensity Sensor Wind Direction Sensor Microcontroller 3,3V*0.02A=66mW 0.066W GSM Module (for IOT) 4V*0.15A=0.6A 0.6A Others ≈ 40mA 0.04W Total Maximum Power Consumed ≈ 2.675W While calculating the consumed power shown in Table 1, the values of the power-consuming elements in the system at the time of maximum power consumption are taken into account, not at steady state. In addition, since the GSM module consumes the most power among the wireless communication modules in the system, the power values of the GSM module are taken into account. As can be seen in Table 1; Total Maximum Power Consumed = 2.675W As can be seen in equation (2); Power Generated from Solar Panel = 3W Residual power at the system's maximum energy consumption; Remaining_Power = Power Generated from Solar Panel - Total Maximum Power Consumed (3) Remaining_Power = 3W – 2.675W = 0.325W As can be seen in Equation (3), even when the system consumes maximum power in sunny weather, an energy surplus of 0.325 W is generated. This energy surplus is stored using the 12V 6Ah battery in the system. Considering that the system consumes maximum energy in 1 minute, operates in sleep mode at other times, and energy consumption decreases from 1 to 1 in 10; Sleep_mode_energy = Maximum_energy / 10 = 2.675W / 10 = 0.2675W (4)
Sleep_mode_remaining_power = Power Generated from Solar Panel - Sleep_mode_energy (5) Sleep_mode_remaining_power = 3W – 0.2675W = 2.7325W Battery_Working_Hour = Battery_Power / Total Maximum Power Consumed (6) Battery_Working_Hour = 72W / 2.675W = 26.92 hours C. IOT OPERATIONS WITH ARTIFICIAL INTELLIGENCE ALGORITHMS The main function of the system is to be used in agriculture without requiring electronic knowledge, i.e., without requiring knowledge of technical complexity. It enables agricultural engineers, authorized organizations in agriculture, or farmers to produce their own solutions. The system allows users with software knowledge to program and use it as they wish. The RP2040 microcontroller has a dual-core ARM Cortex M0+ 133 MHZ processor. This processor can be programmed with MicroPython. In this way, light artificial intelligence and machine learning (ML) techniques or pre-trained and optimized heavy artificial intelligence models can be run on our system. In addition, IOT projects can be realized by using Wifi, GSM module, ZigBee, LoRa, and Bluetooth modules in the system. Artificial intelligence models such as TinyML (Tiny Machine Learning), Rule-Based AI, Decision Trees, and Simple Neural Networks can be run in our system. Some examples that can be done in our system using our proposed MicroPython and AI are given in Table 2. Table 2. Our Proposed MicroPyton+AI Agriculture Project Examples Sensor Measured value Possible project Type of AI used Explanation Soil Temperature Sensor Soil Temperature Smart irrigation and plant health monitoring Rule-based / TinyML Irrigation or disease risk based on soil temperature Air Moisture Sensor + Air Temperature Sensor Air Moisture + Temperature Greenhouse climate control and irrigation scheduling Rule-based / Decision tree High temperature + low humidity → irrigation recommendation Air Pressure Sensor Pressure Rain prediction and weather monitoring TinyML (weather pattern) Rain prediction based on pressure changes Ambient Light Amount Sensor Light Amount Photosynthesis monitoring and irrigation time scheduling K-means / Thresholding Automatic control based on morning/evening light Air Quality Sensor Air Quality Disease detection and greenhouse air analysis Anomaly detection (AI) Risk environment detection based on gas increases Soil Moisture Sensor Soil Moisture Smart irrigation system and water conservation TinyML / KNN / Rule-based If the humidity level drops, AI calculates the irrigation time