Design and Implementation of Intelligent Aquaponics Monitoring System Based On IoT
Design and Implementation of Intelligent Aquaponics Monitoring System Based On IoT
Abstract Aquaponics is a merging of agriculture and content to be re-flowed to fish ponds, and farmers can obtain
aquaculture culture systems that may provide a solution to double benefits both from aquaculture and vegetable cultivation
overcome land and water limitations and food security. that is cultivated on aquaponic media, and is a solution for land
Water quality in fishponds is a determining factor in limitations and avoid threats food security. Several studies
aquaculture and is still much needed to be studied related to aquaponic monitoring and control systems have
extensively. However, evaluating the quality of ponds additionally been carried out such as Hartono, et al.
proves to be a challenging task, mainly due to a lack of data Aquaculture and hydroponic integration using electronic
and the constant maintenance involved in handling and control and monitoring [2]. Ambrosio, et al. Implementation of
controlling water quality. This study aims to develop water a closed-loop control system for the automation of an aquaponic
quality management systems for catfish ponds by utilizing system for urban settings [3]. Butt, et al. Implementation of
aquaponics technology and IoT technology, combined with aquaponics within IoT framework [4]. Abhay, et al. IoT based
water quality control systems with artificial intelligence aquaponics monitoring system [5]. Some several existing
fuzzy logic to control temperature and ammonia levels, studies, comparisons of this research can be seen with existing
which are important variables in maintaining water quality. research in Table 1.
This study additionally makes it easy for farmers to monitor TABLE I. RELATED RESEARCH
pH parameters, Turbidity, Total Dissolved Solid (TDS), Input
Sistem
Artificial
Author Variable Actuator Sensors Intelligence
Dissolved Oxygen and Water Level, and receive Control
Automatic
System
information related to the pond anytime and anywhere. If
pH, Air pH,
the pond water quality is not at an optimal state, farmers Hartono, Temperature,
Salt
Yes DS18B20, -
Actuator
can directly intervene and carry out the needed measures as et al. and Light and LDR
(2019) [2]
soon as possible. Experiments on monitoring, warning, and Water
control systems were successfully employed. pH, Water Pumps, DHT11,
Ambrosio, Level, Feeder, DS18B20,
Keywords Internet of Things, Aquaponics, Fuzzy Logic et al. Water, and Led Grow Yes E-201-C -
Control (2019) [3] Air Light, pH,
Temperature Mist Ultrasonic
I. INTRODUCTION Maker
pH, water pH (SKU-
Heater,
Indonesia's population continues to grow from 261.1 level, water,
water
Sen0161),
Butt, et al. and air DS18B20,
million in 2016 to 263.9 million in 2017. In 2018, Indonesia's (2019) [4] temperature,
pump, O2 Yes
DHT 22,
-
Supplier,
population will reach 266.7 million. The world population Air
LED Bed
Water
currently reaches 7.7 billion people [1]. This figure is an Humidity Level
pH, Air
indication of the increasing amount of food that must be Abhay, et Temperature,
pH (E-
201-C),
provided. If the population is not matched by an increase in food al. (2018) Air Light Yes
DHT11,
-
[5] Humidity,
production, then food requires and availability cannot be and Light
HCSR04
avoided. The issue of increasing population and global climate MQ-135,
TDS, pH
change are some of the factors that become challenges in efforts Water (E-201-
to meet the food requirements of the community. In general, the Temperature
Pump for C),
AQ-T dan Yes Fuzzy
problem in aquaculture and agricultural cultivation is the Ammonia
Water Turbidity,
Circulation DS18B20,
requirement for vast land and abundant water sources, therefore HC-SR04,
the availability of water sources must additionally be a concern, DO2
while in catfish ponds, water from metabolic waste from feed
must be disposed of so that it does not stay too long in ponds The purpose of this paper is to create a new system, starting
because it will be toxic or ammonia which is not good for with sending monitoring and control parameters. We offer
catfish, and almost every day pond farmers must dispose of control with the approach of important parameters in the
water to replace with water that has a good quality so that's why aquaponic system, namely temperature and ammonia by using
catfish cultivation requires a lot of water, but this can be the fuzzy logic method as a decision-making controller for the
overcome because water is leftover from metabolism The fish speed of an AC motor water pump whose duty cycle is
is beneficial for the growth of hydroponic vegetables, and water regulated by an AC dimmer and zero-crossing the circuit,
that flows through the hydroponic plants additionally have good meaning that if the ammonia parameters and the internal
535
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.
1.2) Fuzzyfication
Fuzzification is the process of processing input data from
Temperature and Ammonia sensors.
3). Raspberry Pi
Raspberry pi is a mini-computer that can do computing. In
this study, Raspberry Pi is used as a web server that runs cloud
services in it, which is additionally a place to store monitoring
data into a database. Sensor data will be sent with the MQTT
protocol into the Raspberry Pi and then stored in the MongoDB
database and then the data is forwarded to the TelegramBot
service which can later be used to monitor normal and abnormal
conditions and provide early warning if there is abnormal with Figure 6. Motor Speed Variable Membership Function
direct messages as shown in Figure 2. fuzzy variable motor speed consists of 3 (three) fuzzy sets,
namely slow (slow), normal (normal), and fast (quick) as
B. Water Quality Management illustrated in Figure 6.
1). Knowledge Acquisition With the membership function as follows;
The acquisition of this knowledge is the process of collecting After all the error values have been calculated and we get the
data in the form of knowledge obtained from experts and the input membership value for each input variable, the decision to
standards set by the Indonesian national standards [12], body move the aerator with a certain speed can be processed based
related to water quality standards which are then used as a on the rules shown in Table 2.
reference point for making fuzzy logic membership. From the TABLE II. BASIC RULES FOR FUZZY CONTROL
interview process and the study of literature, the fuzzy logic
membership function is made then the fuzzification process, Temperature
Rule
implications, composition, and defuzzification are made so that Cold Good Warm Hot
the output of the process pump duty cycle is shown in Figure 4. Safe Slow Slow Normal Quick
Then the value of the final result of the decision can be obtained
by defuzzification of the rules that have been made.
C. Data Recording
All data sent by the microcontroller into the Raspberry Pi
Figure 4. Fuzzy control diagram block for water circulation will be stored in the data storage, that is, into the MongoDB
database and the data can additionally be made into a file with
536
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.
various formats, namely CSV, excel, pdf and can additionally (1)
store the model of the monitoring results in the form of image
files. This data can be used as learning to observe the processes From the datasheet we can find out the equation for
that occur in aquaponic systems with various changes in the calculating and getting the value of Rs, with equation (2):
variables at any time, so it becomes a good evaluation for a Sensor Resistance (Rs):
proper analysis of the aquaponic system. (2)
D. Frontend The relationship between Rs/Ro and PPM is logarithmic,
Frontend includes visualization techniques and interactions which can be represented by equation (3):
with users. In this study, the frontend is divided into two parts, (3)
the web application-based user interface and the telegram To determine the values of m and b, two points (x1, y1) and (x2,
application in Figure 7 demonstrate the dashboard display to y2) can be determined on the NH3 function graph. So that both
monitor the condition of the pond in realtime for each
points are determined at (16.2) and (100.1).
parameter, later monitoring in Figure 8 demonstrates live chat
in TelegramBot. n
(4)
Then to get the value of b the point taken is the midpoint
(40,1.55)
(5)
Next to get PPM using the equation (6):
(6)
Figure 7. Dashboard page for farm users
On the sensor reading to get the PPM all the results of
calculations on the initial calibration are entered into the
program and initialized.
Table 3 demonstrates an experiment reading the
characteristics of the ammonia sensor, which is carried out by
conditioning the sensor with a closed design so that the
ammonia gas from the water can focus flowing towards the
sensor, adding ammonia liquid to samples 2, 3, and 4, then to
sample 1 in the table shown in table 3 are conditions before the
addition of ammonia fluid. Whereas in sample 5 is the condition
when all liquids have been dissolved within a certain time.
From figure 9. We can observe that for each liquid addition, the
sensor can read the additions, and then the sensor is additionally
able to read the ammonia addition when the ammonia liquid is
mixed in the liquid in the container which is seen in the trial
samples 1 and 5.
TABLE III. ADDITION OF LIQUID AMMONIA IN CONTAINERS FOR
TESTING MQ-135 CHARACTERISTICS
Figure 8. Display of live chat on TelegramBot Testing Volume (ml) PPM
1 0 0,02
III. EXPERIMENTAL STUDY 2 50 0,11
3 100 0,21
A. Ammonia Sensor Calibration Experiment 4 250 0,72
Ammonia value obtained from the MQ-135 sensor is the 5 0 0,13
result of the value of the voltage divider from the circuit to the
source voltage of 5 Volts DC, the value used as a unit on the
MQ-135 that is Part per Million (PPM) uses a calibration process
from the value of the voltage issued by the sensor and this
calibration process information data is in the datasheet [13]
provided by this MQ-135 sensor developer. There is a Load
Resistance (RL) component on the MQ-135 sensor between
ground and VRL. Whereas the module that is measured directly
is to find the measurement value from the RL.
On the graph in the datasheet, there is a comparison between
ppm and Rs/Ro. It can be seen on the graph that the ratio of fresh Figure 9. Graph of Ammonia Sensor Characteristics
air resistance is constant. Means based on the graph it can be After testing the characteristics of the ammonia sensor then
estimated that the value of Rs/Ro is: testing the accuracy of the ammonia liquid read by the sensor
537
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.
with the ammonia test, the results can be seen by calculating it the pH with the pH buffer if the turbidity with the disk Secchi
by the equation (7): is tested on the brightness sample in different ponds.
Table 5 demonstrates the comparison of the ADC sensor with
the measurement value with the Secchi disk and Figure 11
% =0,8% (7) demonstrates a calibration graph between the Secchi disk value
There is a difference in value between the ammonia test kit used with the ADC sensor turbidity.
as shown in Figure 15 and the MQ-135 sensor, with an error
TABLE V. TURBIDITY AND SECCHI DISK SENSOR TEST RESULTS
rate of 0.8%.
B. Experiments and Calibration of pH Sensors Secchi Disk (cm) ADC Sensor
Tests on the pH sensor are carried out with a pH buffer using 72,5 917
a linear regression system with a comparison of the buffer pH 50,75 829,53968
and the voltage value of the sensor reading. 41 747,52381
The mathematical equation in linear regression is: 35,5 740,56522
(8) 30 697,04762
From the tests carried out obtained an equation (8) that
represents the value of the comparison of the pH buffer and
ADC sensor:
(9)
Table 4 demonstrates the comparison of the sensor voltage
with the pH buffer value and Figure 10 demonstrates the
calibration graph between the pH buffer value and the pH
sensor voltage.
TABLE IV. PH SENSOR TESTING
Volt pH
3,3808 4
2,6972 7
2,5242 9
Figure 11. Calibration Graph Between the Secchi Disk and the
ADC Turbidity sensor
538
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.
For experiments on ammonia variables by gradually adding
liquid ammonia to a container filled with water, then turn on the
water pump from the technological aquaponics system as
shown in Figure 13. A gradual decrease in ammonia value
occurs in the container.
The difference in water discharge does not have significant Figure 13. Test graph for ammonia value
value at each working voltage because the test is carried out
with an aquarium water pump which indeed has a low working Figure 14 is shown, which is the result of testing on the pond,
voltage. obtained good results with the average speed of time on the
growth of kale plants produced by aquaponics growing well
I. Testing Notification Features with an average addition of 22 mm leaf width and the number
For the notification feature, there is a delay of about 3 of branches of 8 strands and height of kale stems 34 cm, within
seconds, this is caused by the process carried out on the 15 days, the growth of catfish in the aquaponics system can be
telegram server itself which is a third party and has other active harvested at the same time as the conventional method with the
users who use this service. same relative weight, meaning that ammonia levels can be
reduced properly in the aquaponics system by setting the duty
J. Testing Fuzzy Logic on Microcontrollers cycle for the 1 phase induction motor.
In this experiment, the experiment is carried out by
comparing the duty cycle output values with the toolbox in the
Scilab application. So that we can calculate the difference
between the equations (12):
(12)
539
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.
successfully measures the value of water quality parameters Commun. Control. Environ. Manag. HNICEM 2019, 2019.
accurately, then passes it on to the Web server and displays it [4] M. F. U. Butt, R. Yaqub, M. Hammad, M. Ahsen, M. Ansir, and N.
on the frontend. Overall, the fuzzy control test can run well if Zamir, Implementation of Aquaponics Within IoT Framework, Conf.
the fuzzy output value on the microcontroller is compared with Proc. - IEEE SOUTHEASTCON, vol. 2019-April, pp. 16, 2019.
the Scilab toolbox, where the accuracy level is 99.99%. The
[5] W. Vernandhes, N. S. Salahuddin, A. Kowanda, and S. P. Sari, Smart
speed of data transmission from device to web server has almost
aquaponic with monitoring and control system based on IoT, Proc. 2nd
no delay, however, in TelegramBot a delay of 3 seconds was
recorded. When testing the fuzzy control on temperature Int. Conf. Informatics Comput. ICIC 2017, vol. 2018-Janua, no.
variables, the system with fuzzy control can reduce the November, pp. 16, 2018.
temperature under normal conditions in less than 2 hours, and [6] A. Jiwa Kuswinta, I. Putu Wirama Wedashwara W, and Iw. Agus
the ammonia variable in less than 1 hour. Farmers can use this Arimbawa, Implementasi IoT Cerdas Berbasis Inference Fuzzy
system as a first step in evaluating their ponds and maintaining Tsukamoto pada Pemantauan Kadar pH dan Ketinggian Air dalam
ideal conditions. Akuaponik, J. Comput. Sci. Informatics Eng., vol. 3, no. 1, pp. 6574,
2019.
ACKNOWLEDGMENT
[7] A. Riolly Cahyantara and H. Cordova, Oksigen Terlarut Dengan
The author would like to thank the Muhammadiyah Algoritma Fuzzy Logic Controller Pada Budidaya, vol. 6, no. 2, 2017.
Kenjeran Orphanage and Friends of the Aquaponic Pekarangan
Rumah community who have supported and collaborated in this [8] A. Dutta, P. Dahal, R. Prajapati, P. Tamang, and E. Saban Kumar K. C,
research. IoT based Aquaponics Monitoring System, no. September 2018, 2019.
[9] N. Fahmi, S. Huda, E. Prayitno, M. U. H. Al Rasyid, M. C. Roziqin, and
REFERENCES M. U. Pamenang, A prototype of monitoring precision agriculture
[1] D. H. Jayani, Jumlah Penduduk Indonesia 269 Juta Jiwa, Terbesar system based on WSN, 2017 Int. Semin. Intell. Technol. Its Appl.
Keempat di Dunia | Databoks, Katadata.co.id, p. 2018, 2019, [Online]. Strength. Link Between Univ. Res. Ind. to Support ASEAN Energy Sect.
Available: ISITIA 2017 - Proceeding, vol. 2017-Janua, pp. 323328, 2017.
https://databoks.katadata.co.id/datapublish/2019/04/29/jumlah-
[10] M. U. H. Al Rasyid, S. Sukaridhoto, M. I. Dzulqornain, and A. Rifai,
penduduk-indonesia-269-juta-jiwa-terbesar-keempat-dunia.
Integration of IoT and chatbot for aquaculture with natural language
[2] R. W. T. Hartono, F. H. Suwanda, S. P. Angraeni, E. Pratiwi, G. S. Adi, processing, Telkomnika (Telecommunication Comput. Electron.
and D. Taufiqurrohman, E-Aquaponics: Aquaculture and Hydroponic Control., vol. 18, no. 2, pp. 640648, 2020.
Integration Using Electronical Control and Monitoring, Proc. Int. Conf.
[11] EPA.gov, Ammonia, CADDIS, vol. 2, no. water quality, p. 1, 2020,
Electr. Eng. Informatics, vol. 2019-July, pp. 315319, 2019.
[Online]. Available: https://www.epa.gov/caddis-vol2/ammonia.
[3] A. Z. M. H. Ambrosio et al., Implementation of a Closed Loop Control
[12] Badan Standar Nasional Indonesia, Bagian 3 : Produksi induk, 2014.
System for the Automation of an Aquaponic System for Urban Setting,
[13] Sainsmart, Tecnical Data Mq-135 Gas Sensor, vol. 1, pp. 34, 2013.
2019 IEEE 11th Int. Conf. Humanoid, Nanotechnology, Inf. Technol.
540
Authorized licensed use limited to: INTERNATIONAL ISLAMIC UNIVERSITY. Downloaded on August 12,2023 at 10:26:38 UTC from IEEE Xplore. Restrictions apply.