Smart technologies for determining water flow in irrigation systems

. Without the need for hand-coding, Machine Learning helps systems to enhance and develop dynamically from their experiences. As a result, numerous tech firms have been creating Artificial Intelligence applications in recent years. The majority of irrigation systems available today allow customers to program them to provide a specified amount of water at specific times. On the other hand, a garden frequently has a variety of plants, each of which needs a varying amount of water. This research planned an irrigation system that uses deep learning to regulate the quantity of water given to each type of plant based on plant identification to address this problem. The software and hardware are the two primary constituents of the technology. The former is linked to cameras for plant identification and uses a database to determine the appropriate amount of water; the other regulates the amount of water that can flow out. The technology is designed to predict how long to water the plants after discovering the perfect soil moisture with the applications and incorporating it with the outcome of the existing soil moisture level with the Arduino. This will allow the program to modify the software in the irrigation system controller to alter the period of time the regulator should be kept open.


Introduction
In today's culture, irrigation systems have virtually become a necessity. People no longer have the time or energy to water their plants daily, whether in their gardens or on largescale farms; instead, they depend on irrigation systems and trained gardeners. There are a variety of irrigation systems available on the market today, each with its own set of benefits and drawbacks based on the size of the region, climatic conditions, crop type, cost, and labor [1]. The drip system and overhead sprinklers are the most widely utilized ones [2]. Despite differences in design and construction, most systems have regulators coupled to a controller, as seen in Figure 1. The user can program the time periods when the regulator should be open using the controller. The water can flow through while the regulator is open. Watering has become much more convenient as a result of modern irrigation systems. The automatic watering system, on the other hand, has flaws. Inadequate irrigation schedule is one of the most serious issues. Adequate irrigation enables the soil moisture to be maintained at a level that maximizes the plant's production efficiency. The amount of water between soil particles is referred to as soil moisture. Overwatering and underwatering are two possible outcomes of inadequate irrigation. Overwatering not only wastes money and water but can also kill crops by preventing them from absorbing oxygen from the soil.
Conversely, underwatering occurs when crops do not receive enough minerals from the soil [3]. Because different plants need varying degrees of soil moisture, choosing how much water each type of plant requires may seem counterintuitive to those who are new to gardening. Furthermore, the moisture content of the soil would be easily affected by weather and other variables. Users face difficulties when they are forced to update the programs in their controllers regularly to keep up with these necessary changes.
The given solution is to separate the yard into several practical regions based on the types of plants. The controllers are normally set up with three pre-programmed routines. As a result, users can choose which program to run in each zone. Although this method increases the functionality of the irrigation system, it is frequently insufficient when a lawn has more than three regions. Furthermore, the technique is unlikely to handle the problem's weather component. It is critical to develop an irrigation system that can optimize water use in areas that are constantly experiencing drought. This research provided smart technologies to boost the functionality and efficiency of irrigation systems. The use of machine learning, databases, and moisture sensors to solve the challenges outlined in present irrigation systems.
The rest of the article is ordered as follows: Previous works will be stated in Part 2; The challenges are addressed and explored in Part 3. The technologies will be discussed in Part 4; the research will summarize the approach and the implementation and limitations in Part 5.
The agriculture industry is one of the countries' most vital socio-economic assets, emphasizing the need to effectively manage existing water resources to maintain the economic sector's survival. Conventional sensors for agriculture and irrigation systems are extremely costly for small farmers to install on their fields. On the contrary, companies are now developing low-cost sensors that may be attached to nodes to create low-cost irrigation systems and agricultural surveillance systems.
The research summarizes the knowledge regarding smart irrigation systems due to current developments in sensors for the execution of irrigation systems for agriculture and the development of IoT technologies that can be employed to construct these systems. Other researchers have focused on irrigation systems, water management, and precision agriculture technologies in their research. Conversely, other published studies on smart irrigation systems reviewed a large number of papers [4][5][6][7] and so do not give an in-depth examination of modernization in irrigation systems.
Nevertheless, some studies have also utilized machine learning in irrigation systems. But rather than determining the plant's type, the research relied on climate data machine learning, which entails learning the pattern through daily maximum and lowest temperatures in order to forecast crop water needs [8]. This analysis is noteworthy since it included deep learning. Nevertheless, while this research addresses the second aspect of the issue, namely that weather can affect soil moisture, it does not take into account the variable crop water needs for different plant species. Aside from irrigation-related research, there have also been studies that have applied deep learning to plant health. Crop diseases have been devastating, particularly in nations with limited infrastructure and competent workers.
Researchers are working on a study that will use photos to perceive plant diseases such as Apple Scalp to address this problem. This is accomplished by a procedure similar to that used in the contemporary study. Deep learning was also used to recognize photos with the apparent disease. This study yielded a very positive outcome, with a trained model that is 99.35 percent accurate [9].

Frequent challenges faced by the irrigation system 2.1 Variations in soil moisture content
The first issue to be directed on is the fact that different varieties of plants have different soil moisture content. Each variety of plants necessitates a varied amount of water to maximize its growth; thus, irrigation time and frequency must be adjusted accordingly. Finding the appropriate irrigation time for each of the plants in the garden and adding them to the program is highly unfeasible for the owner. For example, sugar cane would need 2500mm of water in its total growing period, while beans only need around 500mm of water (Table 1). One or both of the plants would not grow properly if the garden watered them evenly and for the same period of time.

Weather inconsistency and its impact on soil moisture
Different countries have different humidity and precipitation levels changes during the four seasons. Let us consider examples of two countries. During 2020, the humidity in Mexico increased from 65% to roughly 100% and then dropped to 74% by the end of the year (Fig.  2). In the same year, the humidity in Atlanta increased from 47% to roughly 100% and then dropped to 60% by the end of the year (Fig. 3). The humidity level highly influences the proportion of moisture in the soil. When the humidity is high, the required irrigation time is sometimes cut in half.
Furthermore, temperature differences can have a considerable impact on the soil content. Because the weather varies from year to year, the owner cannot create an appropriate irrigation schedule for each season ahead of time. Many people would stick with the same regimen, which could result in overwatering or underwatering. Second, it's possible that it'll be a waste of both water and money. The owner would have to alter the plan every season of the year, which would be time demanding.

Smart technologies in irrigation systems
The research offered and built an IoT system that offers users both functionality and eases to overcome these difficulties.

Recognition of plant
An artificial mobile software based on deep learning has been designed to instantly determine the type of plants to achieve the most appropriate design for plant watering. It consists of docker, tensor flow, image net database and android studio as programs and environments used in the execution.

Structure of Docker
Docker is a software container technology that allows you to communicate with coworkers without having to install anything on your computer. Developers can run the packaged software in isolation, reducing the time and effort required to install a whole operating system [13]. Because the data that needs to be used in the generated software is quite large, such a platform is required.

Structure of TensorFlow
TensorFlow is a Machine Intelligence open-source software library created by the Google Brain Team to undertake machine learning and deep neural network research [14]. The deep learning part of this project is handled with TensorFlow. Deep learning is a subset of machine learning that employs a non-linear approach to data processing. This means it can take into account a variety of parameters when looking for a pattern [15]. This is crucial since the findings would be more precise in many cases. After downloading TensorFlow, deep learning will be utilized to identify plants through picture recognition in the current research. It is available for download by cloning the git repository.

Image Dataset
Transferable learning is employed in this research, which means we start with an already existing framework. The framework this research developed was trained using the ImageNet Large Visual Recognition Challenge dataset, which allows it to categorize up to 1,000 classes [16]. This is due to the fact that deep learning from scratch could take a long time.
One needs to upload a large number of photos of each plant species into the TensorFlow framework for the software to recognize the plant. This research chose about ten species for testing purposes, including orchids, roses, lilies, cherry blossoms, and so on. Ten files were created, each named after a plant. 20-30 photos of that species were obtained and saved to the appropriate file. After that, the code was entered to train the images.

Image identification
With TensorFlow, the task of forecasting an image becomes really simple. With the following code, the software can forecast how many percent chances the image would fit into each category once the user uploads an image into the environment and saves it as your file name>.

Incorporation of mobile app
The final step in the software development process is to turn it into an app that can be downloaded on mobile devices. Android Studio, an Android-specific development environment, is used in this project. An android project has previously been created to combine a device's camera function with the software's plant recognition proportion [17].
Following the optimization of the TensorFlow model, the trained framework will be optimized for use on the Android platform before being injected into a pre-built Android project. Rather than depending on a backend forecasting server, researchers decided to preload all of the trained designs to the mobile app so that users can use the system with the greatest flexibility possible, regardless of their Internet connection status. Furthermore, conducting picture identification on a mobile device is often faster than running remote forecasting through the backend. Following the identification of a plant, the database will be examined for its most optimum soil moisture content.

The Internet of Things (IoT) Irrigation Controller
The watering system's primary control is applied as an IoT system. Moisture and temperature sensors are included in the system, which allows it to display the climatic conditions in real-time.
In the meantime, the scheme joins the irrigation system's electricity and activates the switch based on the state of the soil and the plants' individual outline. Arduino UNO REV3, Arduino IDE and Temperature/Moisture Sensor are used as platforms and tools in the development of the IoT system.

Arduino UNO REV3
Arduino is a microcontroller board that includes inputs, outputs, USB connectivity, a power jack, a socket, and a restart button [18]. It is utilized in this method to acquire moisture sensor inputs and then communicate them to a computer through Bluetooth.

Arduino IDE
The Arduino IDE is a C++-based development environment designed exclusively for the Arduino board. It makes it simple for users to code, upload programs to the board, and receive information from the board. The researcher employed it to program the Arduino to send data every three seconds to the computer. It can also use simple lines of code to transform the numbers obtained from the sensor to a readable moisture level.

Temperature/Moisture Sensor
The temperature/moisture sensor utilized in this research is a Phantom YoYo Arduino compatible High Sensitivity Temperature/Moisture Sensor. It has a high level of compatibility with the Arduino interface and can detect moisture simply by being inserted into the soil. The following is how the temperature/moisture sensor is linked to the Arduino Uno. Before we can comprehend how it detects moisture, one must first comprehend that because water is polar, it facilitates the flow of electricity. As a result, when the sensor is put into the soil, it attempts to pass current through the soil via the two probes. The moisture sensor then analyzes the resistance to determine the moisture level [8]. After reading the moisture level, the sensor then provides the data to the Arduino as inputs. Lastly, the nodes accept these data over Bluetooth. Fig. 5 illustrates the laboratory setting of the proposed model.

Results
The programs are designed to predict how long to water the plants after discovering the perfect soil moisture with the app and incorporating it with the outcome of the existing soil moisture level with the Arduino. This will allow the program to modify the software in the irrigation system controller to alter the period the regulator should be opened.
The app's plant identification feature overcomes the first problem: various plants have different soil moisture levels. With the help of machine learning, a snapshot of a plant can be used to search a database for the best soil moisture for that plant.
The other difficulty, variability in weather that influences soil moisture, is addressed by the soil moisture sensor proportion. One can change the irrigation duration based on the data because the moisture sensor regularly transmits information to the machine. Such as, if the most optimum soil moisture level for roses is 60%, and it is now sunny, and the sensor indicates that the moisture level is 45%, the regulator will remain open for some time. The application will notify the controller to stop the regulator after the percentage has reached an ideal level, which is around 50% for a set period of time.
Below are some of the benefits of this framework. -Irrigation will come to an end so that no water is wasted. -The soil moisture sensor allows the irrigation system to be more adaptable regardless of whether the weather has higher or lower moisture.

Conclusion
To conclude, the goal of this research was to make irrigation systems more user-friendly and customizable. This study employed deep learning to identify plants and a database to calculate each plant's most suitable soil moisture level, saving inexperienced gardeners the hassle of figuring out data about each plant. Moreover, this research used soil moisture meters and Arduino to frequently upgrade the irrigation system, allowing the irrigation system to respond to the weather.
Researchers should intend to test the updated system on a bigger scale in the future. Instead of only having roughly 30 classes, try to offer a wider range of options. Future researchers should also intend to increase the model's accuracy by training a larger number of photos for each class. This can be accomplished by forecasting soil moisture levels centered on weather forecast data. Temperature extremes, humidity, and precipitation must all be taken into account.