Embedded_System_Development_of_Automatic_Water_Qua
Embedded_System_Development_of_Automatic_Water_Qua
net/publication/360305140
Article in International Journal of Emerging Technology and Advanced Engineering · May 2022
DOI: 10.46338/ijetae0522_09
CITATION READS
1 113
2 authors, including:
SEE PROFILE
All content following this page was uploaded by Rony Baskoro Lukito on 25 March 2024.
77
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
By developing a supporting device for a hydroponic Farming using a hydroponic system will have many
planting system that can be applied in a residential advantages. With good water management, the plants will
environment, it is hoped that a digital system can work grow bigger and faster than the planting system using soil
automatically to regulate water quality and light media. The utilization of water also becomes more efficient
requirements to help maintain the growth of hydroponic by using a rotating system. Thus the hydroponic system is
plants equipped with remote access via a TCP/IP network. more environmentally friendly, cleaner and healthier in an
This can also help increase the food security of each family. effort to increase food security.
The next step of this research is to build an automatic
B. Arduino Minimum System
control system using a Cloud Base System to maintain
water quality for hydroponic planting which is called the Arduino is defined as a minimum system that is Open
Smart Hydroponic System. This research roadmap has the Source for Hardware or Software [6]. The Arduino board
ultimate goal of increasing food security on a small scale, can read input from analog or digital sensors, press buttons,
family level. There are four main components of food to receive information via a computer network which is then
security [1]–[3], namely: processed into an output with the support of a
microprocessor on the board. Arduino also provides
1. Food Availability supporting software to make software applications easier,
The ability to meet the basic needs of sustainable food. namely by providing the Arduino programming IDE and the
2. Food access Arduino Software library [7].
The ability to have nutritious food resources In this study, the minimum system module
economically and physically. "MEGA+WiFi R3 ATmega2560+ESP8266" is used, which
is an Arduino Compatible Board with an ATmega2560
3. Use of Food micro controller designed for minimum system
The ability to use the right and right to utilize food development purposes equipped with capabilities as a WEB
ingredients. server [8], WEB client and Wireless Access. Point by using
4. Stability the ESP8266 module [9], [10].
To be food secure, a population, household or individual To measure water pH and water conductivity requires 2
must always have access to sufficient food. Therefore, the sensors that are connected to the analog input pin, while the
concept of stability refers to the availability and access water temperature and water level measurements are
dimensions of food security. connected to the Digital pin of the ATmega2560
microcontroller module. The sensor measurement results
II. LITERATURE REVIEW will be sent to the ESP8266 WEB Server module which can
be accessed via an intranet network using a Web browser
A. Hydroponic Technology [9].
With a hydroponic system, plants can grow without using The DS18B20 waterproof temperature sensor is used to
soil media. Water that has been mixed with mineral measure the temperature of the water in the water reservoir
nutrients needed by plants is placed in a reservoir, then the of a hydroponic system. This sensor can be used in
water is drained to the plant roots with the help of a water environments up to 125 degrees and has a digital output (9–
pump. By utilizing the force of gravity, this water will flow 12bit) [11], [12].
by itself to the water reservoir through a predetermined The water level sensor is needed to find out the water
pipeline. In addition to maintaining the height, flow and reserves in the water storage area of the hydroponic system.
temperature of water, pH and EC of water are very The workings of the ultrasonic distance sensor HC-SR40 is
important to always be observed and controlled, plants will to measure the travel time required for sound to bounce off
lose the ability to absorb the nutrients needed if the pH the object in front of the sensor [13], [14].
value of the water does not match the characteristics of the In the process of photosynthesis, hydroponic plants
plant. require 4 to 6 hours of direct sunlight, or at least 10 hours of
The following are some of the hydroponic system indirect sunlight. To meet these needs and overcome the
techniques currently available [4], [5]: Deep Water Culture, condition of the yard environment in the house that lacks
Nutrient Film Technique, Aeroponic, EBB and Flow and direct sunlight, it is necessary to add grow-light LEDs as a
Drip System. substitute for sunlight so that hydroponic plant growth is
better.
78
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
LED grow-light is a combination of several LEDs with
different light spectrums to help plants grow optimally [15].
LEDs with red and blue colors are enough to make plants
grow normally. White LEDs provide a more complete light
spectrum and are suitable for use in the home.
C. Results on previous research
In previous studies, the pH sensor module can be
activated together with the conductivity sensor by adding an
isolator module to the input/output intermediate module of
the sensor to prevent electrical interference [16] as shown in
Figure 2 Hydroponics Web Application
the red box in Figure 1. The replacement of the
microcontroller module with ―MEGA+WiFi R3
III. RESEARCH METHODS
ATmega2560+ESP8266‖ has succeeded in overcoming the
problem of TCP/IP network connection via WiFi. In The research methodology is the stages of research that
addition, this module also has a light Web Server which is must be determined before carrying out research, so that
useful for displaying a Web-based dashboard. A dosing- research can be carried out in a directed, clear, efficient and
pump module has also been added for pumping pH-Up/pH- effective manner. The following is a research flowchart that
Down and A/B Mix plant nutrients.. illustrates what will be done in this research.
79
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
A microcontroller hardware module equipped with a Wi- The water quality determined by the pH value and the
Fi module conductivity of the water can be automatically
Computer Networks maintained according to the given value.
Arduino open software library LED grow-light settings can be run automatically and
Arduino Programming Tool manually.
Control and observation of water quality can be done via
B. Research Stages TCP/IP network.
In this research, the second generation of hardware and Embeded Web is working fine
software will be built which is a refinement of the results of
previous research, with the following research stages: IV. RESULTS AND DISCUSSION
Collecting data and information related to hardware A. Hardware Development
modules and supporting library software.
In this study, several hardware devices from previous
Build hardware using hardware modules that can still be studies have been developed to improve the overall system
used from previous research and add new hardware function. The addition of a 12VDC Power Supply module
modules to increase the capabilities of the new system. for LED growing-lights along with the installation of a
Develop modular software for each hardware module that power cable to the hydroponic system. Addition of a WiFi
has been running well functionally. electrical-switch module as a switch for LED growing-
Building a WEB-based User Interface lights that can be controlled remotely via a WiFi network.
The results of the development of the hardware and B. Minimum Systems Module
software modules are then applied to a hydroponic Minimum The system as the main hardware in previous
planting trial system in a computer network equipped studies has an insufficient amount of program storage
with kale or mustard greens. memory and the Wi-Fi connection is often lost. Completion
of the power supply module and software library for the
C. System Development
Wi-Fi module in the previous module was also not able to
Hardware and software development in this study uses provide maximum results. In an effort to improve the
the Waterfall Model which is a classic model that is performance of Wi-Fi connectivity and increase the size of
systematic and sequential. The Waterfall Model has 5 the programming memory, in this study, the minimum
stages in development: Communication, Planning, system module "MEGA+WiFi R3 ATmega2560
Modeling, Construction and Deployment as shown in +ESP8266" is used, which is an Arduino Compatible Board
Figure 3 [17] with an ATmega2560 micro controller designed for
minimum system development purposes. equipped with
capabilities as a Web server [8], Web client and Wireless
Access Point using the ESP8266 module [9], [10]. The
following are the specifications of the main hardware
modules used in this study:
Figure 3: Waterfall Model
Microcontroller : ATmega2560
D. Achievement Indicators IC Wi-Fi : ESP8266
Testing is basically an iterative process to find errors in a USB-TTL converter : CH340G
system that can be caused by several things, both software Power Out : 5V-800mA
and hardware as well as errors related to the design, Power IN. USB : 5V (500mA max.)
implementation and specification determination processes. Power IN. VIN/DC Jack: 9-24V
The error correction is carried out continuously until the Power Consumption : 5V 800mA
target output has been achieved properly. Here are the Wi-Fi : Wi-Fi 802.11 b/g/n 2.4 GHz
performance indicators for this year's research: Clock Frequency :16MHz
Digital I/O : 54
Periodic monitoring of pH and conductivity of water can
Analog I/O : 16
run well
80
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
Memory Size : 256kb As shown in Figure 5, input data to determine the state
Data RAM Type/Size : 8Kb of the quality and water reserves of the hydroponic system
Data ROM Type/Size : 4Kb can be obtained from the temperature, pH, EC and water
Interface Type : serial\OTA level sensor modules. The entire data is processed by the
Operating temperature : −40С°/+125С° ATmega2560 module and forwarded to the ESP8266 via
Length × Width : 53.361×101.86mm the internal serial communication in the Minimum System
Antenna : Build-in\external antenna as Web Page input data which will be displayed by the
Web Server managed by the ESP8266 module. Control
functions for pH, water nutrition and LED grow-light can
be done via the Web page in the ESP8266 program
memory module. The data and commands are transmitted
via internal serial communication to the ATmega2650
module to drive the Dossing-pump pH-Up, pH-Down, A-
Mix nutrition and B-Mix nutrition motors through the
digital I/O interface, as well as giving commands to the
WiFi-electrical-switch module via WiFi network.
C. Sensor Module
To measure water pH and water conductivity (EC)
requires 2 sensors connected to the Analog input pin, while
measurements of water temperature and water level are
connected to the Digital pin of the ATmega2560
microcontroller module. The sensor measurement results
will be sent to the ESP8266 WEB Server module which Figure 5: System Architecture
can be accessed via the intranet network using a WEB The Embedded Web application in the minimum system
browser [9]. module ―MEGA+WiFi R3 ATmega2560 +ESP8266‖ can
The DS18B20 waterproof temperature sensor is used to be accessed using a Web browser via a Wireless LAN
measure the temperature of the water in the water reservoir network to the Web Server address managed by the
of a hydroponic system. This sensor can be used in ESP8266 module. Thus the Embedded Web application can
environments up to a temperature of 125 oC and has a be accessed at any time by client computers from a TCP/IP
digital output (9-12bit) [11]. network that are in one network address through an Access
The water level sensor is needed to determine the water Point..
reserves in the water storage area of the hydroponic system.
The workings of the HC-SR40 ultrasonic distance sensor is E. Hardware Implementation
by measuring the travel time required for sound to bounce In previous studies, the pH sensor module can be
off objects in front of the sensor [13]. activated together with the conductivity sensor (EC) by
adding an isolator module to the input/output interface
D. System Architecture Design
module of the sensor to prevent electrical interference [16]
The picture below is the hardware architecture of the as shown in Figure 6. By replacing the microcontroller
embedded Web application on a hydroponic system using a module with ―MEGA+Wi-Fi R3 ATmega2560+ESP8266‖,
minimum system "MEGA+WiFi R3 ATmega2560 the quality of the TCP/IP network connection via WiFi can
+ESP8266". be improved much better, and the dosing-pump module to
regulate pH and water nutrients can also work well.
81
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
82
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
The green button in the Lamp Status box shows the last From Figure 5.7 it can be seen that the machine log
state of the command given to the Wi-Fi electrical-switch output reads "HTTP server started" which indicates that the
module to turn the grow-light LED on or off. The writing Web Server is ready and working properly.
status will be toggled from ON to OFF, or vice versa OFF
to ON when the button is pressed or mouse-click event
G. Test Results
The following will explain the results of the trial access
to the embedded Web application, connectivity test,
monitoring and water quality control functions of the
hydroponic system, and the LED grow-light control
function that has an impact on hydroponic plant growth.
Access to the Embedded Web Application: When the client
computer accesses the Web Server contained in the
minimum system module ―MEGA+WiFi R3
ATmega2560+ESP8266‖ using a Web browser application,
the default Web page for Monitoring mode will be
displayed as shown in Figure 9. To enter the Set Water
Quality menu, it can be done by pressing the text box and
within 30 seconds, the menu will automatically return to
the Monitoring menu. From the trial results of access to the
Hydroponic Remote Control and Monitoring Web site
using mobile devices such as laptops and cellphones, Figure 9: Embedded WEB Server
information related to air temperature, water temperature, Connectivity Test: The quality of network connectivity that
water level, water pH and water PPM is updated is not good, can be one of the causes of failure to display
periodically every 5 seconds. measurement results. To see the performance of the Wi-Fi
module in the minimum system "MEGA+Wi-Fi R3
ATmega2560+ESP8266", a connectivity test was carried
out using the standard PING test. The implementation of
the PING test can be seen in Figure 10, where there are
1000 PING packets sent to the Web Server continuously
every second. From the observations, it was found that
there were only 3 packet losses for delivery of 1000
packages.
83
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
Water Quality Observation Function: Observations of pH, Manually setting to change the water nutritional value
PPM, altitude and water temperature, as well as air (PPM) and water pH can be done by entering the desired
temperature will be updated every 5 seconds and can be liquid dose in milliliter units and then proceeding with
done online through the internet browser application on pressing the "OK" button. There are three options for
every computer device as shown in Figure 11. With the setting manually: adding water nutrients (Add Nutrition
TCP/IP network, the monitoring function can be performed box) in the form of AB Mix solution, increasing the pH
from a remote location as long as it is still on the same value of the water for the Add pH Up box, and lowering the
local network. From the results of testing the observation of pH value of the water for the Add pH Down box. After the
water quality through mobile devices such as cellphones "OK" button is pressed, the dossing-pump motor will run to
and tablets can also run well. This also increases the ease of pump the AB Mix, pH-Up or pH-Down solution into the
being able to see the condition of the water quality of the hydroponic system water reservoir. Figure 12(b) is an
hydroponic system at any time. example of a manual control for adding 5ml of nutrient
water.
The automatic setting menu is in the Water Quality box
as shown in Figure 12(c). There are two parameters that
need to be determined before the AUTO Control button is
pressed: the target water nutrient value in PPM units and
the target water pH value. Decision making using the ON-
OFF control system will be active every 2 minutes to run
the Dosing-pump from the AB Mix, pH-Up or pH-Down
solutions so that the target water quality value is
maintained. While the monitoring function continues to run
periodically to display measurement data every 5 seconds.
86
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 12, Issue 05, May 2022)
[14] KT-elektronic, ―Ultraschall Messmodul HC-SR04,‖ pp. 4–6, 2012. [17] R. S. Pressman, Software Engineering: A Practitioner’s Approach,
[15] Steven, ―Can You Use Regular Light Bulbs As Grow Lights?,‖ 7th ed. New York: The McGraw-Hill, 2014.
2021. https://growlightinfo.com/regular-light-bulbs-as-grow-lights/.
[16] R. B. Lukito and C. Lukito, ―Development of Water Quality Control
and Monitoring Systems for Hydroponic Plants Based on the
Embedded Web,‖ vol. 11, no. 08, pp. 80–88, 2021, doi:
10.46338/ijetae0821.
87