Communication Systems of Smart Agriculture Based on Wireless Sensor Networks in IoT

As technology develops, major countries have begun to implement the Smart Agriculture system and Internet of Things to facilitate farmers in managing their agricultural land. This study discusses the communication system of Smart Agriculture based on Internet of Things. Data from the sensor will be sent by Wireless Sensor Network to Raspberry Pi and send it to the database server which can then be accessed via the internet using android applications. Android applications can be used to monitor soil pH sensors and moisture. In addition, the control of sluice gates and water pumps can also be done manually and automatically. So that water can be controlled through applications and the web remotely. The success percentage of the communication system of Smart Agriculture based on the Internet of Things is 100% because all data from the sensor are successfully received by the Raspberry Pi and sent to the database so it can be accessed through the built-in android application and website. Keywords—Smart Agriculture, IoT, Wireless Sensor Network, Raspberry Pi.


INTRODUCTION
As we know, technology contribute to global improvements in crop and livestock production, in terms of product quality, environmental considerations and the welfare of people and livestock [1]. Indonesia is an agricultural country where the majority of its population are farmers in agriculture. There are many rice field owners who manage their fields in a conventional way, but are constrained by the weather and physical conditions of the farmers themselves. Many of these obstacles can make the process of managing rice fields disturbed. Along with the development of technology in major countries such as, America, the Netherlands, Japan and several other countries, these countries have begun to implement the Smart Agriculture system to facilitate farmers in managing their agricultural land [2]. The development of smart devices and the "Smart Agriculture" system is a breakthrough that has a major impact on the whole world where the Internet network can be extended to the realm of the Internet of Things (IoT), which is connecting the Internet network to an object and then controlling it remotely [3].
The internet network is a technology that can be found in almost all regions in the present. Many people use the internet for various purposes such as connecting with other people through social media, looking for video tutorials to do or make things, play games, or do productive things like marketing products, making useful tutorial videos, and so on. Seeing the potential of the internet which is increasingly being used by the wider community and from all walks of life, many researchers compete to create a system that can be controlled, monitored, and accessed using the internet network. The system is Internet of Things or commonly called IoT. IoT will rely on the hardware, software, and services provided by the bulk of IT industry [4]. IT is also being positioned as the best business enabler [5].
Sensor technology and wireless networks integration of IOT technology has been studied and reviewed based on the actual situation of agricultural system [6]. Ray (2017) reviewed various potential IoT applications, and the specific issues and challenges associated with IoT deployment for improved farming. Investigations are made on those sensors enabled IoT systems that provide intelligent and smart services towards smart agriculture [7]. Some typical applications of Agriculture IoT Sensor Monitoring Network technologies using cloud computing as the backbone had also surveyed. This survey used to understand the different technologies and to build sustainable smart agriculture [8].
Control networks and information networks integration of IOT technology has been studied based on the actual situation of agricultural production in China. Remote monitoring system with internet and wireless communications combined is proposed. At the same time, taking into account the system, information management system is designed. The collected data by the system provided for agricultural research facilities [9].
In India, smart agriculture has been made using automation and IoT technologies. The highlighting features of this project includes smart GPS based remote controlled robot to perform tasks like weeding, spraying, moisture sensing, bird and animal scaring, keeping vigilance, etc [10]. Another project includes various features like GPS based remote controlled monitoring, moisture & temperature sensing, intruders scaring, security, leaf wetness and proper irrigation facilities. It makes use of wireless sensor networks for noting the soil properties and environmental factors continuous [11].
The other research includes monitoring temperature and humidity in agricultural field through sensors using CC3200 single chip to capture images and send that pictures through  [12]. Thermal imaging has shown potential in assisting many aspects of smart irrigation management. The Roopaei, et.al (2017) article examines key technical and legal issues and requirements supporting the use of Cloud of Things for managing water source-related data prior to discussing potential solutions [13].
Previously, there was a lot of research on smart agriculture and Internet of Things, although it had not yet become a single entity. Nur Azis's research with the title Build Design monitoring and control of rice field irrigation doors using an Android application with Arduino-based bluetooth and RF communication. In that study, Nur Azis implemented RF transceiver to transmit serial data over the air (wireless) but with a distance that is still limited, which is less than 1 Km, so it still has weaknesses in terms of range distance [14]. Research from Ke, which carries the topic of smart agriculture based on cloud computing and IoT. He examines how cloud computing and IoT are applied to smart agriculture in China, which has now begun to be applied in Shaanxi China [15]. Chane's research with a multidisciplinary topic of smart agriculture using Internet of Things, Sensors, Cloud Computing, Mobile Computing, and Big Data Analysis examines how the process of retrieving field data, leads to servers and stored into cloud computing as Big Data is then processed and analyzed according to needs [16].
While the research of El Hakim built a weather information system in real time using the Ad Hoc Networks Multi-Hop (Manets) method -Multi Point To Point based web server. This study examines the challenges of how the weather monitoring system works with the multi-hop, ad hoc network -multi point to point method which then reads the data stored on the web server [17]. Other research designs and builds an electronic device control using Arduino-based bluetooth communication with an Android interface that examines how to use applications on Android-based smartphones as a means of control on an electronic device using a Bluetooth connection [18].
One of the things that needs to be considered in agricultural activities is the irrigation system on a land by doing automatic irrigation and scheduling to be programmed through web pages [19]. Submersible is an innovation that can be used as a means of irrigating rice fields today. Submersible itself is a type of versatile pump, one of which can be used for artificial lifting in oil fields, so that this submersible has strong suction power like conventional diesel [20].

II. RESEARCH METHOD
Wireless Sensor Network (WSN) is a system that can integrate into an IoT system to meet the challenges of seamless communication. The potential of IoT can be utilized by the community by developing new applications, for example in agriculture [21]. The sensor nodes use their processing abilities to locally carry out simple computations and transmit only the required and partially processed data. in essence, WSN with these capabilities may provide the end user with intelligence and a better understanding of the environtment [22]. Bridging between wireless sensor networks with traditional communication networks or Internet, IOT Gateway plays an important role in IOT applications, which facilitates the seamless integration of wireless sensor networks and mobile communication networks or Internet, and the management and control with wireless sensor networks [23]. Smart connectivity with existing networks and context-aware computation using network resources is an indispensable part of IoT [24].
The working principle of this system is to monitor soil conditions in rice fields where the system is equipped with soil pH sensors, soil moisture sensor, and water level sensor. Each sensor can monitor the data. To monitor from several sensors can be done through the website and android-based applications that have been made. Previously, between client and server must be connected to each other through a wireless sensor network where each node has a different ID to distinguish between nodes from one another. After that, data from several sensors will be processed by Arduino, which then serial data is sent to the server via ESP8266. The different components of ESP8266 board that connected to each other shown in Figure 1 [25]. Illustration of system work diagrams built is shown in Figure 2. The specifications of communication used from this study include; (1) a power supply as a voltage source on the device, (2) a Raspberry Pi as a local server and routing to a central server, (3) an access point as an internet service provider, (4) an online database and server to store sensor data. To get results that are in accordance with the design, a work diagram is made. The work diagram of the tool functions as the basis of the working principle of the tool and as a reference system that is in the tool made.
An integrated system platform which provide Linux web server, database, and PHP run-time environment also been built by using ARM Linux development board with Apache, PHP, SQLite3 and using Raspberry Pi as a main server [26]. Kodali [27]. The Figure 3 is a tool work diagram in this study.

Fig. 3. Communication Work Diagram
Data sources from sensors such as soil moisture sensors, soil pH sensors, and water level sensor are installed in the box. This box will be connected to WiFi access so that it can connect to the internet. The local server used, the Raspberry Pi is used to receive, process and send data to a database server or central server. The Raspberry Pi uses a Linux based operating system called Raspbian that free and open source, so it keeps the price of the platform is low and makes more hackable [28].
The database server used is MySQL, which has been installed on an online server. MySQL included in many platform repositories, making it easy to get and install and to be used for store data from sensors [29]. The server is available as a separate program for use in a client/server networked environtment and it also available as library that can be embedded into standalone applications [30]. Android Smartphone platform is also used for real time application of QR Code recorder for state-owned goods which is connected to MySQL database on server [31].
The results of the stored sensors can be displayed and controlled on the Agriapps application accessible to users as users via an Android based smartphone. In addition, the results of monitoring can also be accessed through the Agriapp.tech website. Flowchart of the system shown in Figure 4. RESULT AND ANALYSIS At this stage there is testing of each part and testing of the tool as a whole. Testing each part to test the parts of each function contained in the software and testing as a whole to find out that the system built works according to the plans that have been made. Figure 5 is a control page display on an Android application created using the webview feature. In the display in Figure 3, there are two modes, namely manual mode and automatic mode. in manual mode, the user can set the door open/close and turn on/off the submersible by changing the selector in the Switch Manual column, then pressing the Set button. So that the data can be stored. While the automatic mode only needs to adjust the selector in the column mode to Automatic and setpoint settings in the Limit column.

A. Testing of Soil pH Sensor Readings
This test uses a pH meter device and compared to the soil pH sensor shown in Table 1. From the results of testing the Soil pH sensor it has been seen that the soil pH sensor circuit can indicate the value of soil acidity. Based on the results of these tests, in the first experiment at the pH meter was 6.27 and the results of using a soil pH sensor of 6.48, it had a difference in error of 0.27. The second experiment was at pH meter 7.27 and sensor readings 7.37 which had a difference between 0.10. From the existence of these errors, the quality of the tool is emphasized. The pH sensor reading is done shown in Figure 6, which has a time span of testing for one week. From the sensor reading chart it can be concluded that the soil pH sensor readings do not have significant changes. Changes in sensor reading values have a reading range from 4 to 6.

B. Soil Moisture Sensor Testing
This test uses analog moisture meters and compared to digital humidity sensors is shown in Table 2. From the results of testing the FC-28 soil moisture sensor that has been done, it can be seen that the FC-28 soil moisture sensor circuit can indicate the value of soil moisture content. In the test the value of soil moisture starts from 1 to 10, where < 3 is dry, < 8 is moist, and > 10 is wet. Based on the results of these tests, it can be concluded that the FC-28 soil moisture sensor and program listing are running in accordance with the wishes and the FC-28 soil moisture sensor is work properly. The Figure 6 shown that humidity sensor readings done by the time span of testing for one week. From the sensor readings chart it can be concluded that the humidity sensor readings do not have significant changes too. Changes in sensor reading values have a reading range from 4 to 5.

C. Testing the Routing of Raspberry Pi
This routing test aims to determine whether sending data on the web can work correctly. Routing testing can be said to be successful if the data sent is successfully entered into the database and sent to the website and application. The sensor data sent automatically or manually to MySQL. For routing page views on the Raspberry Pi shown in Figure 3. Routing testing is done by entering data manually and automatically from the sensor and the results of the reading are displayed directly on the web page. Experiments were carried out in 3 conditions and 5 experiments with each condition. In the first condition, the sensor readings data are automatically obtained, the success percentage is 100% because in 5 trials the data from the sensor readings successfully enter all into the database automatically. In the second condition, which is manual input data, the percentage of success is 100% because in 5 experiments the data from the manual input from MySQL is successfully entered into the database. In the third condition, namely the data entering the database appear on the website, the success percentage is 100% because in 5 trials the data entered in the database is successfully displayed entirely on the website. So the percentage of 100% success in routing tests is obtained.

D. Distance of Data Communication Testing
This test aims to determine the extent of the range of data communication between the sensor boxes, sluice gates and water pumps. The author conducts testing by giving an onoff command from monitoring page on smartphone, either done with obstructions that cover the sensor controller box or without obstruction. From the tests carried out 13 times as seen in Table 3, it can be seen that from the 13 test times only 12 tests were as expected. So that it can be concluded that in this test, the maximum distance of sensor communication range with an internet connection is 30 meters.

E. Testing the Entire System
The overall testing of this system aims to ensure that the system built can work properly in full. After following the testing steps as a whole, the results of the whole system test are shown in Table 4.

IV. CONCLUSIONS
From the research that has been done, it can be concluded that the communication system at Smart Agriculture based on Wireless Sensor Networks in Internet of Things has been built and can communicate with the Raspberry Pi to receive ultrasonic sensor data, soil pH sensors, soil moisture sensors and transmit to servers so that they can accessed online using the internet. Data is transmitted from all sensor nodes to Raspberry Pi through ESP 01. In order to be accessed online, the Raspberry Pi sends data received from all sensor nodes through a routing process connected to the internet and connected to a database sent to the server, then accessible online via web or android based application.