WSN Smart Irrigation System and Weather Report System

This paper proposes a cost-effective system that can be used by farmers easily. In these modern times also, we find farmers going to their fields to check the water level and to see that no cattle are present near the field. Even if there are cattle he can’t do anything at that moment. So, we proposed a system where he can be notified if there is any animal or if the water content is low on his registered mobile number. In this system, an irrigation-based Wireless Sensor Network (WSN) using Raspberry Pi and the solar panel is implemented, Raspberry Pi being used as Coordinator node and Arduino as an end node, nRF24L01 as a transceiver. The sensor input values such as soil moisture level, PIR; the temperature is collected by the Arduino and is wirelessly sent to the Raspberry Pi. The water pump can be turned on based on sensor values using the Raspberry Pi web server and those values are also posted on the webpage. For temperature and humidity detection, we used the DHT11 sensor and the solar panel is used as an additional source of power. A PIR sensor is used to check if there are any animals present near the field.


Introduction
In India, most people depend on agriculture as their livelihood, in ancient times groundwater level was high so crop yield was high. With the regular irrigation system, the field has to be monitored by the farmer continuously which is a huge challenge. In modern times, technology has improved a lot, and internet connectivity even available at cheaper rates. So, farmers can use WSN based irrigation system to control the crops through their smartphones. Farmers can know the temperature, humidity, Water level of their crops in the smartphone through which they can efficiently secure their crop yield. It is also a major reason for the reduction in crop yield and cattle. If we have Irrigation and atmospheric condition systems we can solve these problems and improve the crop yield.

Literature Review
Many efforts have been made to propose by Agrawal and S. Singhal [1], to design an energy-efficient and cost-effective home automation system for ready to use. Internet of Things and WSN based field security which was implemented by Tanmay Baranwal, Nitika et al [2] to detect rodents and insects in the field and inform farmers immediately using Cloud Computing and Big Data. Gutierrez J, Villa-Media, J.F, et al [3] proposed a system of automated irrigation for effective utilization of water for crops. This system checks with sensors the temperature and soil moisture at the root regions of the plant using a distributed wireless network. Besides, the gateway unit which handles sensor results and activates actuators is used for a web application. R. Hussain, J. Sehgal, et al [4] discussed different techniques of soil fertility measure because of checking productivity of the crop. Chuang Yu, Yi Wu, et al [5] proposed a system that controls the output pressure of channel pipe with an intelligent meter by adopting a fuzzy control algorithm. R.Karthikeyan, P.Mahalakshmi, et al [6] proposed a hybrid IOP Publishing doi:10.1088/1757-899X/1042/1/012018 2 solar energy and wind power in rural India for pumping water effectively. A. Satya. J. Kishore et al [7] proposed an irrigation system that controls water flow and also monitors the soil moisture status of the field. An SMS is delivered to the farmer about the amount of time water is to be supplied to the crops. Kamalesh and Usha Rani [8] developed web-based irrigation using ZigBee which monitors the soil moisture and motor status. K. K Namala Krishna Kanth Prabhu et al [10] proposed an intelligent Irrigation system, which could be used to control water flow for flower plants. So human involvement is reduced for watering plants.

Hardware Description
Figure1 below shows the Wireless Sensor Network based automatic irrigation system using a solar panel as a backup power source and using Raspberry Pi for security. The embedded system includes various components that communicate with each other and making it much easier to monitor the field parameters. The system includes an end node and the main node. The main node is a Raspberry Pi module which collects various field parameters from the end node and updates those values in the web server so it is easy for farmers to monitor the status of the field in real-time. Arduino Uno board is the end node that is interfaced with components like temperature sensor, soil moisture sensor, PIR sensor, and buzzer.

Figure1. Wireless Sensor Network Block Diagram
An nRF24L01 transceiver module was used for communicating with the main node. The temperature and soil moisture sensor at the end node senses the moisture and temperature parameters and sends these values to the main node. The PIR sensor is used for cattle intrusion detection if any cattle are entering the field the PIR status becomes high and the buzzer will turn on and drive away, the cattle from the fields. The values from various end nodes are sent to the main node then it compares the threshold value been set and does the functions like turn on or turn off the pump accordingly. The status of sensor parameters of each pump node is displayed on a web page which is to be observed by the farmers with their mobile device or a device that is facilitated with the internet through the web page.

Raspberry Pi3 Model B
In this paper, Raspberry Pi is the main node and it has the following specifications.

Arduino Uno
It is an ATmega328P general-purpose microcontroller. It has a total of 14 input/output digital pins, 16MHz ceramic resonator, 6 analog pins, USB connecter, a power jack, reset button and finally ICSP header.

nRF24L01 Transceiver
It is a wireless transceiver that operates with 2.4Ghz frequency and a supply of 1.9-3.6V. The information was sent at a data rate of up to 2Mbps. In this paper, nRF24L01 transceiver pairs are used to link Raspberry Pi and Arduino. The Raspberry Pi receives sensor values from the nRF24L01 device. Here in this paper transceiver is used as it can handle detected data concurrently from multiple nodes.

PIR Sensor
A passive Infra-Red sensor is used to detect the motion by sensing changes in infrared levels. The output is in the digital format and it can be either 0 or 1. The range it can detect humans and cattle is around 20ft.

Humidity and Temperature Sensor
Both humidity and temperature can be measured using a DHT11 sensor. The sensor has an inbuilt NTC which measures temperature and to send the values of temperature and humidity it uses an 8-bit microcontroller that sends the data in serial form. The temperature can be measured from 0 o C to 50 o C and 20% to 90% of humidity range using Humidity and Temperature sensor. This sensor can be used where the end node exists in this range of temperatures.

Soil Moisture Sensor
In this paper, a sensor for sensing moisture consists of LM 393 comparator circuit along with two probes. The LM393 comparator was used to compare soil moisture levels with a predefined threshold value. When the soil moisture is more than the predefined threshold value the sensor output becomes low and vice versa. Therefore these sensors are used by farmers to monitor field moisture status in turn they can manage the water flow to the fields, thereby it saves water and results in increased crop yield.

Software Tools
To develop a Wireless Sensor Network based Irrigation System along with security and backup power as a solar panel, different types of software are used like Arduino IDE, or Python and Adafruit IO which is a Raspberry Pi server for IoT applications.

Arduino IDE
IDE stands for Integrated Development Environment. With this IDE the written programs are debugged and uploaded to Arduino and the remaining modules are interfaced with Arduino. The program file is saved with the extension of .ino. Adafruit IO is a cloud service platform; here we can monitor various parameters of the field like humidity, the moisture of the soil, atmospheric temperature, and motor on/off control. Every Raspberry Pi has a specific IP address that is unique by this IP we can retrieve the information send by that Raspberry Pi. This IP is stored in the python code as soon as the program is executed the field parameters from the end node collected by the Raspberry PI is sent to the Adafruit IO server.

Python Language
It is a high-level scripting language. The specific tasks are done by pre-coded libraries. It has various inbuilt libraries for doing a specific task in the embedded system domain. The extension .py is used to save the program files. Figure 8 and Figure 9 shown below described is the flow of events that occurred at the coordinator node and end node device.

Results & Discussions
After making the proper connections to the various modules in the project and make sure that every module is properly working. The Raspberry pi is the main node that takes values from the end nodes which is Arduino. The Arduino sends the various sensor values like moisture, temperature, and humidity conditions of the field through a wireless module known as NRF Transceiver which does both transmission and reception, here at the end node it only transmits, and the NRF Transceiver at the main node receives these values and compares with threshold and takes necessary actions weather to ON/OFF the motor according to the soil status and the farmer can monitor these values from the Adafruit IO server webpage.

Conclusion
This smart WSN irrigation system is a value-effective device to optimize and save water for future generation agricultural requirements. This device has been developed successfully to the lookout of irrigation requirements for optimum utilization of water for crops by analyzing the temperature, humidity, soil moisture of the field. This smart irrigation system is a successful one and maintains watering activities without human control or intervention. The foremost applications of this project are farming crops and gardening. It reduces the human intervention in maintaining the moisture or water level for the crops. The moisture sensor sends a signal to the Arduino board which converts the analog signal to the digital signal. This signal triggers the pump to point out ON and supplies the water there to a specific area of the crop through the motor. We will get the status of the temperature and motor on the mobile itself without visiting the field. Using this Irrigation system is proof that the usage of water even is reduced. And also give some info as temperature and supply animal entry prevention. This system is exceptionally multipurpose and inexpensive. It doesn't require persons on duty; it is straightforward and trustworthy. This irrigation system permits farming even in the places where scarcity of water is present and it improves sustainability. The utilization of different energy during this system is appropriate and meaningfully significant for organic crops and other farming crops that are