Portable wireless node design for smart agricultural system based on Internet of Things

ABSTRACT


INTRODUCTION
Global warming that is currently happening has an impact on the uncertainty of climate changes. Temperature, humidity, soil moisture, and sunlight intensity are some parameters that also affect the changes. In agriculture, the change in environmental parameters is one of the important factors that must be considered by the farmers to maintain productivity. Current conditions in the field, the farmers have limited access to control and monitor these parameters. One solution that can be done is by designing a system that is able to provide information about agricultural parameters by utilizing the concept of internet of things (IoT) and wireless sensor technologies. IoT is the concept of using internet technology for certain needs that can facilitate human work. IoT comes along with the development of other computer technologies. IoT can be integrated with several technologies which in the future will be widely used such as wireless sensor technology [1].
The use of the IoT concept in agriculture can be done to facilitate agricultural management [2][3][4]. The IoT system can be used for monitoring agricultural parameters in agricultural areas. In a relatively large area, IoT can also be integrated with the wireless sensor network (WSN) concept. WSN technology is also widely used in various ways such as monitoring aquaculture [5], monitoring landslide [6], and forest fire detection systems [7]. In agriculture, the concept of WSN can be applied as a monitoring system for agricultural parameters [8,9], automatic irrigation control systems [10], and intelligent irrigation control systems [11,12]. Furthermore, the IoT and WSN concepts are very suitable to be implemented in agriculture both as a control system and a monitoring system.
The purpose of this research is to design and develop a pair of portable wireless nodes for a smart agricultural system based on IoT. Sensor node includes soil moisture sensor YL-69 and temperature sensor DS18B20. The sensor node is designed to be placed in the agricultural area that has limited access to internet communication and power supply. This device gives information about the agricultural parameter to the controller node through low-cost radio frequency (RF) communication. This RF module named nRF24L01 is used due to several reasons, such as low-cost component, low memory usage, and low power consumption [13]. Basically, the other wireless modules in agriculture application can also be used such as Bluetooth [14] and Zigbee module [15], but Bluetooth has relatively short range communication and Zigbee is relatively expensive.
Thus, in this study, we use an RF module as a low-cost wireless module communication. The internet network is applied to the controller node that is in a safe place, have internet access, and affordable power supply. We use a wifi module ESP8266 to transmit the sensor data to the internet server. WiFi module is used due to portability characteristic. The use of internet network directly on the sensor node can actually be done using GSM networks as presented in [16]. However, the GSM network sometimes unstable in sending data and is more complicated in the installation process. Furthermore, by using this proposed concept, it will be easier in the installation process, low-cost hardware system, and having flexibility in hardware placement. The contribution of this paper is to design a pair of portable nodes with simple control algorithm that are small in size and can be duplicated as needed for monitoring large agricultural areas.

RESEARCH METHOD
This research is conducted using the hardware and software experimental method. Hardware system is built to determine the performance of the concept being designed. The stages carried out in this section include overall system architecture, hardware design, control design, and monitoring design.

System architecture
The designed system architecture is depicted in Figure 1. The sensor node is built using YL-69 soil moisture sensor, DS18B20 temperature sensor, Arduino nano microcontroller, and nRF24L01 radio frequency module. This sensor node is placed in the agricultural area using a lithium-ionium (Li-Ion) as its power supply. In the controller node, the Arduino mega board is used as the main controller. This microcontroller board is also used as a data transmitter to the internet server. Controller node will receive data from the sensor node and provide a control signal to the relay to do the watering. Controller node is also equipped with an ESP8266 wifi module to send sensor data, battery data, and relay status data to the internet server. Sensor node can be placed separately with the controller node up to about 1 km distance according to nRF24L01 specification.

Hardware design
The hardware block diagram design of the sensor node and the controller node can be seen in Figure  2. YL-69 soil moisture sensor has analog output 0-4.4 VDC and then converted to a percentage. DS18B20 temperature sensor also has analog output and able to measure temperature about -55℃ -125℃. These sensors are used based on better specifications compared to other similar sensors. Arduino Nano is used as a sensor signal processor because of its small size and having many analog pins for sensor input. This board uses an ATmega 328 microcontroller with 16 MHz clock speed. A 2.4 GHz nRF24L01 communication module is installed which is tasked to send sensor data to the controller node wirelessly. Sensor node system is supplied using a packet of Li-Ion battery with a voltage of 11.1 V. This battery is used because it has large energy and power so that the lifetime of the system node allows it to last long. Then, a voltage sensor is used to monitor the battery status of the sensor node. In the controller node, Arduino mega is used as a controller for receiving sensor data, controlling the relay, and sending data parameters to the internet server. Arduino mega uses ATmega 2560 microcontroller with 16 MHz clock speed. This board has 54 digital pins and using SRAM 8 Kb. On the controller node, there is also the nRF24L01 module as a receiver and ESP8266 wifi module. The controller node is supplied by a 12V power supply and placed in the control and monitoring station which is connected to the internet network. In this node, there also installed relay as an actuator to control the watering process via DC pump automatically based on sensor data conditions. The DC pump is placed in the controller node because it requires power from the 12 V power supply. If the DC pump is installed at the sensor node, it needs to be made for power supply installation in the agricultural area. This is not effectively done because the sensor nodes are designed to be portable with a power supply from the battery. In addition, if the DC pump is supplied with power from the battery, it will cause a waste of power at the sensor node due to the large demand for pump power. The LCD display is also used to display parameter values in this system.
Electrically, we design the hardware system as small as possible to achieve several node specifications such as lightweight, portable, flexible, and low-cost. Sensor and controller nodes are then assembled in small prototyping using a project board as preliminary design before constructed in integrated hardware as presented in the previous study [17]. In this study, we have to integrate the hardware system using a rapid prototyping method. All of the electrical components are integrated using soldering system to guarantee the stability of wiring system. The electrical circuit of sensor and controller nodes based on the hardware block diagram is depicted in Figures 3 and 4 respectively.

Control system design
The control algorithm is designed so that the watering process can work automatically. The block diagram of the control system is depicted in Figure 5. Control system is designed using conventional relay on/off controller based on the values of soil moisture and temperature. Logically, when the soil moisture and temperature exceed a certain limit, the microcontroller will send a logic signal to the relay which is connected to the pump in a certain duration. The pump will not work when the sensor values do not exceed the specified limit. More clearly, this automatic control algorithm can be seen in Table 1. Based on the algorithm, it can be seen that the pump will be on for a certain duration when conditions A, D, E, G, and H. In contrast, the pump will be off when fulfilled conditions B, C, F, and I. This control algorithm is certainly can be modified again as needed according to the actual condition. The values in each condition can also be modified according to the current environmental parameter.

Monitoring design
We use IoT concept as the methodology of monitoring system. In the controller node, there is a WiFi module that will be connected to an internet network in the station room. This monitoring system is designed as a user interface. With this system, the parameters can be observed by the user via website interface. The flowchart of monitoring system is depicted in Figure 6. The designed system monitoring allows the user to manage sensor data. The user can manage the data after they are login to the website interface. The facilities that can be used are export and delete the data. With this feature, users have the advantages to access the data without limitation as those offered by some third party IoT platforms.

Hardware implementation
In this step, hardware implementation is conducted in accordance with the design that has described previously. Both sensor and controller nodes are built in small size due to several node criteria mentioned in the previous section. The result of implementation shows that the node system is constructed as well as expected. More details about the node hardware parameter can be seen in Table 2, while the picture of node hardware can be seen in Figure 7.  Figure 7. The node hardware: sensor node (left), controller node (right)

Sensor system testing
Sensor testing is performed to see the linearities of YL-69 soil moisture sensor, DS18B20 temperature sensor, and battery voltage sensor. The test is done by giving some input values and then observing the output value. The test results for YL-69 sensor, DS18B20 sensor, and voltage sensor can be seen in Figure 8. Based on the testing results, it was found that the three sensors were able to produce linear output according to their input. Although there is not tested for its accuracy, the three sensors are feasible to use from the linearity side.

Control and monitoring testing
After sensor system testing is done, then we test the system in term of control and monitoring system via website interface. The test is conducted to know the performance of data transmissions from the sensor node, controller node, until website interface. System testing is performed to RF communication between sensor node and controller node, data transmission via WiFi module, and website interfacing. Based on the testing result, RF module nRF24L01can work well in transmitting sensor data wirelessly up to distance of ±1 Km. The WiFi module ESP8266 also shows the good testing result and able to be connected to the internet network. The result of website interfacing is depicted in Figure 9. Based on that result, it can be shown that sensor data and relay state are displayed in the website interface. Control system is work according to the designed algorithm. This is proven by the relay state which has the value 1 when the temperature is rising and the soil moisture decreases. These parameter changes are made using artificial scenarios to achieve the parameter conditions in the controller algorithm. Figure 10 shows the display if the user has logged in to the website interface. It can be seen that the user is able to manage the parameter data. Besides that, the user also able to export data to Ms. Excel format for further data analysis.

Discussion
This research develops portable hardware for measurement of agricultural environmental parameters. The system that is designed consists of sensor nodes and actuator nodes which are placed separately and can communicate wirelessly because of the consideration of the area and access to electricity in the agricultural environment. The development of this system is still very possible, especially in smart farming systems based on wireless sensors and IoT [18], as well as urban farming systems such as hydroponics [19]. In addition, it can also be developed control algorithms such as fuzzy logic for controlling environmental parameters based on wireless sensors [20]. However, these systems need to be supported by the reliability and portability of the hardware as designed in this study.

CONCLUSION
A pair of portable nodes for the smart agricultural system based on IoT have been successfully designed and implemented in this study. Low-cost RF wireless module is used to create communication between the sensor node and the controller node. IoT concept is also implemented using a WiFi module on the controller node so that users can access sensor data via the internet network. Based on the results of testing, it can be concluded that the nodes that are built have a small size and a relatively lightweight. Each hardware subsystem consisting of sensors, controllers, actuators and communication modules can work properly and as expected. This system can also be integrated with the website interface and is able to display measurement data. Further research that can be done is to reduce the size of the hardware and develop an Android-based control and monitoring application. This research is also limited to designing a pair of wireless nodes. The development of this research can be done by increasing the number of sensor nodes for monitoring a large area by applying data retrieval algorithms.