Keywords

1.1 Introduction

The aim of this research is to provide an approximate comparison between conventional farming methods and smart farming methods. The competition among these methods is defined under water usage as well as energy usage. The first experiment is to test the usage of water for both the methods, where the process of irrigation is determined by human in the conventional method and a neural network in the proposed method, which is implemented for conventional farming as a certain amount water given to the crops with little or no intervention by the farmer on the possibility of rain while for smart farming a neural network is deployed which takes as input the humidity and temperature, and returns the chances of rainfall. This data is checked with the soil moisture at that point, and the decision to whether the crops should be watered or not is taken depending on the type of crops. The second experiment determines the power consumption for both conventional and smart farming, as it is obvious that the cost of smart farms is an issue, getting the most out of it is essential so that the invested amount is covered as soon as possible. The energy consumptions of smart farms will be comparable to normal farms although we still want a ratio so as to know what we are getting.

The idea behind the setup is having a grid of sensors all connected to the control room through the internet. At each of the grid point, we have a humidity sensor, a temperature sensor, and a soil moisture sensor. These sensors will send real-time data to the control room. The control room also receives information about the weather forecast and will primarily depend on the percentage of precipitation abbreviated as PoP. The functioning of the system is that the input, which is the humidity and temperature reading from the farm, is used to find out the chances of rain in the near future and a threshold can decide when should the crops be watered and how much water should be used. The system employs neural networks to create a lookup table between humidity, temperature, and probability of precipitation. The neural network is trained for a particular season and is updated simultaneously, while it is being used to optimize water consumption. The aim of using neural networks is that if any other parameter is to be added in, along with the existing inputs, the solution will just be another set of weights with minimal changes in the existing weight. The first part of the research is acquisition of the data set, and the second part is testing. The concept of a sensor sticks in [1] uses a soil moisture and a temperature sensor which has been extended to a sensor grid. In [2], the different conditions required for a crop to flourish are documented which can be used for the neural network training. Since we are using a sensor grid, the data can be handled as mentioned in [3]. Wolters et al. [4] include the different parameters that can be included in the computation. Implementing GSM modules as in [5] to create a wireless sensor network is an energy efficient solution, but the speed provided by a GSM module is not required at that level. The concept of a control room to monitor the data as well as taking suitable actions is provided by [6]. In [7], the use of an app to monitor data from the field is implemented using MySQL database which can be formed using the concept of big data. The microcotroller unit is interfaced with the help of arduino forum [8] and sensor data sheets provided by adafruit industries [9].

1.2 Preparation of Setup

The acquisition of data to train the neural net as well as to update the weight with the changing weather conditions is taken live from the field and stored, to convert the physical conditions to voltage values we need a transducer, it is done through a simple humidity and temperature sensor-DHT11 by Adafruit and a soil moisture sensor. These sensors are described in detail below.

1.2.1 Humidity and Temperature Sensor-DHT11

The DHT11 sensor has a low power requirement and works on 3 V with a sampling period not less than 1 s. The range of the sensor lies between 0 and 50 °C for temperature and 20–90% of relative humidity. The accuracy for humidity is ±5% RH and for temperature is ±1 °C. These specifications are well suited for our application and are compatible with 8-bit microcontroller units. The working of the sensor is based on a resistive-type humidity measurement and a negative temperature coefficient measurement portion. The most important feature of this sensor is the high reliability and long-term stability (Fig. 1.1).

Fig. 1.1
figure 1

DHT 11 Temperature and Humidity Sensor

1.2.2 Soil Moisture Sensor

The soil moisture sensor is another low power sensor which utilizes 5 V to operate and typical current of 300–700 mA. The sampling period has been set in sync with the former sensor as 1 s. The working of this sensor is based on the measurement of capacitance between the two plates. The sensor output voltage is directly proportional to the dielectric permittivity and hence the water content (Fig. 1.2).

Fig. 1.2
figure 2

Soil moisture sensor

1.2.3 Arduino MCU

This Arduino works on ATmega 2560 which has 54 digital pins and 16 analog pins, out of which 2 will be used for our sensors. It has a clock speed of 16 MHz and a dc current of 20 mA per pin. This microcontroller has been chosen for its low power consumption and support of serial communication protocols in practical applications where instead of a single sensor we have a grid of sensors, and each sensor will be connected to a bus. The identifier assigned to each of the sensors will then determine the parameter value in the proximity of that sensor (Fig. 1.3).

Fig. 1.3
figure 3

Arduino Mega 2560

1.3 Training of the Neural Network

A neural network is analogous to the human brain with the cell body as the summing point of all the signal entering it from other neurons. The cell triggers when the threshold has been reached. The signals then travel down the axon and reach the synapse where they are multiplied with the weights. Neural network learns when these weights are modified in a way that the error between the true output and the computed output is the least. The data acquired from the sensors in the field and weather forecast is used to train the neural network consisting of two inputs neurons, five hidden neurons, and one output neuron. The input variables are humidity and temperature in the field, and the output variable is the percentage of precipitation. The values will be compared with the values of the chances of raining from a trusted weather forecast data. The soil moisture data has no part in the neural network training but will give us the amount of water in the soil. The neural network is simulated using MATLAB, choosing the problem as a mapping from input to output feedforward network, although the use of a feedback network which will compare the computed percentage of precipitation with the data acquired from the forecast will increase the accuracy of the net. The reason behind not using the weather forecast data directly is that it is indicative of a generalized percentage, but the one we calculate from the neural network will be very specific and will include the effect of nearby industry emissions. The method used for minimizing the error in the cost function is scaled conjugate gradient method because it uses less memory and stops when the mean squared error stops decreasing.

1.3.1 Sample Data Set

This data set is one of many data sets on which we have trained the neural network. The samples show the variance of temperature, humidity, and soil moisture during the day. The output of the neural network, that is, the percentage of precipitation has been taken from the weather forecast for that particular time instant (Figs. 1.4 and 1.5).

Fig. 1.4
figure 4

Temperature readings from the field

Fig. 1.5
figure 5

Humidity readings from the field

1.4 Testing of the Neural Network

The neural network was tested on a variety of data set acquired during day and night with the accuracy of 76% and can be improved by adjusting the number of weights or in other words number of hidden neurons in the network. The neural network will have to be trained again and again as the seasons change and as the effect of pollutants increases, keeping in mind that it is just an approximation by a machine, human intellect can still overcome it by giving the person in-charge in the control room to have a provision to control the setup.

1.5 Optimization of Water Usage

The percentage of precipitation calculated on the basis of humidity and temperature using the neural network is used as a future reference whether the crops should be watered or not. There are different soil moisture levels, and different kinds of soils have different infiltration rate (Fig. 1.6).

Fig. 1.6
figure 6

a Infiltration rate for different kinds of soil. b Water requirement for crops under different weather conditions. c Water requirements by different crops

The advantage of using a neural network is that another custom factor can be included in the network. Thus, adding a feature will yield better results and use water more optimally. The crop yield will also be higher and of better quality. Furthermore, the characteristics of the soil can be determined on the rate at which the water seeps down the soil or the infiltration rate.

1.6 Conclusion

Although the availability of water is an issue in both the cases, but having a limited amount of water and using it optimally can be achieved only through smart farming. The conventional farming methods are dependent on the capability of the farmer on how well can he determine whether the crops are in need of water, or the soil need to be manured because the top layer has changed in its composition, or is not suitable for the particular crop. On the other hand, smart farming can provide additional information about the soil and the changing weather conditions and save water in the best way. A farmer without the support of these new techniques would be no different from a farmer from the last century with similar machinery and the same farming techniques going down through generations. Everything is on the basis of a wild guess with no involvement of science. Using smart farming does not imply the elimination of human intellect but as an add-on to the benefits of having a system that depends on the present and future conditions and produces a better yield. As the conventional farming is subjective and will vary from place to place, there is no definite comparison, while smart farming brings out the best possible solutions according to the place and the present conditions.