Keywords

1 Introduction

1.1 Motivation

India is not a country of abundant water resources, and many of its states are predicted to face severe drought soon. This is due to the wastage of water owing to poor management. Now, as  we know agriculture is the primary consumer of water and if we can design and implement systems that can reduce the wastage in agricultural fields, then we can save a lot of water every year. To achieve this efficiency, manual systems of irrigation are not good enough and need a technology-aided system which may be automatic or semi-automatic and hence comes into picture the technology-aided system which is better known as smart irrigation systems.

1.2 Literature Review

Pednekar et al. [1] have proposed a system using a soil moisture sensor, microcontroller, and Zigbee. Zigbee is used for wireless communication between sender and receiver. In addition to this, a GSM module has also been added for alerting the user regarding the moisture content of the soil.

Thamaraimanalan et al. [2] have discussed designing an IoT-based system using sensors and NodeMCU. Sensors like a soil moisture sensor, a temperature and humidity sensor, and an ultrasonic sensor have been used for the application. An android application has been developed and taken into use for remote monitoring and controlling the system.

Bafna et al. [3] have developed a system using Arduino Uno, NodeMCU, and soil moisture sensor. For storing data, the Firebase application has been taken into use. They have also developed an android application, wherein location-based weather prediction is done using mobile GPS and weather API, and based on this prediction and sensor data, users can decide whether to turn ON the motor or not.

A system using cloud-based application ThingSpeak, a light sensor, and a soil moisture sensor that have been interfaced with Arduino Uno and Arduino Wi-Fi shield has been proposed and developed by Al-Omary et al. [4]. The ThingSpeak channel has been used to store the threshold values of moisture content of soil and the amount of light required for plants to enable the system to make decisions based on those threshold values and sensor readings.

Garg et al. [5] have reviewed some of the soil moisture sensors already available and discussed their specifications, properties, applicability, advantages, and disadvantages, hence making it easier to select which type of sensor will be suitable for us.

Arduino-based smart irrigation system using GSM module and sun tracking solar system has been explored by Karmokar et al. [6]. The solar tracking feature is the main focus of this project. This feature helps to consume the maximum energy from the sun, while the sun changes its azimuth over the day.

Hatanaka et al. [7] have talked about the use of a tensiometer, which works on the principle of measuring the pressure force required to extract moisture from the porous cap presented in the soil, as a potential way of measuring soil moisture. They designed the system as a client–server system, where the client is the user who uses the interface developed to fetch data from the server. The server system consists of the grove moisture sensor along with Arduino Uno and Ethernet shield.

Jain and Kumar [8] have developed a smart irrigation system using sensors like soil moisture sensor, water-level sensor, temperature sensor, humidity sensor, and an ARM7 processor. A water-level sensor is used to keep track of the water present in a water tank.

A system was developed by Athani et al. [9] where a soil moisture sensor is connected to an Arduino which is, in turn, interfaced with an android application using a Wi-Fi shield. Soil moisture is continuously monitored by the sensor, and the output values are stored in a database. The output values are fetched from the database and displayed in the android application.

Divya Dhatri et al. [10] have designed a low-cost Arduino-based irrigation system using a soil moisture sensor. An LCD module is used to display the relevant information and status of the motor.

Prasojo et al. [11] have designed a smart irrigation system using a basic sensor like soil moisture sensor and Arduino Uno along with other modules like relay module, LCD module, and solenoid valve motor.

A detailed discussion on soil water content and threshold limits for irrigation management has been done by Datta et al. [12]. The terms related to soil moisture condition like volumetric water content, soil matric potential, saturation, and field capacity have been introduced and discussed in detail.

Patel et al. [13] have discussed an Arduino-based irrigation system that consists of sensors connected to it and an ESP8266 module for Internet connectivity to send data to the ThingSpeak channel. It has a wireless sensor network for real-time sensing of irrigation systems. This system avoids wastage of water by automatically switching ON the motor when the moisture level in the soil reaches below a threshold value. All current statuses of the system will be displayed in the user’s android application.

A discussion on implementing an irrigation system based on the Internet of Things (IoT) using ESP8266 NodeMCU and temperature and humidity sensor has been done by Anitha et al. [14]. The ThingSpeak server is taken into use to keep track of the moisture level in the soil and to store the data in the IoT cloud. Also, rain alarm and soil moisture detector circuits are used to build the smart irrigation system.

Naeem et al. [15] have discussed developing an irrigation system by integrating a real-time monitoring system having remote controllability and cloud computation of stored data. In addition, a mobile application has also been developed for a better user experience. They have designed the system using various sensors and water-level detector in addition to NodeMCU and Arduino development board.

An irrigation system was developed by Karpagam et al. [16] using Arduino UNO, soil moisture sensor, water-level sensor, temperature and humidity sensor, and GSM module. With the help of the GSM module, the information regarding the ON and OFF states of the water pump is sent to the user.

Sen et al. [17] have utilized Arduino UNO and ESP8266 Wi-Fi module to design their system. Arduino collects all sensor data and sent them to the ThingSpeak channel using the ESP module.

Smart irrigation is of priority to many researchers nowadays, and it is evident from the fact that a lot of work have been done concerning it. Research works on smart irrigation have been studied, and based on the shortcomings of the available research work, this work has been executed. The research works discussed above have some limitations like without a rain sensor the system would not be able to sense if it is raining and thus turn OFF the motor in case it is turned ON at that instant. Also, rain prediction using weather API and location extraction using GPS module will help the existing system extensively in making accurate decision. These two features have been added in this work to make the system truly smart decision-making device.

2 System Design and Implementation

The architecture of the designed system prototype is shown in Fig. 1. It shows the microcontroller in the centre as the decision-making hub, and all the sensors and modules are connected to it. The phone block shown in the block diagram is not connected directly to the microcontroller but is shown as a symbol to signify that it is a part of the working system. The phone is used in the system as an additional component to alert the user by sending SMS.

Fig. 1
figure 1

System architecture

Figure 2 shows the implemented hardware. It shows the actual sensors and modules used in this work.

Figure 3 shows the flow chart of the system. First, the system is turned ON by supplying power to the Arduino and the GSM-GPS module. As soon as the system is turned ON, the soil moisture sensor reads the moisture content of the soil, and the temperature and humidity sensor reads the temperature and humidity of the place surrounding that system. These collected data are then sent to a ThingSpeak channel where we can store them.

Fig. 2
figure 2

Implemented hardware

Fig. 3
figure 3

Flow chart

The GPS integrated along with the GSM module determines the geographical coordinates of the location where the system is placed in the form of latitude and longitude. An API weather call is made in the OpenWeather website by making use of the determined coordinates which fetches weather data of the given location in JSON format and contains information related to rain, wind speed, wind direction, clouds, etc. The rain sensor module used in the system keeps checking the wetness of the board for determining if it is raining. Now, all the data that are collected by the sensors will be compared against their respective threshold limits already set by the user. If the result of comparison meets the set threshold limits, then the input signal of the relay is set high which would turn on the motor till threshold moisture condition is not reached.

3 Results and Discussion

ThingSpeak, a cloud-based IoT platform from Mathworks has been used for storing the sensor data sent by the Arduino microcontroller. These data are plotted in ThingSpeak in the form of graphs which give a better visualization of the data. Some of the screenshots of the plotted data are shown in Fig. 4a–e. Also, ThingSpeak has the feature of remotely controlling the system based on the analysis of the stored data.

Fig. 4
figure 4figure 4

a Temperature field. b Humidity fields. c Soil moisture content field. d Temperature threshold field. e Soil moisture threshold fields

Figure 4a shows the plot of temperature reading from the DHT11 sensor versus time. The graph shows the values of temperature recorded along the y-axis at different instants of time. Since there are slight variations in temperatures recorded, the graph seems to have abrupt changes in readings.

Figure 4b shows the reading of humidity recorded by the sensor at different instants of time. The maximum and minimum humidity recorded were 95% and 93%, respectively. As the variation in humidity is very less, hence the graph is having abrupt changes, i.e. spikes.

Figure 4c shows the graph of soil moisture content of the soil of the location where the device was placed. The system was tested for its performance at different levels of soil moisture content, and hence, there are variations in reading as seen in the graph.

Figure 4d, e represents the temperature threshold, soil moisture threshold and are constant that depend on the type of soil and crops grown. These values are stored in the ThingSpeak channel in the form of bar graphs and not as continuous line graphs at different instants of time and hence seem to have some values missing.

4 Conclusion

A prototype of an IoT-based advanced irrigation system has been designed and implemented using different sensors and modules. This system was developed to provide a cost-effective, reliable, and user-friendly system for the mass to achieve the goal of smart irrigation to a great extent. In this work, we have utilized the cloud-based application “ThingSpeak” to store, visualize, and analyse the data captured by various sensors. All the data were sent continuously to the ThingSpeak channel over the Internet. GSM module was used for two specific reasons: first to solve the problem of Internet connectivity in any remote location and second to send SMS alerts to the user. The system thus developed can take readings from the sensors interfaced with Arduino, sent them to the cloud for storage and analysis, fetch rain probability data, sense rainfall, and finally combine all these data to make a decision.

The smart irrigation system discussed in this work is found to perform better when compared to similar types of existing systems in terms of rainfall sensing and prediction due to the use of a rain sensor and API weather call.