0% found this document useful (0 votes)
84 views

Automatic PH and Humidity Control System For Hydroponics Using Fuzzy Logic

This document describes a system for automatically controlling pH and humidity levels for hydroponics using fuzzy logic. The system uses sensors to monitor pH and humidity and microcontrollers to process the data and control actuators like pumps and fans. Fuzzy logic rules are applied to determine appropriate responses to maintain optimal conditions for plant growth.

Uploaded by

Kadek Arisudama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Automatic PH and Humidity Control System For Hydroponics Using Fuzzy Logic

This document describes a system for automatically controlling pH and humidity levels for hydroponics using fuzzy logic. The system uses sensors to monitor pH and humidity and microcontrollers to process the data and control actuators like pumps and fans. Fuzzy logic rules are applied to determine appropriate responses to maintain optimal conditions for plant growth.

Uploaded by

Kadek Arisudama
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2019 International Conference on Computer, Control, Informatics and its Applications

Automatic pH and Humidity Control System for


Hydroponics Using Fuzzy Logic
Hanif Fakhrurroja Syahidul Akbar Mardhotillah Oka Mahendra
Technical Implementation Unit for School of Computing Technical Implementation Unit for
Instrumentation Development Telkom University Instrumentation Development
Indonesian Institute of Sciences Bandung, Indonesia Indonesian Institute of Sciences
Bandung, Indonesia [email protected] Bandung, Indonesia
[email protected] [email protected]

Aris Munandar Muhammad Ilham Rizqyawan Rian Putra Pratama


Technical Implementation Unit for Technical Implementation Unit for Technical Implementation Unit for
Instrumentation Development Instrumentation Development Instrumentation Development
Indonesian Institute of Sciences Indonesian Institute of Sciences Indonesian Institute of Sciences
Bandung, Indonesia Bandung, Indonesia Bandung, Indonesia
[email protected] [email protected] [email protected]

Abstract— Hydroponics is a system of growing plants using require a more complex control system. Therefore, fuzzy logic
water as the media without involving other planting media such is a suitable method for this problem because it deals with
as soil. Hydroponics becomes one of the options for people to fuzziness without adding complexity [4].
grow crops with minimal land. Hydroponics requires sufficient
care because the conditions needed by the plant cannot depend In this paper, we present a design of an automatic pH and
on the elements found in the soil like conventional farming in humidity control system for hydroponics using fuzzy logic.
general but directly controlled by the system. The most Ipomoea aquatica forsk or as known as water spinach is used
important conditions for hydroponics are pH and humidity. To as the crop subject. This plant is one of the most important
control the levels of these conditions, the proposed hydroponic vegetables in South-East Asia, especially in Indonesia [5].
system is built using water pumps, an exhaust fan, and sensors Fuzzy logic is used as artificial intelligence to control and
that can be monitored in real-time. In this research artificial decide pH level in the solution. The process is performed in
intelligence, the fuzzy logic has been added into the system, the microcontroller which acts as the hardware to process the
hence it works automatically to provide pH and humidity data, control the actuator and to send the data to the webserver.
needed by hydroponic plants.
II. RELATED WORKS
Keywords—hydroponic, fuzzy logic, pH, humidity, control
system Plant growth control systems are characterized by
complexity and fuzziness. Fuzzy logic can be used as a
I. INTRODUCTION method to represent, manipulate, and apply heuristic
Hydroponics has become one of the popular methods for knowledge to control the system [6]. They have high potential
those who want to grow a plant in the narrow field, such as to handle complex systems with high flexibility of control and
urban areas. By 2030, the United Nations (UN) predicts 60% learning. Fuzzy logic and feedback control based on neural
of the human population will live in an urban area [1]. If this networks can be applied to a pH control system of nutrient
happens, the reduction of agricultural land will become solution in hydroponic culture [7]. An important factor in
unavoidable since most of it will be converted to a hydroponics is controlling the pH value at the appropriate
metropolitan area. That is when the hydroponics become a level for overall planting time. The application of fuzzy logic
solution. Hydroponics is a system of growing plants using controls can be used to automatically control pH values [8].
water as the media without involving other planting media Nutritional requirements can be met automatically using fuzzy
such as soil. Like any other type of planting, nutrition is very logic and can be monitored in real-time [9]. The system is built
important in hydroponics. With the urban busy lifestyle, using microcontroller so it can be applied on a large scale[10].
automatic nutrition control becomes a challenge in developing
this type of system. III. SYSTEM DESIGN

Electric conductivity, pH, and water temperature are the A. System Model
parameters that need to be controlled in the hydroponic Fig. 1 shows the model of a hydroponic system with fuzzy
nutrient solution. By keeping the pH at the optimum level, the logic intelligence using microcontroller. The system has been
crops will be easier to absorb the nutrient from the solution built using DHT22 and pH sensors to obtain values from
[2]. However, controlling the pH value in the nutrient solution room humidity and pH values in water, respectively. The
is not easy, as the pH usually changes easily due to ion microcontroller used in this system is the Arduino Nano and
absorption by the crop roots [3]. Because of this, the control Raspberry Pi 3 model B.
becomes complex and fuzzy. Fig. 2 shows a block diagram of the system. Humidity and
There are several ways to overcome this challenge. We pH sensors work to obtain the values of air humidity and water
could use traditional control with threshold to give a command pH, respectively, to be read by the Arduino Nano.
to the actuator, but it will be difficult to obtain an exact value Furthermore, Raspberry Pi retrieves the data using serial
the system needs accurately as it could not deal with the communication with the Arduino Nano.
fuzziness. We could use a proportional–integral–derivative
controller (PID controller) to address the fuzziness, but it will

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


c
978-1-7281-5540-1/19/$31.00 2019 IEEE 156
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. System design of the pH and humidity control system using fuzzy logic

Fig. 2. Block diagram of the system

The proposed system is made as simple as possible but We collected the pH and humidity data from the sensor.
enough to maintenance the good condition for the plant. The obtained data is then uploaded to the Ubidots web server
Instead of using four solutions as in [8], we only use single and processed by Raspberry pi by using fuzzy logic with
weak acid (nitric) to decrease the pH. We do not use the predetermined rules. The data can be viewed using browser in
solution to increase the pH because healthy and feeding plants personal computer (PC) or cellular phone.
should naturally raise the pH. To maintenance humidity, only
an exhaust fan is used instead of intake and exhaust fans.

157
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.
B. Fuzzy Rule
Table 1 and Table 2 show the fuzzy rules applied to the
hydroponic system as the duration controller of the actuator
for the nutrients needed by the plant. Value of 0.2 min, 0.4
min, and 0.6 min for short, medium, and long respectively.
The defuzzification method used is the weighted average
method. This method takes the average value by using a
weighted degree of membership defined as follows:
Fig. 4. Membership function trapezoid for pH
∗ (1)

where y is crisp value and µ(y) is a membership degree of crisp


value y.

TABLE 1. FUZZY RULES FOR WEAK ACID ACTUATOR

pH Fig. 5. Membership function trapezoid for humidity


Acidic Normal Alkaline/base
Duration Short Medium Long As can be seen in Fig. 4, the membership functions of pH
are:
TABLE 2. FUZZY RULES FOR EXHAUST FAN ACTUATOR
• pH is acid when the value of pH ≤ 5.5;
• pH is normal when the value of 5 ≤ pH ≤ 7;
Humidity Dry Normal Wet • pH is base when the value of pH ≥ 6.5.
Duration Short Medium Long The membership function of humidity as shown in Fig. 5
are:

C. Membership Function • Humidity is dry when the RH (Relative Humidity)


value is ≤70;
The membership function used in this research is the
• Humidity is moist when the RH value is 60 ≤ RH ≤
trapezoid membership function. This function has several
90;
values of x having a membership degree equal to 1 [11]. Fig.
• Humidity is wet when the RH value is ≥80.
3 shows Trapezoidal membership function graph.
The values of normal pH and humidity are based on the
normal value for Water spinach as stated in [13].
In this case, the fuzzy rule used is the Sugeno model [12].
Sugeno membership function is Singleton, which is a
membership function which has membership degree 1 on a
single crisp value and 0 on all other crisp values.
Fig.6 shows membership function singleton for actuator
duration. The actuator duration will be turned on during the
Weighted Average Method defuzzification calculation with a
value of 0.2 min, 0.4 min, and 0.6 min for short, medium, and
Fig. 3. Trapezoidal membership function graph long respectively. This actuator is used to control the exhaust
fan and the weak acid pump. The on-duration of these
Mathematical notation of trapezoidal function: actuators are need to be tuned in experiment, because they
depend on the room, plant area, and nutrition dose.

0, ,
,
trapezoid , , , (2)
1,
,
Where x is:
• 0 when x ≤ a and x ≥ d Duration (Minutes)
• (x - a) / (b - a) when a <x <b Fig. 6. Membership function singleton for actuator duration
• 1 when b ≤ x ≤ c
• -(x - d) / (d - c) when c <x ≤ d The flowchart in Fig. 7 shows the complete flow of the
fuzzy processes.

158
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.
IV. RESULT AND EVALUATION
Fig. 8, 9, 10, and 11 below are the result graphs of testing
conditions on pH and room humidity. The testing was
conducted for several days on the hydroponic system with
fuzzy logic embedded in it. The growth condition of Water
Spinach is shown in Table 3. Its physical appearance can be
seen in Fig. 12 and 13.

TABLE 3. GROWTH RATE RESULT

Avg. Avg.
pH
Day Height Num of Notes
Value
(cm) Leaves
2 5.72 - - Sprouts began to break
Roots, stems, and leaves
4 5.63 1 - begin to grow, but some are
still covered in seeds
Already has all its parts and
10 6.22 6 3
release the seed shell
Grows in good condition
but leads more towards the
16 5.96 13 8
window (natural light
source)
The stem of the water
spinach is increasingly
23 5.76 20 8
winding toward the light
source
The stem of the water
spinach is increasingly
27 6.1 25 8
winding toward the light
source
The water spinach is long
and ready to be harvested
Fig. 7. Flowchart of the fuzzy logic process 30 5.94 28 8
but the growth of stems is
not straight

Fig. 8. Result testing of pH value in 3 days

Fig. 9. Result testing of pH value in 1 day

159
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.
Fig. 10. Result testing of pH value in 7 minutes

Fig. 11. Result testing of humidity value in 3 days

Based on the obtained results, a hydroponic system using


fuzzy logic is excellent in controlling water pH. As can be
seen in Fig. 8, 9, and 10 the pH condition is quite stable in the
range of 5.5–6.5. The responsive fuzzy control is visible in fig.
8 and 9. When the pH is at a point outside of the optimal state,
the algorithm directly performs its duty as a decision-maker
for the actuator to return the condition back to its optimum
state. The obtained data sent to Ubidots webserver as shown
in Fig. 14.

Fig. 12. Growth of Water Spinach in 10 days Fig. 13. Growth of Water Spinach in 23 days

160
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.
Fig. 14. Ubidots web server as visualization of pH and humidity data

The nutritional needs are well-met, as marked by the good environment", In 2013 International Conference on Robotics,
growth of the water spinach shown in Table 3. Despite the Biomimetics, Intelligent Computational Systems, 2013, pp. 135-142.
good growth of the plants, there is a thing needs to be noted. [5] A. D. Susila, T. Prasetyo, and M. C. Palada, “Optimum Fertilizer Rate
for Kangkung (Ipomoea aquatica L.) Production in Ultisols of
The growth of the stem turns in the direction of sunlight, even Nanggung, Bogor.”
though there are ultraviolet (UV) lamps placed on top of the [6] D. Gómez-melendez, A. López-lambraño, G. H.- Ruiz, E. Rico-garcia,
plant. The experiment conducted in the indoor space, with the C. Olvera-olvera, and D. Alaniz-lumbrerasc, “Fuzzy irrigation
UV lamps as the main light source. But apparently, the light greenhouse control system based on a field programmable gate array,”
from the UV lamps is not sufficient for the plants as its search African J. Agric. Res., vol. 6, no. 11, pp. 2544–2557, 2011.
for the natural lights seeps from the windows as shown in Fig. [7] T. Morimoto and Y. Hashimoto, “Application of fuzzy logic and neural
12 and 13. network to the process control of solution pH in deep hydroponic
culture,” IFAC Proc. Vol., vol. 24, no. 11, pp. 147–152, 1991.
V. CONCLUSION [8] M. Fuangthong and P. Pramokchon, “Automatic control of electrical
conductivity and PH using fuzzy logic for hydroponics system,” in
Although nutrients for plants are always sufficient, pH and 2018 International Conference on Digital Arts, Media and Technology
humidity affect the rate of crops that cause the plant conditions (ICDAMT), 2018, pp. 65–70.
are not growing properly. The proposed hydroponic system [9] A. Munandar, H. Fakhrurroja, M. I. Rizqyawan, and R. P. Pratama,
controls using fuzzy logic is excellent to ensure the water pH “Design of Real-time Weather Monitoring System Based on Mobile
condition and room humidity remains in the optimum state. Application using Automatic Weather Station,” in 2017 2nd
International Conference on Automation, Cognitive Science, Optics,
Hydroponic research should be conducted outside the room or Micro Electro-Mechanical System, and Information Technology
inside the greenhouse so that other determinants of growth rate (ICACOMIT), 2017, pp. 44–47.
are also fulfilled. [10] M. Diansari, “Pengaturan Suhu, Kelembaban, Waktu Pemberian
Nutrisi dan Waktu Pembuangan Air Untuk Pola Cocok Tanam
REFERENCES Hidroponik Berbasis Mikrokontroler AVR Atmega 8535,” Proy. akhir,
[1] United Nations, The World ’s Cities in 2016. 2016. S1 Tek. Elektro, Fak. Tek. Univ. Indones. (UI). Depok, 2008.
[2] A. Abdullah, S. Al Enazi, and I. Damaj, "AgriSys: A smart and [11] Suyanto, Artificial Intelligence. Jombang: Informatika, 2014.
ubiquitous controlled-environment agriculture system," In 2016 3rd [12] M. Sugeno and T. Yasukawa, “A Fuzzy-Logic-Based Approach to
MEC International Conference on Big Data and Smart City (ICBDSC), Qualitative Modeling,” IEEE Trans. FUZZY Syst., vol. I, no. I, pp. 7–
2016, pp. 1-6. 31, 1993.
[3] Herry Suhardiyanto, K. B.Seminar, Y. Chadirin, and B. I.Setiawan, [13] Solihat, S. N. "Effect of nutritional control on water spinach growth by
“Development Of A pH Control System For Nutrient Solution In EBB the hydroponic Nutrient Film Technique (NFT) method". Telkom
And Flow Hydroponic Culture Based On Fuzzy Logic,” IFAC Proc. University. 2018.
Vol., vol. 34, no. 11, pp. 87–90, 2001.
[4] M. A. Abu and M. Y. Yacob, "Development and simulation of an
agriculture control system using fuzzy logic method and visual basic

161
Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 28,2021 at 05:16:06 UTC from IEEE Xplore. Restrictions apply.

You might also like