Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

SYSTEM DESIGN AND IMPLEMENTATION


AUTOMATION SYSTEM OF EXPERT SYSTEM
ON HYDROPONICS NUTRIENTS CONTROL
USING FORWARD CHAINING METHOD
Yakub Eka Nugraha Budhi Irawan Randy Erfa Saputra
School of Electrical Engineering School of Electrical Engineering School of Electrical Engineering
Telkom University Telkom University Telkom University
Bandung, Jawa Barat, Indonesia Bandung, Jawa Barat, Indonesia Bandung, Jawa Barat, Indonesia
Email: yakubnugraha7@gmail.com Email: budhiirawan@telkomuniversity.ac.id Email: resaputra@telkomuniversity.ac.id

Abstract—In this paper, presented the design of an determine condition of solutions to problem in hydroponics
embedded system that used to controlling nutrients content system. In addition, this intelligence system can also be used to
for hydroponics. The embedded system implanted artificial fabricate the habitat culture according to the characteristics and
intelligence using Forward Chaining method to take the needs of the hydroponics plant. Implementing several types of
conclusion of nutrient condition. Embedded system also sensors that attached to the hydroponics system installation,
help users in measuring parameters needed by plant, they are potential of hydrogen (pH) sensor, electrical
calculate nutrient needs and the right conditions of conductivity (EC) sensor, temperature sensor, its will measure
nutrients, and determine the conclusion using forward and get the required data, then will be processed by the system
chaining method. The embedded system developed by and will get the appropriate output. The data obtained will the
potential of hydrogen sensor, electrical conductivity sensor, be stored to the Cloud. Do that hydroponics owners can access
temperature sensor and cooling fan, water pump. through internet. Utilizing internet of things technology.
Intelligent system are expected to assist hydroponics owners in
Keywords— hydroponics, embedded system, automation monitoring the state and automatic maintenance of the crop
system, expert system, forward chaining. being cultivated wherever and whenever.

I. INTRODUCTION II. DESIGN SYSTEM


In this modern era is very rarely found supportable planting The system have three kind of actuator for output system
area in big city, especially for urban communities living in they are water pump for each adjustment solutions, Cooling fan
dense settlements and minimalist house. Even until its for cooling down solution temperature.
impossible to provide some area for yard. Its becomes a
IoT
IoT Platform
problem for people to able to gardening in the yard. In other Platform

words, the increasing population causes the availability of Pump


Pump 11

agricultural area to be reduced, because it is used for housing


and urban expansion[1]. Pump
Pump 22

Hydroponics is an alternative for people who want to EC


EC Sensor
Sensor
gardening, but don’t have enough place to do. Hydroponics is a Knowledge
Knowledge
Base
Base
Pump
Pump 33

method of cultivating plant by utilizing water medium, without pH


pH Sensor
Sensor
soil medium[1]. By optimizing the nutrients needs for the plant Pump
Pump 44
Microcontroller
Microcontroller
using water nutrients solution. Hydroponics can be used to
Temperature
Temperature Sensor Pump
Pump 55
grow vegetables and fruits. However, farming in this Sensor

hydroponic way needs more handling, maintenance and


Pump
Pump 66
monitoring than conventional farming with soil media. So the Ultrasonic
Ultrasonic Sensor
Sensor
owner needs to pay more attention to the plant. As we know that
Pump
Pump 77
urban communities are mostly workers who can not at all time
monitor their hydroponics conditions.
Cooling
Cooling Fan
Fan
From these problems, we need an intelligent system tool that
can be used as a maintenance tool works automatically to fig 1 Blok Diagram System

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 41


The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

Figure 1 shows this system implanted an expert system Condition


using forward chaining method to determine the solution of the Nutrient Condition Solution
ID
nutrient condition. Microcontroller using Arduino Mega 2560 Excess ppm levels and
in which will implemented the forward chaining method. In Added water and fan
K005 temperature is not
sensor system has four kind of sensor, they are pH sensor, EC turned on
right
sensor, temperature sensor, ultrasonic sensor. Then the actuator Lack of ppm level and
has 7 water pump (to drain pH up solution, pH down solution, Added ABMix and
K006 temperature in not
water, nutrient A solution, nutrient B solution, to sprinkling and fan turned on
right
to drain water tank. And Cooling Fan (to reduce water Added pH Down
temperature). Integrated with cloud web service and mobile K007 pH levels is too high
solution
application. The system will implemented connect to the Added pH Up
internet using ESP8266 module. K008 pH levels is too low
solution
pH levels is too high Added pH Down
K009 and temperature is not solution and fan
Start
Start
right turned on
Water
Water level
level
pH levels is too low Added pH Up
on
on tank
K010 and temperature is not solution and fan
tank

The
The tank
tank No Calculate
Calculate the
water
water
the Pump
Pump 11 right turned on
filled?
filled? turned
turned on
on
requirement
requirement
pH levels is too high Added pH Down
Yes
K011
and excess ppm levels solution and water
Temperature
Temperature pH
pH Level
Level pH levels is too high Added pH Down
of
of nutrients
nutrients
K012
No pH
pH level
level over
over No
and lack of ppm levels solution and ABMix
Temperature pH
pH level
level is Pump
Pump 22
pH levels is too low Added pH Up
No Temperature is the
the upper
upper
is
is too
too high
high appropriate?
appropriate? turned
turned on
on
limit?
limit?
K013
Yes
Yes Yes
and excess ppm levels solution and water
Pump
Pump 33
pH levels is too low Added pH Up
Pump
Pump 44 ppm
ppm turned
turned on
on
K014
and lack of ppm levels solution and ABMix
turned
turned on
on Value
Value
Fan
Fan turned
turned on
on

No Ppm
Ppm value
value Calculate
Calculate
No
Ppm
Ppm Value
Value is
is pH levels is too high,
Added pH Down
over
over the
the nutririons
nutririons needs
needs appropriate?
appropriate?
upper
upper limit
limit
excess ppm levels and
Yes Yes
K015 solution, water and
Pump
Pump 55
turned
turned on temperature is not
fan turned on
on

right
Finish pH levels is too high,
Finish
Added pH Down
fig 2 Flow chart of system lack of ppm levels and
K016 solution, ABMix and
temperature is not
fan turned on
right
Figure 2 shows the flow charts diagram that occurs in pH levels is too low,
Added pH Up
embedded systems. Data input taken from ultrasonic sensor, pH excess ppm levels and
K017 solution, water and
sensor, EC sensor, and temperature sensor. After get the temperature is not
fan turned on
conclusion from forward chaining then the microcontroller will right
command the actuator cooling fan and water pump to execute pH levels is too low,
Added pH Up
to neutralize the nutrient. lack of ppm levels and
K018 solution, ABMix and
temperature is not
fan turned on
A. Knowledge Base Design right

Table 1 List of Nutrient Condition Table 1 shows the list of nutrient condition based on
measurment result on system, nutrients condition as
Condition conclusions that accur in the state of nutrient solution.
Nutrient Condition Solution
ID
The system works B. Symptoms List
K001 Nutrient normal
normally
Nutrient temperature Cooling Fan turned Table 2 List of Measurement Indication
K002
is not right on
K003 Excess ppm levels Added water Symptom ID Measurement Symptoms
Added ABMix G001 Ppm level within limits
K004 Lack of ppm levels
solution G002 Ppm level above the limits
G003 Ppm level below the lmits

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 42


The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

G004 pH level within limits D. Forward Chaining Decision making tree

G005 pH level above the limits Yes


1
No

G006 pH level below the lmits Yes


4
No Yes
2
No

7 5 4 3

G007 temperature within limits Yes


Tdk Yes No Yes No
Yes

8 7 6 7 5 4
K1

G008 temperature above the limits


No No Yes No Yes No
Yes Yes Yes
Yes
8 7 8 7 6 7 5
K2 K7 K3
No No No Yes No
Yes Yes Yes Yes Yes
Yes
8 8 7 8 7 6
K9 K8 K5 K11 K4

Table 2 shows the list of mesurement indication on nutrient. Yes Yes Yes
No

8
Yes Yes
No

8
Yes

The indication as result measurements from the sensor. K10 K15 K13

Yes
K6 K12

Yes Yes
No

8
K17 K16 K14

Yes

C. List of Decisions K18

fig 3 Decision-making Tree


Table 3 List of decisions based on symptoms
Based on the knowledge base that has been collected it can
be made a decision tree with forward chaining method. Shows
Nutrient Conditions (K001=1, K002=2 . . ., K0018=18)
in Figure 3, show that the search is performed for each
condition. The decision tree will be used to assist in the process
I 1 1 1 1 1 1 1 1 1 of creating the rule base which will eventually be used to
1 2 3 4 5 6 7 8 9
D 0 1 2 3 4 5 6 7 8
determine the conclusions and solutions to the existing
G condition. The number in the tree representing state of Nutrient
0
0
√ √ √ √ √ √ condition, if the conditions is correct then the searching will
1 continue by following the ‘yes’ to the next state, instead if the
G state is not correct the search will continue by following the ‘no’
0 to the next state. Searching will end when the searching process
√ √ √ √ √ √
0
2
is up to the root of the tree, the last state. So, it will be conclude
G in last state with ‘K’ ID means Conditions ID.
0
√ √ √ √ √ √
0 III. EXPERIMENT RESULT
3
G
0 Implementation of a system that has been designed
√ √ √ √ √ √ previously need to know the process and the result. Therefore,
0
4 in the experiment section will explain how the system process
G and the result of each sensor, actuator and forward chaining that
0
0
√ √ √ √ √ √ has been designed previously.
5
G
0
0
√ √ √ √ √ √ Sensor DFR0300 calibration
6 660
G
0
√ √ √ √ √ √ √ √ √ 655
0
ppm

7
G 650
0
√ √ √ √ √ √ √ √ √
0 645
8
0 3 6 9 12 15 18 21 24 27
Inf √ : relations Time (minutes)

Table 3 show the table decision nutrient conditions based on Sensor EC TDS Meter
relationship symptoms of measurement result and conclusions
nutrient conditions of the built system fig 4 DFR0300 Calibration

The EC sensor calibration is performed by comparing


between measurement result of DFR0300 sensor with
measurement result of TDS Meter. In the Figure 4, obtained
result of comparison two result have the different result. The

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 43


The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

biggest difference value of 6 ppm. While the smallest difference Figure 5 shows the calibration result of comparison
value is 0 ppm. Can be calculated the average difference measurement between DS18B20 sensor and thermometer
measurement DFR0300 sensor with TDS meter is 2.1 ppm. The obtained difference between two result. The maximum
difference is still within the tolerance limit of the sensor that is difference is 0.37oC and the minimum difference is 0.2C. within
<10% of the measurement result. So it can be conclude that the an average difference is 0.258oC. in the tolerance of 0.5oC
DFR0300 sensor can be used properly and correctly to measure accuracy. So, it can be conclude that the DS18B20 sensor can
nutrient levels. be used properly to measuring water temperature

Table 4 pH sensor calibration Table 5 Distance test result ultrasonic sensor

pH pH Sensor pH Meter Difference Ruler Ultrasonic Sensor Difference


No No
Level measurement measurement measurement (cm) (cm) Measurement
1 9.18 9.06 8.9 0.16 1 2 2.19 0.19
2 9.18 9.05 8.9 0.15
2 7 7.04 0.04
3 9.18 9.07 9.0 0.07
3 12 11.99 0.01
4 6.86 7.13 7.1 0.03
5 6.86 7.12 7.1 0.02 4 17 17.16 0.16
6 6.86 7.14 7.1 0.03 5 22 22.02 0.02
7 4.01 4.44 4.5 0.06 6 27 26.79 0.21
8 4.01 4.42 4.5 0.08 7 32 31.98 0.02
9 4.01 4.41 4.5 0.09
8 37 37.01 0.01
Average pH level difference between pH
0.0766
sensor and pH meter 9 42 42.10 0.10
10 47 46.82 0.18
The pH sensor calibration was performed using three types Average distance difference between
0.094
of pH buffer solution, they are pH buffer 4.00, pH buffer 6.86 ultrasonic sensor and ruler
and pH buffer 9.18. in the Table 4 show that calibration by
comparison between pH SEN0169 sensor with pH meter PH-
Based on sensor calibration result as shown in Table 5
009(I). using three types of pH buffer solution aims to
above, obtained a comparation between ultrasonic and ruler.
determine the ability of sensor to measure acid level at 4.00 pH
The difference maximum is 0.21 cm and the minimum
level, alkaline at 9.18 pH level and neutral level at 6.86 pH
difference is 0.01 cm, with an average difference is 0.094 cm in
level. The experiment obtained the average of measurement
tolerance of 0.1 accuracy. So, it can be conclude that ultrasonic
difference. And with average value is 0.0766. the difference is
sensor are good for measuring distance.
still within normal limits, because pH SEN0169 sensor has a
measurement accuracy of 0.1 pH value. So, it can be concluded
that pH SEN0169 sensor can be used properly and correctly to
measure pH level.
Discharge water pump
DS18B20 Calibration 80
Volume (ml)

60
32
Temperature (oC)

40
30
20
28
0
26 0.5 1 1.5 2 2.5
24 Time (s)
0 3 6 9 12 15 18 21 24 27
Time (minutes) Discharge

Temperature Sensor Termometer fig 6 Discharge Water Pump


fig 5 Temperature Sensor Calibration

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 44


The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

Figure 6 show the graph of DC pump test that is done with N


Observ
Sensor Forward
difference duration of the pump, with the different of duration ation Actuator Action Chaining Inf
o Measurement conclusion
Time
is 0.5 seconds. The test is performed 5 times starting from the  Pump 1 = Off
duration of 0.5 second to 2.5 second. The first test duration of  pH = 6.2  Pump 2 = Off (Rule 2)
0.5 seconds has a debit of 26 ml/s, the second test duration of 1 13 July  ppm =  Pump 3 = Off Nutririon
4 equal
second has a debit of 22ml/s, the third test duration of 1.5 2017 690  Pump 4 = Off temperature
seconds has a debit of 23.33 ml/s, the fourth test duration of 2  temp = 27  Pump 5 = Off is not right
 Fan = On
seconds has a debit of 22.5 ml/s and the fifth test duration 2.5
 Pump 1 = Off
Sec has a debit of 23.2 ml/s. The average discharge from this  pH = 6.5  Pump 2 = Off (Rule 2)
test is 23.4 ml/s or 84.26 L/H. So the DC pump can flow water 15 July  ppm =  Pump 3 = Off Nutririon
5 equal
with a discharge of 23.4 ml/s. 2017 714  Pump 4 = Off temperature
 temp = 28  Pump 5 = Off is not right
 Fan = On
 Pump 1 = Off
 Pump 2 = Off (Rule 2)
 pH = 6.4
Cooling Fan 6
17 July
 ppm = 700
 Pump 3 = Off Nutririon
equal
2017  Pump 4 = Off temperature
 temp = 28 is not right
40  Pump 5 = Off
Temperature (OC)

 Fan = On
30  Pump 1 = Off
20  Pump 2 = Off (Rule 2)
 pH = 6.0
19 July  Pump 3 = Off Nutririon
7  ppm = 695 equal
10 2017  Pump 4 = Off temperature
 temp = 26 is not right
 Pump 5 = Off
0  Fan = On
1 3 5 7 9 11 13 15 17 19 21 23 25  Pump 1 = Off
Time (minutes)  Pump 2 = Off (Rule 2)
 pH = 6.1
21 July  Pump 3 = Off Nutririon
8  ppm = 685 equal
2017  Pump 4 = Off temperature
 temp = 27 is not right
Cooling Fan  Pump 5 = Off
 Fan = On
 Pump 1 = Off
fig 7 Cooling Fan  pH = 5.9
 Pump 2 = Off
(Rule 1)
23 July  Pump 3 = Off
9  ppm = 680 Normal equal
in Figure 7 shows that there is temperature reduction to the 2017  Pump 4 = Off Nutrition
 temp = 25
 Pump 5 = Off
optimum temperature need by the plant suggested by the expert.
 Fan = Off
To get the optimum temperature the cooling fan takes 23  Pump 1 = Off
minutes to lower the temperature from 32 oC to 25oC. So,  Pump 2 = Off
 pH = 6.0 (Rule 1)
cooling fan can be used to reduce the temperature of nutrient 1 25 July  Pump 3 = Off
 ppm = 662 Normal equal
0 2017  Pump 4 = Off
solution.  temp = 25
 Pump 5 = Off
Nutrition
 Fan = Off
Table 6 Forward Chaining

Observ Forward
N
ation
Sensor
Actuator Action Chaining Inf Forward chaining experiment to test the system is working
o Measurement
Time conclusion in accordance with the rules of Forward Chaining method. The
 Pump 1 = Off test is performed by monitoring the measurement of sensor and
 Pump 2 = Off
 pH = 6.1 (Rule 1) the action of the actuators compared to the expert system
7 July  Pump 3 = Off
1  ppm = 629 Normal equal concept that have been prepared with the truth status approved
2017  Pump 4 = Off Nutrition
 temp = 25
 Pump 5 = Off by an expert.
 Fan = Off
 Pump 1 = Off The result of forward chaining test on the hydroponics
 Pump 2 = Off (Rule 2) nutrition control automation system is show in Tabel 6. Sensor
 pH = 6.1
9 July  Pump 3 = Off Nutririon
2  ppm = 569 equal measurement is taking data of pH, ppm, and temperature. After
2017  Pump 4 = Off temperature
 temp = 26 is not right going through a process with forward chaining method will
 Pump 5 = Off
 Fan = On produce output that will activate the actuator according to the
 Pump 1 = Off (Rule 6) conclusion.
 Pump 2 = On Lack of
 pH = 6.2
11 July  Pump 3 = On ppm level
3  ppm = 539 equal Pump 1 is used to drain the water, pump 2 as a pH Up
2017  Pump 4 = Off and
 temp = 27 temperature solution flow drainer, pump 3 as a pH Down flow drainer, pump
 Pump 5 = Off
 Fan = On is not right 4 to drain the A solution, pump 5 to drain B solution, then pump

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 45


The 2017 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

6 as the nutrient drain from nutrient tank to the hydroponics


system, 7 as a discharge pump, and a cooling fan is used as a
cooling nutrient solution.

The action output of the system through the actuator is equal


to the conclusion of the knowledge base forward chaining
designed for the nutritional control system. From the 10 times
of sampling result, the result is 100% match. So it can be
concluded the automation system work well.

IV. CONCLUSION
Based on the result of the experiments, it can be concluded
that the nutrient control automation system in hydroponics
using forward chaining method can run well as desired and the
forward chaining as the decision making. And also can perform
data retrieval functions, send data to the cloud, and run actuators
for nutrient control.

REFERENCES

[1]. Suryani, Reno. 2015. Hidroponik Budidaya Tanaman


Tanpa Tanah.Yogyakarta : Arcitra

[2]. Kusrini. 2006. Sistem Pakar Teori Dan Aplikasi.


Yogyakarta : Penerbit Andi

[3]. Kadir, Abdul. 2012. Panduan Praktis Mempelajari


Aplikasi Mikrokontroler dan Pemrogramannya
menggunakan Arduino. Yogyakarta. Penerbit Andi.

[4]. Nugroho, Bunafit. 2014. Aplikasi Sistem Pakar dengan


PHP & Editor Dreamweaver. Yogyakarta : Gava Media

[5]. Andrianto, Heri, Aan Darmawan. 2015. Arduino Belajar


Cepat dan Pemrograman. Bandung : Penerbit
Informatika.

[6]. Sahin, Ismail, M. Hanefi CALP, Atacan Ozkan. 2014.


An Expert System Design and Application for
Hydroponics Greenhouse System. Ankara, Turkey. Gazi
University Journal of Science. 27(2):809-822(2914).

[7]. Romadloni, Pristi L (2015).”Rancang Bangun Sistem


Otomasi Hidroponik NFT Universitas Telkom”. Journal
of Applied Science. Vol 1. No.1

978-1-5386-2373-2/17/$31.00 ©2017 IEEE 46

You might also like