IoT-Based Hydroponic Plant Monitoring and Control System to Maintain Plant Fertility

Abstract Hydroponics is a method of cultivating plants by utilizing a small amount of land without using soil media. Hydroponic cultivation is still done conventionally in monitoring and controlling nutrients and pH of the air. Hydroponics is already with Internet of Things (IoT) technology in the cultivation process. The research aims to use IoT technology by developing control devices and monitoring hydroponic plants remotely, to make it easier for cultivators to control and monitor plant color, temperature, nutrients and the pH value of hydroponic plant water. Control and monitoring can be done through a smartphone application. The data from testing the condition of hydroponic plants obtained an average error of 1.8% for air temperature, 4.8% for water pH, 6.6% for plant color and 7% for water nutrients. Hydroponic plants with the TCS3200 sensor get a monitoring opportunity of 53.3%. Testing of tool control related to nutritional improvement has been carried out using the fuzzy Mamdani method with an increase in the probability of 88.75% for adding nutritional value and 0% for decreasing nutritional value. Tool control for improving the pH value of hydroponic plant water has been successfully carried out. Keywords—Component: Hydroponics; Fuzzy Mamdani; Water PH; Water Nutrition; IoT


I. Introduction
Population growth is always increasing. Agricultural land has been converted into land for housing development. This situation has an impact on the process of increasing agricultural production [1].
The progress of the times has created a method of farming that can produce quality agricultural products without having to have a large area of land. The farming activity is cultivation using the hydroponic method [2]. Hydroponics is agricultural cultivation land that is used to grow crops without using soil media but using water media in its application [3].
Hydroponic cultivation can be carried out in the yard of the house as a producer of fresh vegetable ingredients and can be produced as an ingredient of selling value [4]. Cultivation using the hydroponic method can produce quality plants that are free of pesticides and do not depend on the harvest season [5]. Types of vegetable crops that can be cultivated such as mustard pak-coy, lettuce, and spinach. Cultivation with the hydroponic method is different from the usual farming method, so it is necessary to understand in advance to be able to use it.
The hydroponic method requires skills in the cultivation process, because it is necessary to monitor nutrition and pH on hydroponic devices [5]. Beginner cultivators still use conventional methods to monitor and control hydroponic devices [6]. The conventional monitoring process creates problems for cultivators who do not have free time to be able to monitor hydroponic plants.
Technological developments are growing rapidly until the term Internet of Things (IoT) appears [7]. IoT technology allows activities carried out by humans to be controlled through the internet network [8]. The hydroponic method can be juxtaposed with IoT technology for cultivators to monitor and control hydroponic systems anywhere [9]. The application of IoT in hydroponics can be added with a method to support tool performance, one of which is the fuzzy logic method [10].
Research conducted in Ref [11] mentioned that there is research that proves that plants that do not get the value of nutrient solution concentration and pH levels are good or appropriate will result in a decrease in plant quality in terms of plant height, length and height plant leaf width, as well as plant weight and productivity.
Based on the existing problems, a system will be developed that utilizes Internet of Things (IoT) technology that can help cultivators monitor hydroponic plants via smartphones. The system will have several features such as a hydroponic plant monitoring feature based on temperature, color, pH levels and the concentration value of the hydroponic plant nutrient solution. The control feature for improving pH and nutrient levels is carried out with the help of a mini water pump that is regulated by a relay. The control feature for users can be done through a mobile application to determine the minimum and maximum limits for pH levels and nutrient solution concentrations (ppm). The function of improving the concentration of hydroponic water nutrient solutions is carried out using the Mamdani fuzzy logic method as a support in the mini water pump control process.

A. Hardware Design 1) Schematic Diagram
The material used in this research is in the form of hardware components that have been described in the schematic diagram. The following is a schematic diagram for this research.
Schematic diagram is an electronic circuit that describes a circuit using symbols that are connected by lines that describe the relationship of the cable components to the sensors used in the circuit [12]. it can be said that a schematic diagram is a diagram that represents every component contained in a system.

2) Flowchart Diagram
A flowchart can be defined as a chart that shows the overall workflow of the system, which explains the steps of the procedures in the system and shows what the system does [13]. In short, a flow chart is a diagram that describes how the system works by dividing it into each process that occurs in the system itself. The following is a flowchart of how the system works from this research.  Software design contains about display interface to be developed for mobile applications. The apps are for Indonesian users, so that the apps is in Indonesian.    Figure 4 (a) shows the design of the interface for the pH setting page that allows users to input values related to the minimum and maximum limits for an automation tool for improving water pH quality. Figure 4 (b) shows the design of the ppm (nutrition) setting page interface that allows users to input values related to setting the minimum and maximum limits for automation tools for improving water quality ppm.

1) Fuzzy Logic
Fuzzy logic is a method that can map an input space into an output space. Fuzzy logic has real values in the range 0 to 1. Rule-based decision-making process that aims to solve the problem of uncertainty, where the system is designed to control one output from several irrelevant input devices [14]. In the theory of fuzzy systems in general there are four stages, namely the fuzzification stage, the rule composition formation stage, the inference stage and the defuzzification stage.

A. Design Results and Tool Description
The results of the monitoring and control system design for hydroponic plants have gone through several stages, namely the manufacture and assembly of boxes with the laying of hardware that has been done and also the manufacture of mobile application software. The results of the hardware design can be seen in Figure 5.

B. Hardware Test Results 1) Test Results of Water Temperature and Nutrition
Testing the value of temperature and water nutrients is carried out by comparing the values obtained by the nutrition sensor in ppm (parts per million) and water temperature in units (°C) with a nutrient checker and standard water temperature in the main water tank for hydroponic plants.
The test result data is processed to find out the percentage of errors obtained. The error percentage has the following equation : The percentage of error obtained from testing the tds tool is 7.64% (Table 1) and the water temperature tool is 1.8% (Table 2).

2) Water PH Test Results
Water pH meter testing is done by comparing the values obtained by the water pH meter sensor with standard water pH tools. The results from Table 3 shows the percentage of error obtained from testing the pH of the water at 4,8%.

3) Water PH Test Results
The plant health test is carried out with the TCS3200 sensor where the sensor can change the color obtained into a converted frequency signal. The colors owned by the photodiode are composed of the basic colors RGB (Red, Green, Blue). The results from Table 4 show that the percentage of error obtained from testing the color sensor of the tcs3200 tool is 90%. DOI : http://dx.doi.org/10.31963/intek. v9i1.3407

4) Test Results of Automatic Mini Water Pump
Testing the mini automatic water pump to find out the addition and decrease in the nutritional value of water or the pH meter of the water in the main water tank. From Table 4 the amount of solution or liquid delivered by the mini water pump is quite stable because the increase in the amount of solution or liquid delivered every second has the same multiple for the value of the solution given to the main water tank.

5) Nutrient Value Test Results of Automatic Mini Water Pump
In testing the nutritional value of hydroponics, an experiment was conducted to find out how much influence the automatic water pump control had in distributing the solution either to increase or decrease the nutritional value of hydroponic plant water. The solution used is ABmix as an increase in the nutritional value of water and fresh water as a decrease in the nutritional value of hydroponic plant water.
The results from Table 5 show that the increase in the nutritional value caused by the ABmix solution delivered by the mini pump showed quite good results because the average increase of 10 ml of ABmix solution in 1 second could increase the nutritional value of water by ± 67. Inversely proportional to with the results obtained during the process of decreasing nutritional value, which shows a very small reduction in nutritional value of ± 5.3 where the mini water pump has delivered total fresh water to the main water tank as much as ± 810 ml/ 27 seconds.

6) Test Results PH Value of Automatic Mini Water Pump
In testing the pH of water in hydroponics, an experiment was carried out to find out how much influence the automatic water pump control had in distributing the solution either to increase or decrease the pH value of hydroponic plant water. The solution used is "PH UP" as an increase in the pH value of the water and "PH DOWN" as a decrease in the pH value of hydroponic plant water. The results from Table 6 show the process of decreasing and increasing the pH value of the main water tank carried out by an automatic water pump. From Table 6, the value of decreasing and increasing the pH of the water showed stable results, both from the water pH sensor tool in reading the pH value, as well as from the water pH meter used as a comparison. The average calculation result for decreasing the pH value with the "PH Down" solution is ± 0.3 / 10 ml and the average calculation result for increasing the pH value with the "pH UP" solution is ± 0.5 / 10 ml.

7) Test Results of Water Nutrient Automation with Fuzzy Method
In testing to adjust the desired water nutritional value, the Mamdani fuzzy logic method is used. The fuzzy function here is to map the existing input values as parameters, where in this case the parameters used are the tds value and water temperature from the sensor that has been built. In addition to the 2 inputs that are used as parameters, of course there are also outputs that will be produced, namely, to determine how long the mini pump will function either to increase or decrease the value of the desired water nutrients. The results from Table 7 can be seen that the output of the tools and systems made with the fuzzy method process when compared to the MATLAB application shows the same results in the process of setting the pump on and the pump off.  Table 8.

8) Water PH Automation Test Results
The automation process to reduce the pH value of water does not use the fuzzy method, because the parameter that determines the pH meter value only has one variable. Therefore, automation is carried out with a simple method of turning on and off the water pH meter regulating pump.
The firebase database has data on the lower limit of the pH value = 6, and the upper limit of = 7. So, the pH range of the water in the main tank must be between 6 to 7 pH. When the initial sensor reading was taken, the pH showed that it was at a value of 7.40 pH, so it was necessary to lower the pH where the pump was running automatically for 1 second to add a pH Down solution as a lowering of the pH value. This will continue until the position of the pH value is in the range of 6 to 7.

9) Plant Condition Monitoring Test Results
The process of monitoring plant conditions through the TCS3200 sensor is carried out by placing the sensor at a certain distance to get the RGB frequency value. RGB frequency becomes a parameter of the sensor to be able to determine the condition of the plant through the color of the plant. The test results from monitoring the condition of hydroponic plants based on the frequency of RGB color indicate that from 9 experiments on 3 types of plants with different distances for each type of plant, the average success rate of 55.55% and an average error rate of 44.45%. It can be seen in Table 8 that the results of the appropriate sensor readings at a certain distance are precisely at the sensor readings at 2 and 6 cm. This can happen because the sensor will be more accurate if the object is close, so the closer the sensor is, the more accurate the detection will be [4].

C. Software Test Results 1) Hydroponic Plant Monitoring
Monitoring of hydroponic plants can be done through a mobile application that has been created. The application can display the value of temperature, nutrition, pH, and plant health in real time.

2) Setting Water Nutrient Values for Hydroponic Plants
The mobile application provides a feature for users to determine the desired water nutritional value of hydroponic plants. The nutritional value setting page on the mobile application has two entries where the user can fill in the input field according to the directions already in the application.

3) Setting the PH Value of Plant Water for Hydroponic Plants
The mobile application provides a feature for users to determine the desired water pH value from hydroponic plants. The pH value setting page on the mobile application has two entries where the user can fill in the input field according to the instructions that are already in the application.

D. Hydroponic Plant Growth Test Results
The results of testing the growth of hydroponic plants that have been cultivated, were observed on the development and growth of plants with parameters of height and number of leaves of hydroponic plants.
Observations of plant height were measured uniformly from the surface of the rockwool planting medium and observations of the number of leaves were carried out on fully formed leaves. Initial observations were made when the plants were 7, 14, 21 and 28 DAP.

1) Plant Height Test Results
The test will be carried out at a predetermined time, namely in the first week to the fourth week after planting. Plant height testing will be carried out using a measuring tool with a centimeter (cm) scale. DOI  The results of the test on plant height as shown in Table 9 show that growth occurs every time the monitoring is carried out. The plant height growth of each plant on pak-coy, lettuce, and spinach was 20.4, 25.8, and 36.1 cm, respectively. This shows that there is development in the cultivated plants.

2) Plant Leaf Test Results
The test will be carried out at a predetermined time, namely in the first week to the fourth week after planting. Tests on plant leaves will be carried out using direct observations for leaf color and leaf number of hydroponic plants.
The results of tests on the number and color of plant leaves as shown in Table 10 show that growth and changes occur every time the monitoring is carried out. The growth of the number of leaves at the last monitoring was 28 DAP for pak-coy, lettuce, and spinach, respectively, were 13, 15, and 38 leaves. The general plant color for pak-coy, lettuce, and spinach is green. In the monitoring carried out, there are wilted leaves so they are not included in the calculation of the number of plant leaves. IV. Conclusion. 1. A device designed to maintain and maintain water fertility in hydroponic plants using sensors of color, temperature, pH and hydroponic water nutrients. NodeMCU serves to send data from reading sensors to the firebase database. The mobile application will retrieve data from the firebase database to display information about hydroponic plants from temperature, color, pH, and water nutrients to hydroponics to users. 2. The fuzzy Mamdani method is used to automate the improvement of hydroponic plant water nutrients by using water temperature parameters and water nutritional values. Sensor readings that produce values for temperature and water nutrients will be processed on the Arduino Mega board for further fuzzification, which will display an output that can set the mini water pump to turn on automatically as needed. 3. The mobile application can run as intended to display information about plant color, nutrition, temperature, and pH. The feature to determine the minimum and maximum limits for both the pH value and the nutritional value has been running successfully. 4. The feature of decreasing the nutritional value of water in hydroponic plants is still not optimal because when the experiment was carried out, the results that were expected to significantly reduce the nutritional value of water had not been achieved. This can happen, one of which is because the ABmix solution used is too concentrated so that when fresh water is added to dissolve the ABmix solution in the main bath, the ABmix solution is still difficult to dissolve, resulting in the expected decrease not being maximized. 5. The system for regulating the nutritional value of hydroponic plants using an automatic water pump controlled by the fuzzy mamdani method obtained an average error value for 4 trials for increasing the nutritional value of 11.25% and 0% for decreasing the nutritional value of hydroponic water.
6. Monitoring features related to plant conditions are carried out with the TCS3200 sensor by testing the cultivated hydroponic plants, namely pak-coy, lettuce, and spinach with each parameter used being 2, 4, 6, 8, and 10 cm. The probability of success obtained from this test is 53.3%, and the distance that produces the appropriate value is in the range of 2 to 4 cm.