Enhancing Sustainable Agriculture Through Digital Farming Technologies: Auto-Irrigation, Nutrient Monitoring, and Disease Detection

Enhancing Sustainable Agriculture Through Digital Farming Technologies: Auto-Irrigation, Nutrient Monitoring, and Disease Detection

Bavithra Karunanidhi* Adhavan Balashanmugham Divya Ramasamy Pavithra Vijayarajan

Department of Electrical and Electronics Engineering, PSG Institute of Technology and Applied Research, Coimbatore 641062, India

Corresponding Author Email: 
bavithra@psgitech.ac.in
Page: 
327-334
|
DOI: 
https://doi.org/10.18280/ijdne.200210
Received: 
15 July 2024
|
Revised: 
13 October 2024
|
Accepted: 
23 October 2024
|
Available online: 
28 February 2025
| Citation

© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Agriculture forms the backbone of India’s economy and significantly influences daily life. Its role is evident in the food that people consume, the jobs it generates, and its contribution to economic stability and well-being. However, due to poor yields, the number of farmers is gradually declining. According to existing literature, three key factors affect the yield of cultivated land: effective water management, early detection and diagnosis of plant diseases, and an adequate supply of essential nutrients such as nitrogen, phosphorus, and potassium. To boost production, auto-irrigation systems, nutrient monitoring systems, and disease forecasting tools (apps) have been developed. A field model of an auto-irrigation system has been implemented. An Arduino-based NPK sensor system has been developed to measure soil nitrogen, phosphorus, and potassium levels. Additionally, farmers receive nutrient data through an NPK sensor monitoring app, and a web app provides fertilizer recommendations based on NPK data. Finally, an app will be developed to identify the type of disease affecting a plant and to offer a treatment for that condition. The diseases are identified using a Convolutional Neural Network (CNN) algorithm.

Keywords: 

digital farming, auto-irrigation, nutrient monitoring, disease detection, sustainable agriculture, precision agriculture

1. Introduction

Agriculture is vital to India's economy. Approximately 17% of the country's GDP depends on agriculture, which is a key component of the Indian economy. It employs more than 60% of the workforce. As a result, agriculture is critical to our country's economy. Agricultural fields face numerous challenges. Agriculture is a cornerstone of livelihoods, but it has recently faced a decline in productivity and yield. According to studies, three key factors contribute to low yields: adequate levels of essential nutrients such as nitrogen, phosphorus, and potassium; early identification and diagnosis of plant diseases; and effective water management. Nitrogen is essential for plant growth, as it promotes healthy leaf growth and coloration. Phosphorous promotes the growth of roots, flowers, and fruits. Potassium helps your plants to transfer water and nutrients and aids in photosynthesis. It also promotes healthy root systems and increases disease resistance. As a result, several essential nutrients are needed for better plant growth. To improve production, N, P, and K levels are tracked using an NPK sensor. These data will be received by users through an app, and appropriate fertilizer recommendations will be provided via a web app. Water is an essential component for plant tissue growth. However, excessive watering can negatively impact plant health by causing nutrient leaching, reducing soil fertility, and increasing plant susceptibility to diseases. As a result, an autonomous irrigation system will be designed to provide adequate water to plants based on soil moisture levels. Finally, plant diseases are harmful to plant health and can significantly affect growth. When diseases infect plants, crop yields are dramatically lessened. To maximize yield, it is imperative to recognize and analyze plant diseases as soon as feasible. Many plant diseases are extremely difficult to identify manually. The proposed method streamlines farmers' tasks and enables early diagnosis and treatment of plant diseases by applying deep learning techniques, specifically Convolutional Neural Networks (CNNs).

Agriculture involves producing nutrient-rich crops that contribute to a healthy lifestyle and require substantial human resources. Concerns about the labor-intensive nature of agriculture are common. This paper explores how precision agriculture can mitigate the need for extensive human labor. Precision agriculture employs advanced analytical tools to optimize crop management and decision-making. This approach is widely adopted globally to enhance crop yield and quality while minimizing labor. It leverages detailed crop data to improve productivity and efficiency in farming operations. The development of automatic irrigation systems has been a focus of extensive research, to optimize water usage and enhance agricultural productivity. Various studies have explored different methodologies and technologies to achieve these objectives. An Arduino-based automatic irrigation system was implemented to control water distribution by measuring soil moisture levels, which significantly reduced water wastage and enhanced crop yields [1]. Advancements were made with the use of a Raspberry Pi Pico in an irrigation system, incorporating additional sensors to improve the precision and effectiveness of water management [2]. An Arduino UNO-based system was also developed, integrating multiple sensors to monitor soil moisture, temperature, and humidity, which proved effective for large-scale farming applications [3].

Efforts to create a low-power, cost-effective automatic irrigation system demonstrated the importance of developing energy-efficient solutions for regions with limited resources [4]. The integration of SMS control with an Arduino-based system allowed remote monitoring and control of the irrigation process, enhancing flexibility [5]. Real-time soil NPK and moisture analysis were achieved using wireless sensor networks, providing crucial data for informed fertilization and irrigation decisions [6]. An IoT-based soil nutrient measurement tool specifically for citrus plants was developed, utilizing NPK sensors and IoT for data transmission and analysis, which highlighted the role of IoT in precision agriculture [7]. Additionally, soil quality management was improved using wireless sensor networks, which monitored soil parameters to ensure optimal nutrient delivery [8]. Another IoT-based soil nutrients analysis and monitoring system emphasized the importance of data-driven decision-making in agriculture [9]. An AI-driven fertilizer recommendation model using IoT and machine learning further advanced precision agriculture techniques [10].

Recent research has also expanded into the qualitative analysis of dusting and soiling on solar PV systems using learning algorithms [11]. This study employed image processing techniques, including CNN and Otsu’s thresholding, to assess the impact of environmental factors like wind speed and snow on solar panel efficiency. The integration of classification algorithms into renewable energy management highlights the potential of AI in optimizing energy sources. Another study focused on plant disease detection and classification using deep-learning CNN algorithms [12]. By leveraging neural networks, this research provided an effective solution for identifying pathogens in plants, underscoring the importance of AI in maintaining plant health and productivity in agriculture.

Furthermore, a smart crop prediction and irrigation management system was developed, incorporating advanced techniques to predict crop yields and manage irrigation effectively [13]. Precision agriculture procedures and IoT in agriculture play vital role in yield management [14-16]. This system utilized machine learning to provide actionable insights, demonstrating the potential of integrating AI into agricultural management for better resource utilization and crop output. This paper aims to inspire future generations of farmers by making their labor more profitable and productive.

2. Overall Setup

According to our research, three factors influence cultivated land yield: the availability of corrective water measures, the early identification and diagnosis of disease, and an appropriate supply of vital nutrients. As a result, a prototype is created to boost manufacturing as shown in Figure 1 and it incorporates the following features:

1. Auto-irrigation

2. Nutritional monitoring system

3. Disease prognostication tools (Apps)

Figure 1. Summary of system

3. Hardware Setup Component Description

3.1 Electrical resistance soil moisture sensor

An electrical resistance soil moisture sensor (Figure 2) measures the change in electrical resistance between two or more probes inserted into the soil to ascertain its moisture content. It works by passing a low-voltage electrical current through the soil, and then determining how resistant the soil is to the current.

Figure 2. Moisture sensor with its pin diagram

3.2 Raspberry Pi Pico

The Raspberry Pi Foundation board shown in Figure 3 created the small and affordable microcontroller board known as the Raspberry Pi Pico. It has a potent Arm Cortex-M0+ processor, 2 MB of flash memory for storing programs, 264 KB of RAM, and several I/O pins for connecting to other hardware. The Pico is programmed using computer languages like Micro Python, C/C++, or others.

Figure 3. 5-volt relay with pin description

3.3 Relay

Relays are commonly employed in a variety of applications where remote control of high-voltage or high-current equipment is required, such as industrial automation, automotive systems, and home appliances. As an electric current is given to the relay's coil, a magnetic field is created that attracts or repels the contacts, causing them to shift position. This movement connects or disconnects the circuit, allowing or interrupting the flow of electricity to the linked device.

3.4 Water pump

A 5-volt micro water pump is a small pump that runs on a 5-volt DC (direct current) power supply (Figure 4). It is often utilized in low-power applications requiring the pumping of a tiny volume of water, such as miniature aquariums, fountains, or DIY electronics projects. Based on the relay signal, a pump is employed in this project to give water to plants through the pipe attached to it.

Figure 4. 5-volt mini water pump

Water pumps are selected based on certain factors such as voltage(5V), and flow rate which means the quantity of water that can move in at a particular amount of time, head height, and its durability.

3.5 NPK sensor

The nitrogen, phosphorus, and potassium content of the soil can be determined using the soil NPK sensor (Figure 5). By assisting in determining the soil's fertility, it makes it easier to evaluate the soil condition systematically.

Figure 5. Soil NPK sensor

The sensor can be buried in the ground for a very long time. It has a high-quality probe that is corrosion-resistant to salt and alkali, rust, and electrolysis to ensure the probe component's long-term operation. As a result, it is suitable for all types of soil. The Modbus Communication interface on the microcontroller prevents it from being utilized with the sensor directly. As a result, it must be connected by any Modbus Module, such as RS485, to link the sensor to the microcontroller. The sensor runs on 9 to 24 volts and consumes comparatively little power.

3.6 Arduino Nano

Arduino Nano (Figure 6) is used in this work to connect with the sensor, buzzer, pump, and relay control.

Figure 6. Arduino Nano

3.7 HC-05 Bluetooth module

HC-05 (Figures 7 and 8) communicates with the microcontroller; it connects through a serial port (USART). The range can go up to roughly 100 m, depending on the transmitter and receiver, environment, topography, and urban environments.

Figure 7. HC-05 pin diagram

Figure 8. HC-05 Bluetooth module

3.8 OLED display

Any microcontroller can be connected to this 0.96-inch I2C/IIC 4-pin OLED display (Figure 9) module BLUE utilizing the SPI/IIC/I2C protocols. The display has a resolution of 128 by 64 pixels. The readings obtained from the NPK sensor were displayed on the OLED display in this work.

Figure 9. OLED display

4. Software Description

4.1 Thonny

Thonny is an IDE for the Python programming language. In this work, a Raspberry Pi Pico board is used for auto-irrigation for a plant. One of the well-liked IDEs for writing, running, and debugging Python programs on the Raspberry Pi Pico is Thonny. Moreover, Thonny comes with several libraries and utilities that make working with the Raspberry Pi Pico simple.

4.2 Arduino

To build and upload computer code to the actual programmable circuit board, a software development environment is used. The Arduino board is based on the Processing programming language and provides a simple interface for developing code, uploading it to the board, and analysing the board's activity. The Arduino language, which is based on C/C++, has been simplified to make it easier for beginners to learn. The Arduino software is used in this work to program an Arduino nano board for reading NPK data from the NPK sensor via the MAX13487E.

4.3 Android Studio

Android Studio is an IDE for creating Android applications. Google built it as the official IDE for developing Android apps. Many programming languages are supported, including Java, Kotlin, and C++. It is frequently used by developers worldwide to create high-quality Android apps. This paper is used to create a plant disease detection app that classifies diseases using deep learning algorithms and an NPK values monitoring app. The Java programming language is used to create an app.

4.4 Jupyter Notebook

Jupyter Notebook is an open-source web tool, allows users to create and share documents. Jupyter Notebook provides an interactive platform for activities such as data analysis, scientific computing, and machine learning. It offers a great platform for investigating data, creating prototypes, and disseminating findings. In this paper, Jupyter Notebook is used to train the dataset which was downloaded from Kaggle. The TensorFlow lite model is downloaded after building the CNN model. This TensorFlow lite file is used for plant disease detection.

4.5 PyCharm

An Integrated Development Environment (IDE) for the Python programming language is PyCharm. JetBrains created it. PyCharm includes features like code highlighting, code completion, debugging tools, version control system integration, and project management tools. Many well-known Python frameworks, such as Django, Flask, Pyramid, and others, are also supported. Python developers typically use PyCharm because it accelerates development and increases productivity. This paper employs PyCharm to develop a fertilizer recommendation web app that is based on measurements of soil’s NPK values received via the NPK sensor.

5. Results and Discussion

5.1 Intelligent watering system

The availability of corrective water measures to crops is very important for their growth and development [17], hence in this paper, an Intelligent watering system is developed using a soil-moisture sensor, Raspberry-Pico board, relay, pump, and power supply (Figure 10).

Figure 10. Intelligent watering system

The moisture content in the soil is fed to the Raspberry Pico board, it is programmed using Micro Python in such a way that when the level is under the pre-set limit the relay actuates the pump automatically and the water is irrigated to the crops until it reaches the limit. Hence, this system helps the farmers by making the process automated and increasing the yield of crops.

5.2 Soil nutrient monitoring system

From the NPK Sensor, monitored N, P, and K content values [18] are displayed in OLED Display as shown in Figure 11 through RS485 Communication protocol. In Figure 11, the NPK values as displayed by checking it with various types of soil such as river soil, red soil, and black soil. Figure 12 shows the result obtained while testing it without soil.

Figure 11. Result with soil

Figure 12. Result without soil

5.3 NPK values receiving app

As before, productivity and profit decrease due to various reasons, among which insufficient nutrients are one of the reasons. So, the NPK sensor is used three nutrient values. In addition to all these problems, farmers face some busy schedules. So, the NPK values receiving app is developed to send the NPK values to the user. So that they can check the fertilizer to be used in their field based on NPK values. Figure 13 shows the images of the app, whose search button is used to search the Bluetooth devices available near and the connect button is used to connect our device to the Bluetooth module.

Figure 13. NPK values receiving app

5.4 Fertilizer suggestion webpage

The fertilizer suggestion model was trained using three algorithms such as random forest classifier, gaussian naïve, and XGB classifier. In addition, accuracy results were taken to find out the best algorithm that was suited to our dataset, and the dataset was downloaded from Kaggle [19]. The figures of the accuracy results of all three algorithms are given below.

Table 1. Model comparison

Algorithm

Accuracy (%)

Random Forest

98

Gaussian Naïve

80

Extensive Gradient Boost

92

Figure 14. Fertilizer suggestion web app with NPK as 12, 10, 13

Table 1 represents the comparison of various algorithms for fertilizer recommendation. The dataset is trained with the above three different MLAs and concluded that the Random Forest Algorithm suits best for our application. So, the webpage was created using a Random Forest Classifier algorithm with the help of PyCharm. The model was converted into a pickle file and then it was used in PyCharm software to create a webpage. Figures 14 and 15 show the image and result of the fertilizer suggestion web app.

In Figure 14, the NPK values are given as 12, 10, and 13 and the result given is Seventeen-Seventeen-Seventeen.

Figure 15. Accuracy and loss plot of CNN model

5.5 Plant disease detection application

Table 2 compares the model performances and Figure 15 presents a bar chart illustrating the important parameter analysis of four different models. The models compared include an unpruned model, a pruned model, InceptionV3, and Resnet152v2, to achieve high accuracy in a CNN model.

Table 2. Model comparison

Model

Training Accuracy

Training Loss

Validation Accuracy

Validation Loss

Unpruned Model

85.19

40.21

78.9

58.6

Pruned Model

97.74

7.61

84.57

41.4

InceptionV3

94.46

41.4

89.2

93.39

Resnet152v2

94.72

42.56

92.9

32.5

5.6 Android application

From the comparison of the above algorithms, ResNet50 and the pruned model has almost higher accuracy. So, the pruned model is employed to progress an Android application using software called Android Studio. The TensorFlow lite file of our model is used for the development of an Android app. Figure 16 explains the flow of the development of the Android app. This app will show the status of a leaf and provide organic fertilizer suggestions for diseases. These organic fertilizers are referred from Google. The app can be developed using Java and Kotlin. Among these, this app is developed using Java [20]. Figure 17 shows the result obtained by uploading images through the gallery and taking pictures through the camera and remedy page.

Figure 16. Flow of Android application

Figure 17. Results of plant disease detection app

6. Conclusion

In conclusion, the integration of digital farming technologies such as auto-irrigation systems, nutrient monitoring tools, and advanced disease detection methods holds significant promise for sustainable agriculture. These innovations enable farmers to optimize resource use, enhance crop yields, and reduce environmental impact. Auto-irrigation systems ensure precise water management, conserving water and reducing labor costs. Nutrient monitoring tools provide real-time data, allowing for targeted fertilization that enhances soil health and crop productivity. Disease detection technologies facilitate early intervention, minimizing crop loss and the need for chemical treatments. As these technologies continue to evolve and become more accessible, they offer a pathway towards a more resilient and sustainable agricultural future. By embracing these digital solutions, the agricultural sector can meet the growing global food demands while safeguarding the environment for future generations.

  References

[1] Goswami, S. (2020). Implementation of Arduino-based automatic irrigation system. International Advanced Research Journal in Science, Engineering and Technology, 7(10): 155-160. https://iarjset.com/wp-content/uploads/2020/12/IARJSET.2020.71019.pdf.

[2] Manasweni., P., Navya Sri, M., Niveditha, O., Sushma. (2022). Automatic irrigation system using Raspberry Pi Pico. International Journal for Advanced Research in Science & Technology, 12(11): 67-72. https://www.ijarst.in/public/uploads/paper/886381668577579.pdf.

[3] Taneja, K., Bhatia, S. (2017). Automatic irrigation system using Arduino UNO. In 2017 International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, pp. 132-135. https://doi.org/10.1109/ICCONS.2017.8250693

[4] Nallani, S., Hency, V.B. (2015). Low power cost effective automatic irrigation system. Indian Journal of Science and Technology, 8(23): 1-6. https://doi.org/10.17485/ijst/2015/v8i23/79973

[5] Yasin, H.M., Zeebaree, S.R., Zebari, I.M. (2019). Arduino based automatic irrigation system: Monitoring and SMS controlling. In 2019 4th Scientific International Conference Najaf (SICN), Al-Najef, Iraq, pp. 109-114. https://doi.org/10.1109/SICN47020.2019.9019370

[6] Madhumathi, R., Arumuganathan, T., Shruthi, R. (2020). Soil NPK and moisture analysis using wireless sensor networks. In 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT), Kharagpur, India, pp. 1-6. https://doi.org/10.1109/ICCCNT49239.2020.9225547

[7] Pratama, H., Yunan, A., Candra, R.A. (2021). Design and build a soil nutrient measurement tool for citrus plants using NPK soil sensors based on the internet of things. Research of Artificial Intelligence, 1(2): 67-74. https://doi.org/10.47709/brilliance.v1i2.1300

[8] Madhura, U.K., Akshay, P., Bhattad, A.J., Nagaraja, G.S. (2017). Soil quality management using wireless sensor network. In 2017 2nd International Conference on Computational Systems and Information Technology for Sustainable Solution (CSITSS), Bengaluru, India, pp. 1-5. https://doi.org/10.1109/CSITSS.2017.8447860

[9] Pyingkodi, M., Thenmozhi, K., Karthikeyan, M., Kalpana, T., Palarimath, S., Kumar, G.B.A. (2022). IoT based soil nutrients analysis and monitoring system for smart agriculture. In 2022 3rd International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India, pp. 489-494. https://doi.org/10.1109/ICESC54411.2022.9885371

[10] Swaminathan, B., Palani, S., Vairavasundaram, S., Kotecha, K., Kumar, V. (2022). IoT-driven artificial intelligence technique for fertilizer recommendation model. IEEE Consumer Electronics Magazine, 12(2): 109-117. https://doi.org/10.1109/MCE.2022.3151325

[11] Bavithra, K., Latha, R., Shanmuga Priya, K.R. (2023). Qualitative analysis of dusting and soiling in solar PV system using Learning Algorithms. In 2023 International Conference on Intelligent Technologies for Sustainable Electric and Communications Systems (iTech SECOM), Coimbatore, India, pp. 308-313. https://doi.org/10.1109/iTechSECOM59882.2023.10435117

[12] Karunanidhi, B., Nandhini, B., Kumari, S.R.J., Sirpikadevi, M., Sugassini, M. (2022). Plant disease detection and classification using deep learning CNN algorithms. In 2022 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT), Bangalore, India, pp. 1-6. https://doi.org/10.1109/CONECCT55679.2022.9865677

[13] Divya, R., Pavithra, C.V., Jeyashree, A., Bavithra, K. (2022). Smart crop prediction and irrigation management system. NeuroQuantology, 20(8): 9460-9470. https://www.neuroquantology.com/media/article_pdfs/9460-9470.pdf.

[14] Shafi, U., Mumtaz, R., García-Nieto, J., Hassan, S.A., Zaidi, S.A.R., Iqbal, N. (2019). Precision agriculture techniques and practices: From considerations to applications. Sensors, 19(17): 3796. https://doi.org/10.3390/s19173796

[15] Obeidat, M.A., Abdallah, J., Hamadneh, T., Qawaqneh, H., Mansour, A.M. (2024). Enhancing agricultural operations through AI-driven agent communication in smart farming systems. Ingénierie des Systèmes d’Information, 29(3): 917-928. https://doi.org/10.18280/isi.290312

[16] Rao, P.B.S., Venkatesh, R.T., Murthy, S.G., Negavadi, S.B., Srinivasulu, T., Nataraj, Y.B., Satish, V., Balenahalli, V.K. (2024). Automated IoT solutions for efficient hydroponic farming: Nutrients, PH and lighting management. Journal Européen des Systèmes Automatisés, 57(5): 1273-1283. https://doi.org/10.18280/jesa.570503

[17] Wahul, R.M., Sonawane, S., Kale, A.P., Lambture, B.D., Dudhedia, M.A. (2023). Smart farm: Agriculture system for farmers using IoT. Ingénierie des Systèmes d’Information, 28(2): 401-407. https://doi.org/10.18280/isi.280215

[18] Ozaki, R., Tsujimoto, Y., Andriamananjara, A., Rakotonindrina, H., Sakurai, T. (2024). Optimizing fertilizer use by providing soil quality information: experimental evidence from Madagascar. Agriculture & Food Security, 13: 45. https://doi.org/10.1186/s40066-024-00500-5

[19] Macharia, M., Oduor, G., Kayuki, C., Rware, H. (2016). Fertilizer use optimization approach: An innovation to increase agricultural profitability for African farmers. African Journal of Agricultural Research, 11(38): 3587-3597. https://doi.org/10.5897/AJAR2016.11408

[20] Birla, L., Lal, S.B., Farooqi, M.S., Sharma, A., Bharadwaj, A., Naik, B.J., Patel, L.D. (2024). Soil nutrient based mobile app for crop-wise fertilizer recommendation: A “SoilNutro” application. International Journal of Plant & Soil Science, 36(5): 95-105. https://doi.org/10.9734/ijpss/2024/v36i54505