WEB Based farm field Monitoring System using WSN

Òòsara Taher
2019 / 11 / 21

WEB Based farm field Monitoring System using WSN


Abstract
In current days, various parameters and measurements in agricultural environments are required to be observed. Hence traditional strategy cannot attain the ideal control effect. This monitoring system is provided high quality and productivity of crops by using wireless sensor networks and web application. To obtain appropriate results there are important items which come into play like temperature, humidity, light intensity, soil moisture, wind speed and soil pH which are essential for precision agriculture. The proposed system has number of nodes and base station, while each node consists of microcontroller (ESP32) and number of sensors to collect data then sending them to a raspberry pi using Wi-Fi technology and MQTT protocol. In the last step, the events data record is uploaded into an online database program and then retrieved via internet using web application.

Key Words: WSN, ESP32, Sensors, Raspberry pi, Wi-Fi, MQTT protocol

1. Introduction
Agriculture plays vital role in the human’s life because it’s the main source of food and one of development of the country s economy factor. Due to the increment in population and decrement in rainfall amount, there is a fundamental scarcity of food – Hence, the importance of precision agriculture [1]. Precision agriculture can be defined as the skill and ability of using modern technology to improve and increase crop production. and decrease human effort . WSN is one of the methods that can be used in monitoring and controlling different parameters in the agriculture field. WSN is a low cost, low power consumption. It is made up of groups of sensor nodes that monitor sevral conditions, such as temperature, humidity, moisture, etc. [2]. WSN in agriculture assists in collecting data, monitoring environment s parameters, suitable water and fertilizer give to plants for good crop production and helping farmers in real time data gathering [3].

2. Related Work
In this section, an overview is presented of some works which are related to this work: [4] suggested a wireless sensor network system to control irrigation and monitoring a soil parameter in real time. This project composed of three components: base station, a sensor unit and valve unit. The base station was a control master device that is used to receive and to analysis sensors data, to control irrigation process. The sensor unit was used to gather data from soil and the valve unit was employed to provide crops water. This system did not consider the time for irrigation and crops water need. [5] used 8051 microcontroller, number of sensors to control farm door, switch on, switch off lighting, and fire detection This system did not take into account farm irrigation process. [6] used wireless sensor networks to design smart irrigation system, it’s contained Arduino Uno, ATmega328 Microcontroller, soils moisture, temperature and humidity sensors, XBee technology. [7] proposed a drip irrigation system which used raspberry pi as base station unit, Arduino ATmega328 as sensor unit, numbers of sensors, and ZigBee technology. The data was collected by sensor unit then send to base station wirelessly. In [8] the proposed system is developed to monitor the humidity, temperature and moisture of soil. By using, ZigBee technology, solar panel, mobile application as interface with user. Efficiency, low cost and the low power consumption of the WSN are considered in the project and have been dealt with. In [9], the author talks about the usage of WSN and its importance in different aspect of agricultural domain which results very efficient farming management, in this research a network system is deployed for monitoring the agricultural environment and it is successfully developed by integrating different sensors for gathering data of the essential environmental parameters inside the Lactuca sativa (lettuce) growth chambers which are the humidity, light and the temperature. Using the Raspberry Pi as the essential and main component of the sensor nodes made this system perfect platform for low cost and reliable WSN monitoring system.

3. The proposed system
In this paper a proposed system has been implemented for real time monitoring agricultural field depended on WSN which contain a numbers of sensor nodes, base station node and various sensors. Each sensor node is equipped with light, temperature, humidity and soil moisture sensors which collect data at certain interval then send these data to be stored in a database at base station by using Wi-Fi technology and MQTT protocol. The data then displayed on web page that work as a user interface for real time monitoring as shown in (figure.1). The suggested system has two portion: hardware side and software side.

3.1 Hardware part
This part consists of sensor node and base station. Specification of each sensor can be shown in Appendix-A.

3.1.1 Sensor node
The node consists of ESP32 and number of sensors. Esp32 (figure.2) is on chip microcontroller with Bluetooth and Wi-Fi capabilities. It is a low priced and flexible for developing application for low power consumed systems. It has dual-core CPU working at 160´-or-240 MHz and implementing at up to 600 DMIPS with 520 KiB SRAM. For these reason ESP32 is used as a microcontroller in sensor nodes where various sensors connect to it [10]. It can be programmed with different languages like micro- python, C,´-or-java.
Digital temperature and humidity sensor (DHT22) can be shown in (figure.3). It employs with a capacitive humidity sensor and a thermistor for temperature’s air measurement and it’s signal on the data pin was digital [11]. Soil moisture sensor (FC-28) has both digital and analog outputs (figure.4) [12].
Light intensity sensor module (GY-30) has 16-bit AD --convert--er (figure.5). The data from this module is light intensity measured with lux unit. It is appropriate for getting the ambient light data and observe wide range at high resolution. It communicates with micro-controller board through I2C bus. An anemometer (figure.6) is a device used for measuring wind speed in the farm field [13]. pH sensor module (figure.7) used to calculate the acidity´-or-alkalinity of a solution. The pH scale uses a range from 0 to 14, with 7.0 indicating neutrality. The complete Sensors Node can be shown in (figure.8).
3.1.2 Base station
Raspberry Pi3 model B (figure.9) is a low cost, and fast processor. It has a Broadcom quad core Processor running at 1.2 GHz that is 10 times faster than the first-generation Raspberry Pi. It has Wi-Fi and Bluetooth low energy connectivity on board with 40 GPIO pins and micro USB socket operating at 5.1 V, 2.5 A rating. It is used in this paper as a base station where database was created, and data was stored [14].
3.1.3 MQTT protocol
Message Queuing Telemetry Transport (MQTT) is simple, lightweight, data-centric, and open protocol used in application layer. Actually, it uses publishing/subscribing data where all devices publish and subscribe data to the broker. This broker will manage conveying data to subscribers (figure.10). MQTT is used to ensure that the reliable data delivery in constrained devices such as IOT devices and it’s useful in low bandwidth and unreliable communication [15]

3.1 Software part
MySQL database is used to store the gathered data by sensors and Apache2 Web Server is exploited as a server to the database. The web application is performed using Laravel framework and php. Laravel has used because it’s an Open Source framework, robust, makes jobs easier, saves lot of time and provides high security [16].

4. Results
As mentioned earlier, the software part (web pages) receive its data from the hardware part (raspberry pi). Where the MySQL database has been used to store sensors data that coming from sensor nodes to raspberry pi. Figure.11 (a-b) is a screenshot of database humidity, temperature, and light intensity readings tables at different times. The interface of the web page is simple, easy to use and user friendly. the user can use the web page for fully monitoring the farm and its sensors reading to specify the amount of water and fertilizer planet needs. Figure.12 shows the main page that first appear to the user. Figure.13 presented login page. Figure.14 shows home page that contain number of nodes used in the system, active nodes, and plant crops. Clicking to any node will display the name of node, status and their joined time as shown in figure.15. Clicking on plant crops will show table include crop’s name, region, type of soil and plant date as presented in figure.16. Besides that, the user also can display a tables of sensors reding and brief graphs about these readings depending on any specified period of time as depicted in figure.17 (a-c).

5. Conclusion
In this paper, an agriculture environment monitoring system with low priced, low power consumption has been proposed to obtain high crops productivity and reduce the human effort. Many commercial sensors have been combined with microcontroller to form a simple node which transmit the sensors data to a web application to display the results. The monitoring system is based on wireless sensor network and Web application for high quality and productivity of crops. The appropriate results have been obtained for temperature, humidity, light intensity, soil moisture, wind speed and soil pH which are essential for precision agriculture. The system shows the possibility of allowing farmers to monitor and track farms using a web application.

Appendix-A (Sensors specifications)

A1. Temperature and humidity sensor (DHT22)
Operating voltage 3 to 5V, 2.5mA max current use during conversion, Good for 0-100% humidity readings with 2-5% accuracy, Good for -40 to 80°C temperature readings ±0.5°C accuracy, No more than 0.5 Hz sampling rate (once every 2 seconds).

A2. Soil moisture sensor (FC-28)
Operating voltage 3.3V-5V, PCB size: 3.2cm x 1.4cm, Power indicators: (red) and digital switching output indicator (green), Comparator Chip: LM39, digital output (0´-or-1).

A3. Light intensity sensor (gy-30)
working voltage 3.3V~6V‚ I2C bus with 2 alternative address‚ spectral responsibility is nearly human eye response, wide range and high resolution (1 ~ 65535 lx) ‚ light source dependency is little‚ adjustable measurement result for influence of optical window.

A4. Wind speed sensor
Operating voltage 0.4V to 2V, testing range: 0.5m/s to 50m/s, resolution: 0.1m/s, accuracy: worst case 1 meter/s, max wind speed: 70m/s, connector details: Pin 1 - connect to power (brown wire), Pin 2 – for ground (black wire), pin 3 - signal (blue wire), pin 4 not connected.

A5. PH sensor module
Heating voltage: 5 ± 0.2V (AC, DC), working current: 5-10mA, noticeable attention range: PH 0-14, discovery temperature range: 0-80 ℃-;---;--, response time: ≤-;---;--5S, settling time: ≤-;---;--60S, component power: ≤-;---;--0.5W.


References

[1] Farzad Kiani, Amir Seyyedabbasi, “Wireless Sensor Network and Internet of Things in Precision Agriculture”, (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 9, No. 6, 2018.

[2] Aarti Rao Jaladi , Karishma Khithani, Pankaja Pawar, Kiran Malvi, Gauri Sahoo,” Environmental Monitoring Using Wireless Sensor Networks(WSN) based on IOT”, International Research Journal of Engineering and Technology (IRJET) Volume: 04 Issue: 01 | Jan -2017

[3] N. Sakthipriya “An Effective Method for Crop Monitoring Using Wireless Sensor Network”, Middle East Journal of Scientific, 2014

[4] D. Mahir and O. Semih, “A wireless application of drip irrigation automation supported by soil moisture sensors”, Gazi University, Scientific Research and Essays Vol. 6(7), ISSN 1992-2248 Academic Journals, pp. 1573-1582, 4 April, 2011.
[5] J.S. Awati and V.S. Patil, “Automatic Irrigation Control by using wireless sensor networks”, Journal of Exclusive Management Science Vol 1 Issue 6 - ISSN 2277 – 5684, June 2014.
[6] S. Zain-Aldeen, S. Ramzy and H. Basil, “Wirelessly Controlled Irrigation System”, Dept. of Electrical Engineering University of Basrah, Iraq J. Electrical and Electronic Engineering, 2014.
[7] M. Ismail, M.Ch. Rani and I. Begum, “Smart Drip Irrigation System Using Arm11 Processor and ARDUINO”, VIF College of Engineering &Technology, ISSN No: 2348-4845 International Journal & Magazine of Engineering, Technology, Management and Research, Volume No: 2 (2015), Issue No: 11, pp.676-679, 2015.
[8] Yogesh G. Gawali, Devendra S. Chaudhari, “Wireless Sensor Network based Monitoring for Agricultural System”, International Journal of Science, Engineering and Technology Research (IJSETR) Volume 5, Issue 8, August 2016
[9] Carlo N. Cabaccan , Febus Reidj G. Cruz , Ireneo C. Agulto “Wireless Sensor Network for Agricultural Environment using Raspberry Pi based Sensor Nodes” 978-1-5386-0912-5/17/--$--31.00 2017 IEEE .
[10]Https://Www.Espressif.Com/Sites/DefAult/Files/Documentation/Esp32_Datasheet_EN .Pdf.
[11] https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf
[12] https://artofcircuits.com/product/fc-28-soil-moisture-sensor-analog-and-digital-outputs
[13] Https://5.imimg.com/data5/TY/AK/MY-1833510/gy-30-bh1750-intensity-digital-light-sensor-module.pdf
[14] C.R.Balamurugan,1 R.Satheesh,” Development of Raspberry pi and IoT Based Monitoring and Controlling Devices for Agriculture” , Journal of Social, Technological and Environmental Science •v.6, n.2, may-august. 2017
[15] V. Thirupathi, K. Sagar ,” Implementation of Home Automation System using MQTT Protocol and ESP32”, International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 – 8958, Volume-8, Issue-2C2, December 2018
[16] https://www.tutorialspoint.com/laravel/laravel_tutorial.pdf



































Add comment
Rate the article

Bad 12345678910 Very good
                                                                                    
Result : 100% Participated in the vote : 1