Smart hydroponic based on nutrient film technique and multistep fuzzy logic

ABSTRACT


INTRODUCTION
Nowadays, agriculture is a traditional way to produce vegetable to meet our needs.With the rate of resource needs is more than 70% [1] and the solution to reduce resource in agriculture is develop smart irrigation system [2].Other method is using hydroponics for growing and producing vegetable to meet our daily needs with an efficient land and resource use.As now there are two types of hydroponics that can be implemented to grow crops.There are deep flow technique (DFT) [3] that requires roots to be fully submerged in the water.On one method called nutrient film technique (NFT) [4], [5] used to grow crops without submerging the roots like in DFT technique, so roots will be just flowed with water not submerged.
Previous research calculated parameter from water level [6], pH level [7].[8] and electrical conductivity (EC) level in hydroponics water [9] others research will add some humidity, light and temperature sensor to test watercress crops.Some of them create automation with monitoring system [10], [11] which would help to automate or manually control actuators to maintain threshold.With automation system frequently build with Arduino or Raspberry Pi as main processing system or with another parent [6] for accommodating long range [10] monitoring system.Recent method fuzzy [12]- [15] were used for fully automated monitoring system in hydroponics system.With fuzzy logic controller it is know best application for defining detail between true or false and in hydroponics it is better to use fuzzy logic controller as it is method to support decision making.Differentiation in fuzzy logic clearly define the range between a hot and 3147 cold situation it can be specified to hot, medium hot, normal, medium cold, and cold.As these properties in fuzzy logic method, it can adjust properly for calculating time needed to add some parameters in hydroponics.For example, in defining a gray area between hot and cold other research use fuzzy logic for estimating contact force for railway application [16] to make pantograph connection reliable with less calculation time.Evaluation of previous research some are using detailed comparison till length of leaf produce with this method [12] other evaluate by progressing it is growability in controlled environment.Within hydroponics already using less resource and less land use, it is already progressing towards the efficient resource.When using hydroponics to grow crops daily maintenance can be troublesome like maintaining temperature, pH, parts per million (PPM) to meet the crop needs.As efficient resource can be improved by using an internet of things (IoT) to do some automation to the hydroponics system [17], [18], [19].There are many hydroponic automations that has been published.Some of them have shown a good progress in using automation to maintain the hydroponic system parameter that leads to great growth rate of the vegetable and prove to be effective with manual [6] or automation control.To summarize the future challenges in hydroponics automation, some are suggesting adding light control to maximize growth rate to overcome weather condition, other suggest technical aspect about activating multiple actuators at the same time.Within that conclusion of other research, the authors proposed of using multistep fuzzy [20], [21] logic to accommodate some of idea in previous research motivation creating a multistep fuzzy logic is to extend the technical aspect to be able activating relay within the same time, after relay were activating the same time it is possible there are some calibrations needed to tune mixed solution to add a difference into the hydroponics main system.

RESEARCH METHOD
In this research will use NFT for hydroponics system that claimed to be affecting growth rate which is caused by root can absorbed more oxygen compared to DFT that needs root to be completely submerged in the water.The system can be seen as Figure 1.From Figure 1 the system is controlled by Arduino mega which is used to monitor the parameters like pH [22] sensor, EC sensor, ultrasonic sensor [23].The value of each parameter from the sensor is send using ESP8266 module for Arduino to connect internet.End receiver is in a web server running to retrieve data send with request from Arduino.While the Arduino mega is monitoring the parameters it also processing fuzzy logic parameter for decision making for maintaining parameters so it still on the threshold.Maintaining the parameters, the Arduino will activate some relay to operate peristaltic pump for the water and nutrition that crops need.Where in this research is used kale crops to grow with optimum pH values were range in 5, 5-6, 5 and in parts per million (PPM) values range in 1,050-1,400.The main process can be seen in Figure 2 of maintaining the water parameters with water level sensor, pH sensor, and PPM sensor is start by reading all the 3 parameters and each of it is reading it operates by fuzzy output that give how long of this pump has to activate within seconds.The pump is driven to pump within seconds to other temporary container.Temporary container is used for accommodating new approach to multistep fuzzy logic.Method that were used in this research and it is use for step 2 check to tune the parameters in temporary container that parameter in temporary container can affect the main container in a right way so the monitoring system can be calculated again after same second relay activation.In Figure 2 is detailed how automation with fuzzy logic were used in determining which condition the parameter in works with 3 parameter water, pH, and nutrition to maintain for optimal crops growth.With detailed membership function can be seen in Figure 3 for water level, 4 for pH level and 5 for PPM level.In Figure 3 water level sensor is detected by ultrasonic sensor within range 0-10 and detail is described in Table 1.Maintaining parameters in water, pH, PPM to be in optimal which is water in moderate level, pH in normal level and PPM in normal category are decided by defining a new membership output in Table 2.
Process is start from checking how much water needed to reach moderate level.The process is to check the water level height in the main hydroponic system container and calculate it with water fuzzy logic.After that activate pump based on how much time in milliseconds to add the water to the temporary container.Now water was in the temporary container needs to added pH and nutrition based on first level multistep fuzzy logic.With membership function for pH in Figure 4 and PPM in Figure 5 detailed information of membership function can be seen in Table 3 for pH and Table 4 for PPM.
In Figure 4 is defined fuzzy membership function for detecting pH Level based on kale optimal pH level for optimal growth.Table 4 defined fuzzy rule base condition to determine from water level that has been added to temporary container by first water level check and pH level condition in main hydroponics.After first pH level check the proposed system will activate pH alkaline or pH acid to a temporary container and then process it to get the next step of checking PPM level to add it to a temporary container.With fuzzy membership function in Figure 5 with detail in    After the first level of multistep fuzzy logic in water level, pH level, PPM level is done and added to temporary container.Then proceed to second multistep fuzzy logic is done by another process of fuzzy logic to check the parameter in the container will affected the main hydroponics by 1 more check with rule base can be seen as Tables 7 and 8.The multistep fuzzy logic is to check the pH and the PPM level in the temporary container to adjust the parameter to fully affect and managed to go to the threshold in our optimal growth condition.In membership function to check pH level and PPM level within the next step fuzzy using the same membership functions but with other fuzzy rule base.

RESULTS AND DISCUSSION
Within this section is a comprehensive explanation how the research result is detailed.In aspect of system coverage, software specification, and comparison in module for sending data to provide real-time monitoring data.Research result will compare with each test with different sets of modules.

System result
Research system result will be explained in list with the equipped items or modules to hydroponics systems.In purpose the system will help automate monitoring crops growth with multistep fuzzy logic with two steps checking for adding parameters to main hydroponics system.Hydroponics that built in this research still using outdoor sunlight compares in [6] create an automated environment control.The system can be seen in Figure 6.-Arduino mega -2 pH sensor -2 EC sensor -ESP8266 -Ultrasonic sensor -4 channel relay -1 channel relay -6 peristaltic pumps e) Temporary container with other container for water, nutrition, acid, and alkaline supply f) Standalone Raspberry Pi as a server for receiving monitoring data.

Software architecture
Arduino it is the main compute process from reading the sensor values to calculating fuzzy logic result in step 1 and step 2 last but not least sending it to Raspberry Pi by using one of these alternative module ESP8266 [24], [25] or NRF24L01.ESP8266 is better at data transmission and easy to integrate for this system [10].First step Arduino will read the sensor values frequently by 3 minutes in process with using ultrasonic, pH, EC sensor for calculating fuzzy logic first step and create a decision making for adding water, acid, alkaline, or nutrition parameter to a temporary container by activating relay to activate peristaltic pump.After first step fuzzy logic is done Arduino will go through the second step of multistep fuzzy logic by comparing temporary container sensor values with the main hydroponics system to really compare the mixed solutions in temporary container will greatly affect the main hydroponic parameter.Result in adding and sensor values all will be send with ESP8266 or NRF24L01.While Raspberry Pi used for receiving data sent by Arduino to be processed and visualized to a graph in monitoring system.In Raspberry were installed Apache/2.4.38 (Raspbian), MySQL Ver 15.1, PHP 7.3.19,and using Laravel Framework for creating web apps.Detail of software function and programs that were used in this research can be seen in Figure 7.

Method result evaluation
Result were tested by how accurate multistep fuzzy logic in range of the fuzzy rule and a comparison of ESP8266 and NRF24L01 for sending data to be visualized in graphs for monitoring purposes.In each test fuzzy, it is tested with 30 test cases for multistep fuzzy logic sample is represented with Tables 9 to 13. Summary of conducted testing in all fuzzy logic in this research shown in Table 14.As far from Tables 9, to 14 concluded to method implementation to be as expected from the fuzzy rule that were designed to manage hydroponics parameter.

Send data module result
With the purpose to make monitoring in this research try to test 2 modules to send data to API.Using ESP8266 that connect directly to Wi-Fi and NRF24L01 to act as a bridge to receive from main hydroponics Arduino and connect ESP8266 to direct Wi-Fi.This testing evaluation is done because in implementing ESP8266 there is some issue assuming it was a serial connection issue.
First test with first design planned architecture conducted using ESP8266 to create a comparison between the two modules.Schema can be seen in Figure 8.In this schema, it is connected directly through the ESP8266 to Raspberry Pi resulting a valid data received in Raspberry Pi.Activating Relay in this test case is activate one by one not in synchronous activation.After some time running the module will failed so it is a problem to generating a valid monitoring data and detailed test result can be seen in Table 15.Testing first design planned architecture in ESP8266 got 6 data received in 1 hour test time resulting in 30% data sent and valid with 100% percentage.Testing with synchronous activation relay resulting in Arduino cannot send the first data to API with ESP8266.
With testing in a revised plan using NRF24L01 with radio is done by adding 2 NRF24L01 module and an Arduino Nano to act as a bridge to receive and forward data that send from Arduino in main hydroponics system.This test is conducted to know if the ESP8266 module was the root cause of failed send data.Within Figure 9 can be seen detailed of the schema and detailed test result in Table 16.
Summary for ESP8266 is better at sending valid data to the API served in Raspberry Pi than NRF24L01.While NRF24L01 give more results data sent than ESP8266 were much more received but there is some lost data in water level values that affecting data to be replaced with water add duration, this occurs on Table 17

Relay activation
Same relay activation is calculated by sorting from smallest to the biggest water add duration, ppm add duration, pH acid add duration, pH alkaline add duration.Make sure each individual value was unique to sorting it in an array.After that we assign the pin from where the relay was used for water, pH, and nutrition.Sorting has been done and then loop through the array with each array identifies with each relay and calculate the differentiation by using this formula and start within array index 1 not 0.
Calculation has been done and resulting an array it may look like 2500, 400, 100, 25 and then loop from index 0 to set delay in to 2.5 seconds and then turn it off and it goes on till the end of array.

Calibration result
In new proposal of using multistep fuzzy logic, researchers tested method from how efficient multistep fuzzy logic in calibration to optimal condition in growing kale, where optimum pH values were range in 5, 5-6, 5 and in PPM values range in 1050-1400.Test were conducted in adding water only which pH value were average 7.32 and PPM value were 187.5 to start calibration process to it is optimal condition and done in 30 tests.From 30 test concluded average iterations of 12.8 and it is standard deviation is 3.02176 details of summarization in conducted testing in Figure 10.

CONCLUSION
From testing multistep fuzzy logic can be concluded method have worked as expected in fuzzy rule that has been made by the author.This system plan to have an impact to automate hydroponics real-time in real life.This system has an impact to automate hydroponics real-time in real life with the result of calibrate iteration average were 12.8 and it is compared to previous research were using one step fuzzy logic were stated to have 25 iterations for reaching optimal condition in their research.This method proves to be a better calibration performance in controlling hydroponic parameters.From author perspective multistep fuzzy logic were used to have a great impact with calibration process in water condition.Second calculation within the temporary container used to correct furthermore before adding mixed solution to main hydroponics water.
In sending data to make a real-time monitoring system by comparing ESP8266 and NRF24L01 the result was not good as expected to be in this research.In ESP8266 get 30% in receiving 6 data from expected 20 data in 1 hour testing but in validation data the ESP8266 showed better performance than NRF24L01 with radio protocol.NRF24L01 have a better significant in sending data in this research with results 75% but in validation data there are some loses in data presumably with sending data over radio it will cause some lost data.For future research can be digging deeper on other module for sending data that can provide a better result in monitoring website.After new send module has been installed can improve more by adding lights to the parameter.So, it can give another insight of how lights would work to maximize hydroponics crops growth.
Int J Elec & Comp Eng ISSN: 2088-8708  Smart hydroponic based on nutrient film technique and multistep fuzzy logic (Prabadinata Atmaja)

Figure 2 .
Figure 2. Flowchart to maintain hydroponics parameter

Figure 6 .
Figure 6.Hydroponics system integrated with automation system

Table 5
and fuzzy rule base in Table 6.After first level calibration based on water level added and pH or nutrition proceed to the next level of multistep fuzzy logic.Int J Elec & Comp Eng ISSN: 2088-8708  Smart hydroponic based on nutrient film technique and multistep fuzzy logic (Prabadinata Atmaja) 3149 Figure 3. Fuzzy membership function water level

Table 1 .
Fuzzy membership function water level range

Table 2 .
Output duration

Table 4 .
Fuzzy rule base pH level

Table 5 .
Fuzzy membership function PPM level range

Table 6 .
Fuzzy rule base PPM level

Table 7 .
Fuzzy rule base pH level step 2

Table 8 .
Fuzzy rule base PPM level step 2 Smart hydroponic based on nutrient film technique and multistep fuzzy logic (Prabadinata Atmaja) 3151

Table 9 .
Sample fuzzy logic water result

Table 10 .
Sample fuzzy logic pH result Smart hydroponic based on nutrient film technique and multistep fuzzy logic (Prabadinata Atmaja) 3153

Table 11 .
Sample fuzzy logic PPM result

Table 12 .
Fuzzy logic pH step 2 result

Table 13 .
Fuzzy logic PPM step 2 result

Table 14 .
Summary fuzzy logic testing

Table 15 .
at 21:30 water level values should be around 6 and water add duration replacing water level.The summary shown in Table 17.Testing result using ESP8266 schema pH Step 2 Alkaline Add Duration (Seconds)

Table 16 .
Sample testing result using NRF24L01 schema

Table 17
Smart hydroponic based on nutrient film technique and multistep fuzzy logic (Prabadinata Atmaja) 3155