The Design of Automatic Soil pH Control System on Aloe vera Cultivation with an Integration of Internet of Things (IoT)

ABSTRACT


INTRODUCTION
Up to this date, Aloe vera has been exploited for its pharmaceutical value. The gel of the plant has been processed for medicinal and cosmetic application, such as wound healing, anti-inflammatory (Heng et al., 2018;Veerasubramanian et al., 2018), sun light protection skin lotions, and anti-aging (Javed & Atta-Ur, 2014;Lee et al., 2021). Its application for the purpose been recorded globally, for instance in India, Egypt, Greece, Rome, and China (Ahlawat & Khatkar, 2011). The up to date facts regarding to its biologically active components has expanded Aloe vera usage into food industry, particularly in Indonesia (Achmad et al., 2019;Suriati et al., 2021). The knowledge of its valuable used in the industries has been made Aloe vera is regarded as useful nutritional substance (Javed & Atta-Ur, 2014).
The booming of Aloe vera business is eventually resulted in high demand of the crop (CBI, 2020). Moreover, the development of the crop has emerged due to the global demand as consumers are recently more concerned with a healthy lifestyle (Radha & Laxmipriya, 2015;Hęś et al., 2019). Hence, the cultivation of the plant provides business opportunity for the community. However, in West Sumatera, Aloe vera has experienced a decreased production from 2018 to 2019, which from 3644 kg/ year to 2638 kg/year (BPS, 2020).
One of the techniques that may be boosting up the crop yield is fertility management (Chowdhury et al., 2021). The nutrient uptake especially nitrogen (N) has been determined as enhancement for physical growth of Aloe vera. Unbalancing of nutrients content in soil gives deleterious effects on soil health and eventually the crop yield (Cristiano et al., 2016;Rehman et al., 2016). Investigation has determined that quality and quantity of the nutrient contents in soil are dependent on the soil pH (Yurisinthae et al., 2012). If soil pH is too high, the alkaline condition results in the nutrient uptake from urea fertilizer is not optimal. Meanwhile, if the soil pH is too high, the acidic condition will result in higher rate bioavailability of heavy metal in the soil. It will eventually have an effect of heavy metal poisoning on the Aloe vera which hampers the growth of Aloe vera and reduces the tillering (Robledo et al., 2017).
Regarding to the mentioned above, soil condition must be monitored continuously for Aloe vera cultivation. Machine learning and internet of thing (IoT) would be the best option for monitoring the appropriate soil pH condition for Aloe vera. The coupling of the technologies can effectively monitor the farms to achieve higher yields (Jawad et al., 2017;Mathi et al., 2023). The soil status and crop health are monitored precisely by IoT since effective measures can be taken immediately when certain issues are detected. Moreover, the technology can address certain problem faced in agricultural sector, for instance the availability of the farmlands (Mathi et al., 2023).
Previously the automatic soil pH control system has been utilized for monitoring the cultivation of rice plants (Santoso et al., 2022) and tea nurseries (Ikhtiar et al., 2020). The ideal soil pH for rice plants was at a value of 4-7 and for tea seedlings was at a value of 4.5 -5.5. However, To the best of our knowledge, no detailed research has yet been published on the automatic soil pH control system based on the IoT for controlling the soil pH for cultivation Aloe vera. Hence, the objective of this study is to design an automatic soil pH control system based on IoT for monitoring the cultivation of Aloe vera plants. The Telegram application is occupied as an IoT platform and is connected to a free and easy access application, Node MCU 8266. Observation and data analysis are done to evaluate the performance of the designed automatic soil pH based on IoT.

MATERIALS AND METHOD
The research was done by experimental method. Several stages were conducted accordingly in this research, which were 1) designing the prototype of a soil pH meter equipped with IoT, 2) connecting the system of soil pH measurement to the IoT platform, Telegram application that was equipped with Esp8266 Node MCU, and 3) observing the overall performance of the device and performing data analysis.

2.1.The Prototype Design of Soil pH Control
The prototype was designed in two levels of shelves as seen in Figure 1. The dimension of the prototype was 2m x 0.15m x 1m. Wooden block was chosen as the based material of the shelf. Each of the shelf was equipped with a 2m water gutter as the pots and HDPE water pipe for water supply. Ten Aloe vera were placed in each of the pots. Meanwhile, the soil pH sensor was placed in the middle each of the pots by plugging it into the soil. The command was sent only from 1 sensor, hence the sensor at level 2 was chosen as the reference in controlling the soil pH. The preliminary test was done beforehand to assure that both sensors had similar data distribution. Acetic acid and buffer pH 10 where used as the acid and alkaline solution to stabilize the soil pH. Each of the solution was stored in a plastic container. Inside of each container was equipped with a pump to pump the solution. The top of the container was covered by transparent plastic. The prototype was covered by a transparent roof to block rainwater from the plants.
The range pH of 5 -6 was chosen for the pH soil of the Aloe vera cultivation. When the set point of the soil pH was detected under 5 then the pump of the base solution would be automatically working. The solution was pumped into the soil through the HDPE pipe along with water to assure it was directly absorbed into the soil. On the other hand, the acid pump would be automatically pumping the acid solution when the set point was detected higher than 6. Furthermore, the pumps were set to be off when the pH soil reached 5.5. The relay was set to be off by the microcontroller that eventually also stopped the pump when the desired pH point was reached.

Connecting System in the IoT Platform
An Internet of Things (IoT) working system was adopted by the control system in this experiment to facilitate user along controlling process of the soil pH during the Aloe vera cultivation. The control system was consisted of several core components namely, soil pH sensor, MCU ESP 8266 node, relay, Arduino Uno and smartphone. The components were arranged accordingly as the instructions of the programming language. The control system circuit can be seen in Figure 2. Meanwhile, the Telegram was connected to WiFi NodeMCU ESP8266 module to show the reading output from the sensor on the soil pH of the plant. The registration was conducted on Bot Telegram which is called botfather. The ID was provided by botfather after the registration was completed. The ID was then used to start the new project on the Telegram application. The internet connection was mandatory to assure that NodeMCU ESP8266 was working properly. The connection was provided by a hotspot or a rooter that was connected through program application of aroduino IDE. The telegram display can be seen in Figure 3.

System Performance Testing
The testing was conducted on the automatic pH control system. Each of the component was tested through the application of telegram. The testing was evaluated based on the system performance on controlling the soil pH.
The system testing performance was done based on evaluation on four parameters, which were pH detection by the sensor, activation of the relays, the working pumps, and the read value by the telegram, respectively. The reading stability of each of the parameters was presented in the percentage and was determined by Equation (Eq) 1.
The percentages obtained by performing Eq. 1 for six parameters were then given as: ( 1) where a is pH detection by the sensor, b is activation of the relay 1, c is activation of the relay 2, d is the working pump 1, e is the working pump 2, and f is the read value by the telegram.

The Validation of the Sensor Measurement
The validation of the sensor reading was conducted by comparing the reading by the used soil pH to the standardized soil tester. The error value was used to evaluate the validity of the sensor. The reading was done three times a day on every 7 days for 1 month. The time of data collecting was at 8 in the morning, 1 and 6 in the afternoon. Meanwhile, the error value of soil pH sensor was calculated by the Equation 3. where A is the read value by standardized soil tester, and B is the read value by the used soil pH.

Data Analysis
Data analysis was carried out to determine the mean and regression from the experimental data. Regression analysis was conducted to determine the accuracy of the reading results. The mean or the average was obtained by calculating the total value of the data divided by the number of observations as presented in the Equation 4.
where x is variable predictor, and n is number of test.
Meanwhile the regression analysis was determined from line equation from the plotting the data into the graph, as presented in Equation 5. where Y is response variable, a is a constant, and b is regression coefficient.
To determine the value of a and b, the Equation 6 and 7 were conducted.

Plant Observation
The plant was observed every 7 days when the system was running for 1 month. The length and the amount of Aloe vera leaf were chosen as the parameters of the observation. There were 20 of Aloe vera were treated in the experiments. During the cultivation, the urea fertilizer was added for every 20 days (Arnawaty, 2006). The plant was watered daily in the morning. (2) Meanwhile, 10 Aloe vera was used as the control plant. The control plant as given the same treatment, however without the soil pH controlling. The control plant was used as comparison to evaluate the effect of soil pH system in the cultivation of Aloe vera.

Validity of Sensor Measurement
The validity of the sensor reading measurement was evaluated by comparing the outcome value from the sensors to the one from the standardized pH meter. The measurement was done under several soil pH conditions. The pH was adjusted with the addition of acid or alkaline solution. Figure 4 showed the graph of the comparison read pH for sensor calibration. It was seen from the figure that calibration obtained R 2 from the both sensors. The R 2 was used to determine the accuracy of the read pH from the tested sensors. The calibration results in fig. 4 showed that R 2 for both sensors were closed to 1. The R 2 from sensor 1 and sensor 2 were 0.99221 and 0.99735, respectively. The value showed that the results from the tested pH sensors are highly linear with the outcome of standardized pH meter as the reference. Regarding to the results, the pH value from the sensors during the experiments was reliable and valid.

Performance of System Control
The test of system performance was conducted in two steps. The first one was the testing on system performance without the existence of the Aloe vera. The test was called as the blank system test. Meanwhile, the second one was conducted with the presence of the plant and called as the Aloe vera system test.

The IoT System Test
The test was conducted to assure that the system was working properly on determining the soil pH, the relay was adjusting the read pH to the working pump, and the telegram was displaying the sensor outcome. Hence, when conducting the test, Aloe vera was not involved in the system. The qualitative results of performance testing were presented in Table 1.
Based on the displayed data in Table 1, the relay was working properly on setting the pump regarding the pH from the sensor. It was seen that the relay 2 was on and the pump 2 was pumping the base solution during the first test when the pH was below 5. Meanwhile, on the second and third test both relays were off. It was due to the pH from both tests were detected in a range of 5-6. Furthermore, the relay 1 was performing on the last two tests, as the pH values were read higher than 6. Regarding to the results, the delay was noticed during the second and the last tests. Nevertheless, the soil pH could be read despite of the delay for 3-5 seconds. The delay was caused by the distance between the control system and the internet source, wireless fidelity (WiFi) which is quite far so that the signal strength is reduced. Therefore, the WiFi with stronger and faster internet speed was placed closer to the control system to prevent the delay during the running system. According to the data obtained in Table 1, therefore the percentage of reading stability of each parameter during testing can be calculated using Eq. 1. The results were displayed in Table 2. Table 2. The percentage of reading stability for all parameters of IoT pH soil system It was clearly seen from Table 2 that reading stability of the six parameters were defined during performance testing. Five parameters were reaching 100% of success percentage while one parameter, which was Telegram application obtained only 60% of success percentage. The result was due to the delay occurred during 2 tests out of the total of 5. The delay was determined as the unsuccessful one. It is noteworthy that the result was aligned with the previous finding by (Oktavianda, 2021). It was shown in the study that the testing on the performance of system control had a delay for 3 seconds. The result was also marked as the unsuccessful one during the system testing.
Referring the percentage from the Table 2, therefore the total percentage from the system performance testing could be determined by using the Eq. 2 which was: Regarding to the calculation, the total percentage of the system performance testing was 93%. The result was similar with previous study by (Oktavianda, 2021). The study also showed the percentage of 93% on the performance testing of system control. According to the study, this result was claimed to represent the system was working accordingly.

The Aloe Vera System Test
The test was conducted to calculate the required amount of acid and base solution and the required time of the both pumps to reach the soil pH of 5.5. According to the pretest, it was reported that the average flow rate of the pump was 6.172 ml/min. The average was obtained by averaging the experimental data as seen in Table 3. As seen in the Table 3, the test was conducted in five times and the standard deviation (SD) from the obtained data was 0.058. Based on the SD, the difference of the data from the replication was acceptable. The required amount of acid and base solutions was displayed in the Table 4 and  Table 5, respectively. It was clearly seen in the Table 3 that 135 ml of acid solution was required to adjust the desired soil pH of 5.5 when the initial soil pH was higher than 6. The required amount of solution was increasing when the initial pH was higher than 6.5. The amount was obtained by using the pump with the flow rate 103 ml/second according to the previously done flow rate test. According to the initial pH condition during the experiments, the initial of soil pH was in a range of 6 -6.5. Therefore, based on the displayed data in the Table 3, the total required acid solution of the system for 20 of Aloe vera during the experimental period was 2.7 L. Table 4. Data of the system test on acid solution injection and pump active time Meanwhile, it was clearly seen in the Table 5 that the required amount of base solution was varied regarding to the initial soil pH. The most required amount of base solution was when the initial pH condition was at the lowest one, which was 145 ml with the initial soil pH was 3.5. Furthermore, the amount was less with 126 ml when the initial soil pH was 4.5. As the initial soil pH during the experiments was in approximately 4.5, therefore the required amount of base solution during the system running could be determined. According to the data displayed in Table 5, the required amount for the base solution to adjust the pH to 5.5 was 2.52 L.

Repetition
Flow rate Repetition 1 6.250 ml/minutes Repetition 2 6.190 ml/ minutes Repetition 3 6.210 ml/ minutes Repetition 4 6.090 ml/ minutes Repetition 5 6.120 ml/ minutes Average 6.172 ml/ minutes Standard Deviation 0.058 Tabel 5. Data of the system test on base solution injection and pump active time

Accuracy and Error Value
The accuracy test was conducted to assure the pH reading was accurate during the experimental period. The test was done by measuring the soil pH and comparing the reading value of each sensor soil pH to the standardized pH meter. The data was compared on every 7 days for a month. The results of measurements were displayed in Figure 5. It was clearly seen in the Figure 5 that the value from both pH sensors were close to the reading value by the reference pH meter for 28 days of measurement. Hence, the data from pH sensors could be reliable to be referred for soil pH controlling system. To support the result, the error value was also calculated. The calculation was done to determine the proximity of the sensor performance to the value of the standardized pH meter. The error value of the sensor was presented in Table 5.

Tabel 5. Error Value of pH sensor 1 and 2
According to the presented data in Table 5, the error value of sensor 1 and sensor 2 were 0.96% and 1.6%, respectively. According to the previous studies by Mohammad

Crop Observation
The observations were done on the crop with soil pH control using system control and the crop without soil pH controlling. The observation was conducted to examine the difference on the crop with different treatment on soil pH. The crops with the two different treatments were displayed in Figure 6. It was clearly seen in the figure 7a that the leaf was longer with the control system on the soil pH than the one without. The average of the leaf length of the Aloe vera with control system was 24.78 and the one without was 23.11 cm, on the twentyeighth day. The average of the length difference of the Aloe vera within the two treatments was 1,7 cm. Furthermore, the statistical analysis was also conducted through the overall and weekly data T-test. The weekly T-test results for the first, second, third and fourth week showed a significant value which were 3.63 x 10 -29 , 1.35 x 10 -27 , 2.46 x 10 -27 , 1.04 x 10 -28 , respectively. Moreover, the overall T-test also obtained the significant value with 5.2 x 10 -94 .
There were two parameters to differentiate the treatment during observation which were the length and the amount of leaf of the Aloe vera. The observation was done every seven days for 1 month. The results of the two observed parameters were displayed in Figure 7.  figure 7b presented the amount of leave of the Aloe vera during a month of observation. The figure showed that there was no difference on the amount of leaf from the two different treatments. Moreover, the calculated average of the amount of leave from both treatment conditions were 6 leaves. Regarding to the presented results, the treatment did not affect the amount of Aloe vera leaf. Apart from the length and amount of leaf. It was also noteworthy that the soil pH was increased during a month of the crop observation. Table 6 presented the pump activity during a month of the observation. It was noticeable in the Table 6 that that the acid pump was active on every three days and the 2.7 liter of acid solution was sucked. As previously mentioned, that the control system was adjusted regarding to the detected soil pH. When the soil pH was higher than 6, therefore the acid pump would be pumping the acid solution to adjust the desired pH. It was mentioned by (Khainur, 2021) that photosynthesis activity of the crop required the CO 2 and water, and yet produced oxygen which was the cause of the increasing soil pH.

CONCLUSION
In order to observe the compatibility of internet of things (IoT) application on the soil pH control system, the IoT soil pH controlling on Aloe vera was created. Regarding to the accuracy of the soil pH reading, the system reading was close to the actual value with the linear regression were close to 1 for both pH sensors. Furthermore, the application of IoT based soil pH control system resulted in longer size of the Aloe vera leaf compared to the without pH controlling system. According to the obtained data, it can be concluded that the IoT based was compatible to the soil pH system control, Moreover, the soil pH control system stimulated the grow of the Aloe vera leaf.