Development of a Cloud-Based Monitoring System

14 downloads 0 Views 910KB Size Report
Keywords—cloud-based monitoring; agriculture; Nodejs;. 4duino ... broker through a NODEMCU and ESP8266 microcontroller to monitor the soil water content, ...
Development of a Cloud-based Monitoring System using 4duino: Applications in Agriculture Kayode E. Adetunji1

Meera K. Joseph2

Department of Electrical Engineering Technology 1 University of Johannesburg Johannesburg, South Africa 1 [email protected]

Department of Electrical Engineering Technology 2 University of Johannesburg Johannesburg, South Africa 2 [email protected]

Abstract—Cloud-based systems are relevant and effective in home automation systems, automobile sector, agricultural sector and health sector. In agriculture, several methods were deployed to tackle and sustain the food production. This paper discusses the development of a cloud-based monitoring platform to monitor agricultural resource. We implemented a compact approach, thus using 4duino and relevant sensors to achieve data transfer to our self-implemented cloud platform. Soil moisture (percentage volumetric water content), humidity, ambient temperature, dew point and soil temperature were used as variables for monitoring. We discuss the implementation of cloud computing to the agricultural sector. This paper discusses a compact approach to enhance agricultural resource through the cloud-based monitoring of relating factors. Keywords—cloud-based 4duino

monitoring;

agriculture;

Nodejs;

I. INTRODUCTION Cloud computing world has gone a long way in the development of technology. It has been able to revolutionize the information technology (IT) sector. The use of IT has proven to be efficient in many applications, which are home automation system, automobile sector, agricultural sector, health sector, and many more. Monitoring crops or the soil content [1, 2] are used in the agricultural sector, where an algorithm can be formed to evaluate the kind of soil used, or to predict the closely exact time that certain crop might need irrigation. This paper will take use of the agricultural sector as its case study. To create an IoT environment, there are basic criteria are followed, that are based on cost and implementation. Agricultural resource is an important resource in our everyday lives. The need to monitor effectively, the factors that affects the agricultural productivity is highly essential. Soil moisture sensoring [1] can help the improvement of irrigation of crops in agriculture and can help understand the effect of various crops on different kind of soil. Therefore, the assessment of soil moisture content has received a proportion of responsiveness [3, 4]. Other basic environmental factors that affect these resources are relative humidity, ambient temperature, dew point, and many others. The platform for monitoring is highly important for agricultural basis, as virtualization is key to analysis. The main objective of the paper is to develop a monitoring platform to monitor, remotely agricultural resource using cloudbased system. The sub-objectives are:

978-1-5386-3060-0/18/$31.00 ©2018 IEEE



To develop a circuit for sensing percentage volumetric water content, soil temperature, ambient temperature, and humidity.



To create a server runtime for accommodation of a web application framework using Node.js and Express



To visualize received agricultural resource data using JavaScript library reactjs and HTML script chartjs II. RELATED WORKS

Enormous research on agricultural sector based on relating factors have shown the importance of the sector. Pushkar and Sanghamitra [1] used the Arduino to develop a smart irrigation system to determine water flow using an unnamed soil moisture sensor. The ESP8266 WiFi module was used to communicate the data to a web service. In [2] the authors use an MQTT client broker through a NODEMCU and ESP8266 microcontroller to monitor the soil water content, and it also indicate for dry and wet conditions. Losant, a ready-made powerful cloud platform is used to implement the real time monitoring platform. In the same vein, in another paper [5] another expert uses the similar methods but adding the DHT22 for ambient temperature and humidity measurements. Paper [6] designed a wireless sensor network (WSN) that mainly consists of Raspberry Pi, Richduino (Arduino generic), and Xbee module. The aim was to send automatically a trigger action to a water pumping system while it also displays data values on the LCD and the XCTU software from a desktop. Baranwal [7] used PIR Sensor, URD sensor, ultrasonic sound repeller, and camera to detect and identify rodents that are threats to crop health. Recently, researchers have worked on smart and precision agriculture monitoring. Prathibha et al., [8] developed an IoT and smart agriculture system for monitoring temperature and humidity in agricultural fields. A camera was also implemented to capture and send images to farmers. CC3200 microcontroller, which embeds WiFi and processor unit, was used for the research. However, there was no discussion about monitoring platform. In the same vein, Maia et al., [9] discusses a real time in-situ monitoring of luminosity, temperature and humidity for the soil and the environment. Here, the network of sensors was used monitor soil conditions. Data attained was proposed to support decisions about irrigation. Tyagi et al., [10] proposed a sensor cloud based measurement and management system for agricultural fields. The aim of paper was to monitor and maintain the level of maintain the moisture level of soil with a referenced

threshold. This was done by deploying replaceable and rechargeable mobile sensor robot, with prospective ability to monitor moisture level in real time. However, the virtualization of sensor was not discussed. Kundu et al., [11] developed a smart E-agricultural monitoring in Bangladesh. The aim was to create a network for farmers to interact and share knowledge about agricultural products for enhanced development through web portals. Authors [12, 13] have focused on the web development and virtualization of the sensor data in agricultural monitoring. This was seen as a problem, hence the full development of a monitoring platform will help obviate the complexities encountered by data transfer. III. METHODOLOGY The proposed work solves a research problem that entails developing a monitoring platform with ability to receive and display sensor data in an agricultural scenery. This section discusses about the architecture and whole design of the project. A. The Sensor Assembly Logger Development Measurement of variables is required to achieve the behavioural analysis according to the sensors used. The Sparkfun’s soil moisture was used to collect volumetric water content of the soil. Humidity and ambient temperature were derived from DHT22 sensor, while the DS18S20 sensor was used to get reading for soil temperature. The DS18S20 is durable and could withstand moisture for a long period. Dew point was calculated from the readings of ambient temperature and humidity.

knowledge of the highest and lowest possible values of the sensor. This was done by getting the average of multiple readings from the soil moisture sensor when dipped into water, which serves as the reference for maximum moist. An amount of deliberated dried soil (sandy soil) was used to determine the possible minimum value for the moist. The snippet below shows the implementation of the formula used in the 4duino code. int sensorPin = A0; float sensorValue; sensorValue = analogRead(sensorPin)*0.116444; The value 0.116444 was derived from the percentage coefficient. The DHT22 sensor was calibrated to testo instrument specification, which has an accuracy of ± 1 % RH; ± 0.15 °C/for relative humidity and air temperature respectively. An average factor of derived lengthy observations in disparity between the DHT22 and testo instrument for humidity and temperature monitoring. B. 4duino We decided to choose the 4duino because of its compact size to contain relevant requirements for this project. The 4duino is a product from the 4D systems [15] whereby many IoT appliances are being manufactured. It is a compact device that allows for physical visualization of data from attached sensors. The 4duino comprises of an Arduino Uno nomenclature, ESP8266 WiFi module, LCD display, and a MicroSD slot. The main microprocessors used are the ATmega32U4 and PICASSO for Arduino board and LCD display communication respectively.

Figure 1: Communication Diagram of the Assembly Figure 1 shows the different components that make up the 4duino. 1) Calibration Many researchers and farmers are keen about knowing the exact values and related interpretation of sensor data such humidity, temperature and volumetric soil water content. However, there are different ways to calibrate soil moisture. This paper implemented the method from Ferrarezi et al. [14]. The process was done by determining the factor through perceptive

Figure 2: Aerial view of the 4duino displaying the comprising labelled components The 4duino as in Figure 2 [18] is programmed from its micro USB port through its dedicated Workshop IDE or the Arduino IDE. The Workshop IDE can only be used for uploading program codes if the Arduino IDE is installed on that particular computer. The IDE has a rich GUI for interaction with several features of the LCD for display of data. There are icons like gauge, thermometer, and meter-scale to visualize the data in different ways according to the type of data.

Figure 3: Process flow of the working of the 4duino. Figure 3 illustrates the process flow of the system device. There are dedicated pins to the working of the embedded components to the 4duino. Pins D0 and D1 are assigned to the hardware serial communication for the LCD display graphics processor, PICASSO while pins D8 and D9 are allocated for the ESP8266 WiFi module. It uses a 5 volts power supply for operation. C. Cloud Execution The sending of data to the cloud is the important thing, hence the remote monitoring aspect. We deployed a Heroku cloud server for our web application. Heroku is a Platform as a Service (PaaS) provider that enables developers develop applications on the go [16], thereby giving a refined platform for different programming languages such as Python, Ruby, JavaScript and so on. The free tier service from Heroku was deployed, which makes it possible to use only one dyno service. Through the Heroku CLI, the app was deployed into production mode, which will be after signing in with the Heroku account details. Figure 5 shows the login terminal from the Heroku CLI.

Figure 4: Program Flowchart of the 4duino Implementation

D. Server Runtime and Framework We implemented a Node.js framework on the cloud server. Node.js is an event driven, asynchronous framework, which allows JavaScript run on the server. Node.js is an open source framework, which can be used to create, read, write, open, and close files on the server, as well as collect form data [17]. It is great at generating dynamic webpage content. With the installation of Node.js software, and Node Package manager (npm), modules can be installed and initialized in the program code.

Figure 5: Login terminal from Heroku CLI

Reactjs is a JavaScript library used to facilitate interactive and reusable UI components. It uniquely performs operations on both the client side and server side. Reactjs uses a virtual DOM, that is, more like creating fake DOM, thereby intelligently abstracting the real DOM. This allows for interaction with only the relevant section of the code. This particular feature makes it very reactive in the browser. The installation is through the node package manager, from Node. The syntax npm install -g create-react-app is used for installing it globally on the machine. Other dependencies will come with a creation of a new app, and must be installed using npm install. The main block of a react app are components, which are used in segment interacting with each other to form a whole app. Chartjs is used for visualizing the received data in a graphical manner. It is based on JavaScript’s HTML5 web syntax, thereby allowing for implementation of script tags for displaying graphs. IV. RESULTS Results from the self-implemented cloud based platform are discussed in this section. Figure 6: Hardware development of the project Node.js framework, Express was used to run the application. Express is a popular application framework for Node.js, as it is widely downloaded and a large community base. It is a Node.js module that allows for simple but robust tasks such as HTTP, routing and so on. Express plays a major role in the facilitation of web applications and application programming interfaces (API). A necessary implement to use when building a web application is a database, this paper utilizes the Firebase database. Firebase is a rich application that allows for realtime database, that is, immediate data upload from server. Amongst many other features of Firebase, database, authentication will be used for the project. Firebase will also be installed as a module to the web application. A signup was done in firebase website in order to get authentication credentials. E. Visualization The final part of the cloud execution is the visualization aspect, which deals with the display of received data. The data visualization was achieved using reactjs and chartjs module for node apps. The firebase database is linked to the module to periodically load received sensor data. By keeping the authentication validation in the console as null, we can easily send data from our project to the cloud, thereby saving the data in the real-time database. Firebase also requires an account before access can be granted, therefore an account will give an authentication details to use in the react app. Below is a snippet to which firebase interacts with chartjs for a display. var ref = firebase.database().ref(); ref.on('value', function(snapshot) { var data = snapshot.val(); });

TABLE I: Downloaded hourly readings from sensor network HO URS

HUMI DITY

AMBIENT TEMP

SOIL TEMP

0

65.3

11.3

10.31

SOIL MOISTU RE 91.87

DEW POIN T 4.8

1

65.4

11

10.13

92.11

4.54

2

64.7

10.9

10

92.22

4.28

3

64.2

10.6

9.81

91.76

3.88

4

66.5

10.6

9.63

92.11

4.4

5

65.3

10.4

9.5

92.11

3.94

6

65.1

10.4

9.31

92.22

3.9

7

67

9.9

9.13

92.11

3.85

8

66.7

10.8

9.13

91.52

4.64

9

63.5

11.5

9.63

91.76

4.57

10

55

12.8

10.56

93.27

3.67

11

51.4

13.9

11.56

93.16

3.69

12

40.6

15

12.38

93.74

1.25

13

43

15.3

12.81

93.74

2.35

Table I shows the calculated hourly average values for the sent data. The graphical display implemented in this paper are displayed in Figures 6 and 7.

REFERENCES [1]

[2]

[3]

[4]

[5]

Figure 7: Display of Graphs from the Frontend

[6]

[7]

[8]

[9]

[10]

Figure 8: Readings from Soil moisture and Humidity Values for One Week The data (readings from soil moisture / humidity values) from Figure 8 was computed from the program of the frontend. Therefore, display from the page will directly show the visualized data.

[11]

[12]

V. CONCLUSION In this paper, we developed a cloud-based monitoring platform from scratch, starting from the Platform-as-a-Service Layer to monitor agricultural resource. The development involved a cost-free deployment from Heroku, when using one dyno. The server runtime, Node.js is also an open source software that was used to develop the stack. Accompanying frameworks and modules need not require any payment, as there were free. The 4duino made the work more compact as there were little connection of parts, which owes to the integration of necessary parts in the 4duino. The essence of this paper was to develop a cloud based monitoring platform and implement it with agricultural resource. However, there are other implementation, which could fit with our developed cloud platform.

[13]

[14]

[15] [16]

P. Singh and S. Saikia, “Arduino-based smart irrigation using water flow sensor, soil moisture sensor, temperature sensor and ESP8266 WiFi module,” 2016 IEEE Region 10 Humanitarian Technology Conference (R10-HTC), Agra, 2016, pp. 1-4. R. K. Kodali and B. S. Sarjerao, “A low cost smart irrigation system using MQTT protocol,” 2017 IEEE Region 10 Symposium (TENSYMP), Cochin, 2017, pp. 1-5. S. Dey, N. Karmakar, R. Bhattacharyya and S. Sarma, “Electromagnetic characterization of soil moisture and salinity for UHF RFID applications in precision agriculture,” 2016 46th European Microwave Conference (EuMC), London, 2016, pp. 616619. N. S. S. M. da Fonseca, R. C. S. Freire, A. Batista, G. Fontgalland and S. Tedjini, “A passive capacitive soil moisture and environment temperature UHF RFID based sensor for low cost agricultural applications,” 2017 SBMO/IEEE MTT-S International Microwave and Optoelectronics Conference (IMOC), Aguas de Lindoia, 2017, pp. 1-4. R. K. Kodali and B. S. Sarjerao, “A low cost smart irrigation system using MQTT protocol,” 2017 IEEE Region 10 Symposium (TENSYMP), Cochin, 2017, pp. 1-5. Anindita Mondal, Iti Saha Misra and Sagar Bose, “Building a low cost solution using wireless sensor network for agriculture application,” in Innovations in Electronics, Signal Processing and Communication (IESC), 2017. International Conference on Electronics, Signal Processing and Communication. pp. 61, Jan 1, 2017. T. Baranwal and P.K. Pateriya, “Development of IoT based smart security and monitoring devices for agriculture,” in Cloud System and Big Data Engineering (Confluence), 2016 6th International Conference, pp. 597-602, 2016. S.R. Prathibha, A. Hongal and M.P. Jyothi, “IOT Based Monitoring System in Smart Agriculture,” in Recent Advances in Electronics and Communication Technology (ICRAECT), 2017 International Conference on, pp. 81-84, 2017. R.F. Maia, I. Netto and A.L.H. Tran, “Precision agriculture using remote monitoring systems in Brazil,” in Global Humanitarian Technology Conference (GHTC), 2017 IEEE, pp. 1-6, 2017. S. Tyagi, M.S. Obaidat, S. Tanwar, N. Kumar and M. Lal, “Sensor Cloud Based Measurement to Management System for Precise Irrigation,” in GLOBECOM 2017-2017 IEEE Global Communications Conference, pp. 1-6, 2017. J. Kundu, S. Debi, S. Ahmed and S. Halder, “Smart e-agriculture monitoring system: Case study of Bangladesh,” in Advances in Electrical Engineering (ICAEE), 2017, 4th International Conference, pp. 641-646, 2017. A. Cosma, C. Preda, M. Luculescu, L. Cristea and S. Zamfira, “Data acquisition system used in precision agriculture for vegetation status monitoring-software subsystem,” in Optimization of Electrical and Electronic Equipment (OPTIM) & 2017 Intl Aegean Conference on Electrical Machines and Power Electronics (ACEMP), 2017 International Conference, pp. 857-862, 2017. J. Agajo, J. G. Kolo, G. Jonas, A. R. Opeyemi, N. O. Chikeze and O. B. Chukwujekwu, “A modified web-based agro-climatic remote monitoring system via wireless sensor network,” 2017 IEEE 3rd International Conference on Electro-Technology for National Development (NIGERCON), Owerri, 2017, pp. 258-270. R.S. Ferrarezi, S.K. Dove and M.W. van Iersel, “An automated system for monitoring soil moisture and controlling irrigation using low-cost open-source microcontrollers,” HortTechnology, vol. 25, pp. 110-118, 2015. 4D systems: Turning Technology into Art, https://www.4dsystems.com.au Accessed on 12 Oct 2017. N. Middleton and R. Schneeman, “Heroku: Up and Running: Effortless Application Deployment and Scaling”, 1st edition, O'Reilly Media, Inc.", 2013.

[17] M. Collina, M. Bartolucci, A. Vanelli-Coralli and G.E. Corazza, “Internet of Things application layer protocol analysis over error and delay prone links,” pp. 398-404, 2014. [18] 4Duino for IoT Available online: https://www.robotshop.com/en/4duino-24-tft-lcd--iot-displaymodule.html Accessed on 20 Feb 2018

Suggest Documents