Web-based Water Quality Parameter Monitoring for Bok Choy Hydroponics using Multi Sensors

—The hydroponic planting method is one solution for supplying vegetable needs because agricultural land is limited. Hydroponics allows the growing of vegetables in stages in a limited area by utilizing water as a growing medium. Water quality greatly determines plant fertility, so monitoring must be carried out regularly. Currently, the agricultural sector in Sukabumi has a large potential for the economy of the community. Farmers develop hydroponic farming for Bok Choy plant but monitoring of water quality is still done traditionally. Therefore, in this study, a water quality monitoring system is proposed including pH, turbidity, and temperature. Another parameter that is observed is the water level in the reservoir which is useful for maintaining water circulation. This system works online through the internet network, both the sensing process, data transmission, and data display using the Internet of Things (IoT) platform. The measured parameters can be observed via a web application. Performance evaluation of sensor devices is carried out by comparing the measurement values of standard devices. The test results on the system that has been implemented show that the system has high accuracy and all parameters are successfully displayed on the web page. The applied systems can increase the fertility of vegetables on hydroponic land so that it can improve the quality of production.


153
Indrarini Dyah Irawati et.al: Web-based Water Quality Parameter Monitoring for Bok Choy Hydroponics using Multi Sensors computing [4], [5]boosting farm productivity and yield is essential. More than 70% of the population is involved directly or indirectly in crop production activities. This sector contributes to the Indian economy a great deal. It contributes over 17% of the total Gross Domestic Product (GDP. Digitization and computerization can have an impact on human life around the world. Several studies have utilized IoT technology to overcome the problem of limited agricultural land by planting hydroponics. According to research conducted in [6], IoT-based hydroponic is a way of growing using water that can be controlled for its growth through many parameters including temperature, potential hydrogen (pH), total dissolved solids, water temperature, humidity, ultraviolet (UV), carbon dioxide, soil moisture, and electrical conductivity. The device used is the ESP8266, Arduino, and Raspberry Pi with the MySQL, Thingspeak, Firebase, Domoticz, and Wyliodrin IoT Platforms. In [7], the authors developed a hydroponic system to monitor the main parameters from temperature, pH, and water conductivity sensors. This system consists of an Arduino as IoT module, database, and web server that is built on Raspberry Pi Pocket Personal Computer (PC). Another hydroponic monitoring system was developed using Nodemcu ESP8266. The system can read water level information on the water reservoir and plant temperature humidity from the DT11 sensor and work using fuzzy logic. Information can be monitored through the android application [8].
An IoT-based aeroponic hydroponic plant system has been designed in [9] for monitoring, controlling, and automating nutrient mixing according to plant needs. IoT device design using a microcontroller raspberry pi which is integrated with Arduino Mega microcontroller as controller of all sensors, including water level, ultrasonic, pH, total dissolved solids (TDS), and humidity. The Android mobile application is used as an interface in the control and monitoring of devices by users. In [10], the authors implemented the three sensors which are the DHT-22 sensors to detect temperature and humidity, the pH sensor to detect the pH value, and the TDS sensor to detect water nutrients in plants. The sensor data is controlled by Arduino Uno and the data is sent to the Thingsboard server using the Message Queuing Telemetry Transport (MQTT) protocol whose data is displayed in the form of charts and graphs. Another study made a two-sensor system connected to the Arduino Uno microcontroller. The two sensors are DHT11 for temperature and humidity and YF-S201 for measuring the intensity of the nutrients flowing through the gully [11].
Another research, implementing a smart greenhouse on hydroponic plants that can adjust the number of nutrients automatically as well as set the right pH. Control and automation can be done remotely, continuously, with historical data, and real-time. Smart hydroponic farming was also developed specifically for lettuce plants using fuzzy logic that can regulate plant nutritional needs, water PH, and water level in real-time through the website [12]. Design and building mobile applications based on Android for nutrition monitoring hydroponic lettuce was also developed in [13].
Previous studies have realized a system for monitoring important parameters in hydroponics. However, most of them do not monitor the condition of the reservoir which has an important role in maintaining water circulation. Therefore, in this research, a system is designed and applied that can control the pump and monitor vital parameters in a hydroponics system, including water level and water quality, including pH, turbidity, and temperature. This system was applied to Bok Choy hydroponics in one of the hydroponic fields in Sukabumi area. The system is designed. The proposed system consists of an Ultrasonic sensor The HC-SR04 used to determine the water level in the hydroponic reservoir, DS18B20 digital thermometer sensor used for measuring the water temperature, analog TDS sensor meter for determining the cleanliness of hydroponic water, and an analog pH meter used to measure the pH of the hydroponic water, all data obtained by each sensor will be processed on a microcontroller, in the form of WEMOS D1 R32 ESP8266 which has been integrated with antenna and RF module. And by using Wi-Fi communication, all data sent to a cloud database which is then displayed on a website-based application for hydroponic monitoring and controlling.

A. System Overview
The proposed hydroponic monitoring system is presented in Figure 1. Measurement of water quality parameters includes pH, turbidity, and temperature. Another parameter that is measured is the water level. Sensors used in this study include pH sensor type PH0-14, TDS meter DF robot, temperature sensor DS18B20, and ultrasonic sensor. Processing sensor data both readings and calibration using Arduino UNO board. Meanwhile, for data transmission to the point cloud using the ESP32 Wi-Fi module. Detailed descriptions of the design of each sensor, data transmission, and monitoring application are presented in the following sub-section.

B. pH Sensor
To use the pH meter SEN0161 sensor, connect the pH sensor with BNC connector, and plug the PH2.0 interface into the analog input port of WEMOS D1 R32 ESP8266, for increase the accuracy the sensor has a table of calibration, with pH and the Voltage value of the sensor is shown on Table 1 with 25 0 water temperature.

C. TDS Sensor
The value of TDS sensor is used to determine the cleanliness of the water in hydroponic reservoirs. TDS shows how many milligrams of dissolved solids dissolved in one liter of water, the higher the TDS value, the more solids dissolved in the water and causes the water to become soiled. Calibration of the TDS sensor is clean insert the probe into the buffer solution and wait for stable readings, then compare the value with TDS meter.

D. Temperature Sensor DS18B20
Since the TDS and pH probe does not have a temperature sensor, the sample code of the default pH and TDS is at a water temperature of 25°C. Therefore, by combining its use with the DS18B20 digital thermometer sensor to read the water temperature, the value of the digital thermometer sensor will update the variable temperature in the code, so the code for the TDS sensor will be as follows.

E. Water Level Sensor
The HC-SR04 ultrasonic sensor is used to determine the distance between the sensor and the nearest object, in this case the water level as shown in Figure 2. The ultrasonic sensor is placed at the top of the water reservoir, and is directed towards the bottom towards the water surface. To start the measurement, the Triger on the HC-SR04 must receive a high pulse (5V) for at least 10 µs, the sensor will send 8 cycles of ultrasonic blast at a frequency of 40 kHz and wait for the reflected ultrasonic wave. When the sensor detects the reflected wave, then the Echo on HC-SR04 will calculate the wave delay time from the trigger to the echo, with the following equation:

F. Data Transmission Mechanism
The data from the measurement of water quality parameters is sent to a cloud database to be monitored through a website application. Based on the topology in data transmission presented in Figure 1, WEMOS collects all measurement parameters and then sends the data to the database. In order to communicate with the database server, an access point is needed as an internet gateway. In this study, WEMOS is connected to the existing internet network which acts as an access point [15]. Initial settings as the following script:   In this study, Google Firebase is used as the database server. The measurement parameters are then input into the text field as shown in Figure 3. The fields include "Distance", "pH", "TDS", and "Temperature", where Distance represents the water level.

III. reSult and dIScuSSIon
The hydroponic monitoring system proposed in this study has been implemented and tested at a greenhouse in Sukabumi, West Java. Figure 4 shows the installation of a 1.5 1 m hydroponic system containing Bok Choy. In this study, plant growth was not part of the analysis. Performance testing includes TDS meter, pH meter, temperature, water level, and web monitoring application. The test results are discussed in the following sub-section.

A. TDS Sensor Test
Testing the performance of the TDS sensor on the tool compared to a commercial standard TDS meter (Mediatech TDS-3). Tests were carried out at different levels of turbidity of the water. Both the tool TDS and the TDS-3 are inserted at the same time at the same height in the container filled with circulating water from the hydroponic pipe. The test results are presented in Table 2. From 20 tests with three varying levels of TDS, average measurement accuracy of 99% was obtained with a maximum error of 0.54%. The relative error delta is very small, in some measurements, the error rate is 0%. Thus, the TDS measurement of the tool can be relied on in the implemented hydroponic water quality monitoring system.

B. pH Meter Test
This test is intended to observe the reliability of the sensor in reading the pH of hydroponic water. The value read by the pH sensor is compared with the paper value of the pH meter (range 0-14). Water samples were taken from the same water reservoir. Measurements were made with two different pH values. The test results are presented in Table 3. The pH measurement by the sensor without rounding the value produces an error of 2.26%. Meanwhile, if rounded values are used, the accuracy of pH readings by the sensor reaches 100%. The existence of a delta reading error between the sensor and the pH paper is due to the limited resolution of the reading by the pH paper where the pH of the paper can only represent the absolute pH value from 0-14. From this test scenario, it can be concluded that the performance of the pH sensor can be relied on in a hydroponic monitoring system.

C. Temperature Sensor Test
The temperature reading by the DS18B20 sensor is compared with a digital thermometer. Both the ds18b20 sensor and digital thermometer are immersed in the same water. Table 4 shows the results of temperature measurements. Based on measurements by a thermometer, the water temperature measured has a range of 26 to 27 degrees Celsius. From the 20 tests that have been carried out, the average value of the sensor reading error is 0.38%. The relatively small error value indicates reliable sensor performance.

D. Water Level Sensor Test
The ultrasonic sensor in this system is used to measure the water level in the circulating water reservoir. The water level in the hydroponic system must be continuously monitored to ensure the availability of sufficient water in the reservoir. The values read by ultrasonic are then compared with measurements using a ruler. The measurement results are presented in Table 5. The ultrasonic sensor generates an average measurement accuracy of 98%. Differences in measurement values can occur because of water waves on the container due to the flow of water from the hydroponic pipe.

E. Information System Test
Measurement data is sent to the cloud database through the existing online internet network. The measurement result data is displayed through a web application as  Figure 5. There is 5 information consisting of 4 sensor reading data and 1 information related to the status of the water pump. Sensor readings are performed every 1 minute and are also displayed in graphical form.
This study also surveyed 30 farmers using the application through 3 questions with the results as shown in Figure 6. Based on the results of the questionnaire, it was concluded that the hydroponic monitoring system for Bok Choy plants that was implemented was following the needs and was beneficial for farmers in green house Sukabumi. In addition, this website application is easy to use but still needs development. Some suggestions regarding the development of applications on the website include the need for additional information about hydroponics and instructions for using the application. Another suggestion is that a flexible monitoring system can be used for different crops and the need to control the provision of nutrients to plants.

IV. concluSIon
Online quality monitoring of Hydroponics Planting using the Internet of Things has been successfully implemented in the Bok Choy green house at Sukabumi farm. The system is capable of monitoring water quality including pH, turbidity, and temperature. In addition, the water level is also measured so that the system can automatically run the water pump to meet the water needs of the plants. Based on the results of the questionnaire to hydroponic farmers, the application built on the website helps farmers in monitoring plant growth. Applications on the website will be developed according to suggestions from users, including the addition of information related to hydroponics and application user manuals. The monitoring system also needs to be developed to predict harvests, warn when plants are affected by the disease, and use for different plant varieties.