You are on page 1of 9

Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

Design of Automatic pH Level Prototype


Using Microcontrol Nodemcu
Esp8266 Based on IoT Technology
1
E.S. Rahayu, 2Mardiono, 3A.A. Wardhana
1,2,3
Teknik Elektro, Jayabaya University, Jakarta

Abstract:- In the process of controlling the pH level of can maintain the pH level of the water according to the
water manually there is a risk of controlling pH levels standards set by the government.
directly in contact with hazardous chemicals such as
HCl and NaOH. The two chemicals are chemicals that This automatic water pH control system uses the
can be used to regulate the pH level of water, but both chemicals HCL and NaOH to maintain the water pH level
of these chemicals are included in corrosive materials to comply with government regulations. This system can
which can cause damage to the skin or eyes if there is also reduce the risk of pH control agents from hazardous
direct contact with the two materials. This study aims to chemicals such as HCl and NaOH, because both of these
design a system to control the pH of water in the form chemicals are included in corrosive materials which can
of a tool that can monitor and control the pH level of cause damage when in contact with living tissue. (Utomo S.
water automatically in order to reduce the risk of 2012)
exposure to hazardous chemicals and facilitate the work
of officers. This system uses a NodeMCU ESP8266 II. LITERATURE REVIEW
microcontroller controller which has an input in the
form of a pH sensor and a water level sensor. The In this study a system was designed to monitor and
system output is in the form of 3 water pumps and 2 control the pH level so that it remained in the pH range of
diaphragm pumps. NodeMCU will adjust the 6.5 to 8.5. Prototype or miniature controller of water pH
diaphragm pump speed by using the Sugeno Fuzzy logic using NodeMCU as a central controller that has a pH
method. By utilizing the Internet of Things (IoT) sensor input and level switch sensor and output in the form
technology, the condition of the pH value of water and of a motor driver IC to drive the diaphragm pump and
pumps can be monitored online via a smartphone immersion pump. Then the results of monitoring the pH
making it easier to monitor at any time. The application level will be displayed on a smartphone that has the Blynk
used is the Blynk application based on the Android application installed.
Operating System. The quality of the internet network
connection connected to NodeMCU is very influential Research that has been published in several journals
on sending data to CloudBlynk. Testing the diaphragm shows differences in both the objectives and the methods
pump speed value is regulated by Sugeno fuzzy logic used. There is a research that regulates the acidity level
based on the readable pH value. Based on testing the pH aimed at maintaining water quality so that the life of
of water, this system successfully controlled the pH of ornamental fish Chefs continues (Bayu, Sugito Slamet,
water with a capacity of 8 liters with a submersible 2017) Other studies design the control of pH in the acid-
pump speed of 1.31l / min, the highest pH value of the base titration process (Mukhlish KI, Hendra C. 2010) and
experiment 11.14 with a duration of 213 seconds, and there are also pH control studies that use the Self Tuning
the lowest pH value of 2.01 with a duration of 260 PID method with Adaptive Control (Achmad DC, Hendra
seconds C. 2012).

Keywords:- pH, Internet of Things (IoT), Fuzzy Logic, III. METHODOLOGY


NodeMcu ESP8266, Smartphone.
Besides having the ability to monitor the pH value of
I. INTRODUCTION water, this automatic pH control system also aims to keep
the pH level in the range of 6.5 to 8.5. The monitoring
Business actors who have disposal waste in the form results will be forwarded to Cloud Blynk so that it can be
of water are expected to be able to maintain the pH level of viewed via a smartphone via the Blynk Android
water in accordance with standards determined through application. This system uses a pH sensor to find out the
Minister of Health Regulation Number: 416 / MEN.KES / pH level of the water and a level switch sensor to find out
PER / IX / 1990 concerning Requirements and Supervision the height of the water. This prototype includes chemicals
of Water Quality, namely pH 6.5 to 8.5, (Permenkes, 1990). using a diaphragm pump, while in the process of
Water pH levels that do not meet the standards will pollute transferring and stirring the water a submersible pump is
the community's environment. Therefore, business used. The switch is used to start and stop system processes.
operators must have a water disposal treatment system that This block diagram system is shown in Figure 1.

IJISRT20FEB132 www.ijisrt.com 98
Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig 1:- Block Diagram of Monitoring pH Water Control System

 Hardware Designing this circuit the Water Level sensor output is connected to
In the hardware design section, the system uses pins D2, D6 and D7 on NodeMCU. The workings of this
NodeMCU V2 which has input in the form of two sensors sensor are as follows: when the floating sensor section is
namely a pH sensor and a level switch sensor, while the lifted by water or water in a full containers, the magnet in
output consists of an L298 IC driver, a 12 V diaphragm the float will deactivate or disconnect the reedswitch
pump and a 5 V dip pump. know the pH level of water in connection in the sensor rod.
the containers. The signal modifier functions as a voltage
signal modifier on the pH sensor probe from 414.12 mV to Prototype of the pH Water Control System will be
-414.12 mV to a voltage range that can be read by made using a glass containers measuring length, width and
NodeMCU analog inputs, from 0 V to 3.3 V. Level sensor height of 60 cm x 25 cm x 20 cm which is divided into
switches are used to determine the water level in the water three parts, namely the water reservoir containers,
reservoir containers. The end result of this process is to find controlling the pH level and the end result of the process
out whether the desired water level to start controlling the with a capacity of 8 liters each. Figure 3 shows the
pH level of the water has reached the minimum limit. In prototype design of a water pH control system.

Fig 2:- Description of Prototype of Water pH Control System.

 Software Design The program flow begins by connecting NodeMCU to


The software design uses the Arduino IDE program to WiFi connected to the internet so that it can communicate
compile a series of program commands on NodeMcu and with Cloud Blynk. Furthermore, the system will start
Blynk applications so that the system is able to display data operating when the switch is On. The water reservoir pump
that will be forwarded by NodeMCU. will activate if the water level in the water tank is full and

IJISRT20FEB132 www.ijisrt.com 99
Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
the containers controlling the pH level has not been In this design the Arduino program was made to
reached. If this has been achieved, the water stirring pump process data from the PH sensor, Water Level sensor,
inside the containers that controls the pH level will be switch, and a program to control the speed of the
active. The pH level data from the sensor collected 30 Diaphragm Pump and the Submersible Pump.Implementasi
samples will be calculated the average value and converted Rancangan Pada Aplikasi Blynk
to a pH value. If the pH is 6.5 to 8.5, the water reservoir
pump is On. The diaphragm pump speed used to increase or The design of Blynk application uses 1 notification
decrease the pH level will be processed using the Sugeno facility, email and virtual LCD as much as 1 piece. The
Fuzzy Logic method based on the pH value. Information on design requires a SuperChart which is used to find out
the pH level and condition of all pump motors will be sent information on pH levels and the processes that are taking
to Cloud Blynk so that the results of pH control can be place from NodeMCU processing. Virtual pins V0 and V1
monitored via a Smartphone. Meanwhile, the final pump are used for LCD input. Virtual pins V2, V3, and V4 are
will be active if the water level in the containers is final. used for SuperChart input.

Fig 3:- Pin Settings on the Virtual LCD

Fig 4:- Pin Settings on SuperChart

 Fuzzy Logic Design sets, namely a maximum speed of 100% and a minimum of
Fuzzy Logic Design consists of 2 input variables 0% in NodeMCU ie "stop "With a value of 0%," slow "with
namely Water pH Level and Diaphragm Pump Speed. The a value of 50%," medium "with a value of 75%, and" fast
pH level variable consists of 5 fuzzy sets, namely Lower "with a value of 100%.
Limit 2, Lower Limit 1, Safe Limit, Upper Limit 1, Upper
Limit 2. The diaphragm pump speed variable has 4 fuzzy

IJISRT20FEB132 www.ijisrt.com 100


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Diaphragm Pump 1 rule to reduce pH levels as  If the pH of the water is at the upper limit 1 then the
follows: pump speed is moderate (75%)
 If the pH of the water is in the safe zone, the pump stops  If the pH of the Water is at the Upper Limit 2 then the
(0) pump speed is Fast (100%)

Input Variable Output Variable


No.
pH of water Diaphragm Pump Speed 1 (%)
1 Safety limit 0
2 Upper Limit 1 75
3 Upper Limit 2 100
Table 1:- Fuzzy Rules of Diaphragm Pumps 1

Whereas Diaphragm Pump 2 Rule to raise the pH level as follows:


 If the pH of the water is in the safe zone, the pump stops (0%)
 If the pH of the water is at Lower 1, the pump speed is moderate (75%)
 If the pH of the Water is at the Lower Limit 2 then the pump speed is Fast (100%)

Input Variable Output Variable


pH of water Diaphragm Pump Speed 2 (%)
1 Safety limit 0
2 Lower Limit 1 75
3 Lower Limit 2 100
Table 2:- Fuzzy Rules of Diaphragm Pumps 2

Fig 5:- Input Data Fuzzification

 Diaphragm Pump Speed

Pump Speed (%)


No pH of Water Diaphragm Pump 1 (M1) Diaphragm Pump 2 (M2)

1 4.36 0 100
2 5.4 0 80
3 5.96 0 75
4 6.54 0 69
5 6.70 0 45
6 7.56 0 0
7 7.90 0 0
8 8.02 3 0
9 8.46 69 0
10 8.92 75 0
11 9.8 90 0
12 10.36 100 0
Table 3:- Diaphragm Pump Speed Settings

IJISRT20FEB132 www.ijisrt.com 101


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
This prototype uses the Sugeno fuzzy logic method to  Water Filling in Containers Controlling pH
regulate the motor speed of the diaphragm pump 1 (M1) The process of moving water from the Water
and 2 (M2) based on the pH level read by the DF Robot pH Reservoir container to the pH Controlling container uses a
sensor. Pump speed regulation is done by simulating using Submersible pump 1 (M3) which has 2 conditions where if
MatLab software to obtain pump speed values. the water level Sensor 1 ON (the float lifts by water)
Subsequently carried out experiments of several conditions indicates the presence of water in the Water Storage
of pH levels from 4 to 11. The results obtained are shown container then the Submersible Pump 1 (M1 ) will be ON
in Table 3. as in Table 5.

IV. DISCUSSION / ANALYSIS


No Sensor Level Air 1 Pompa Celup 1(M1)
The results of the prototype design of a water pH 1 ON ON
control system are shown in Figure 6. 2 OFF OFF
Table 5:- Experiment of Water Level Sensor 1 with
Submersible Pump 1.

 Fill the water in the Final Containers


The process of moving water from the pH control
container to the finished product has 2 conditions to
regulate the Submersible Pump 2 (M4) where if the water
level sensor 2 is ON (a float lifted by water) that indicates
the presence of water in the container and the pH level read
by the sensor pH is 6.5 to 8.5, Submersible Pump 2 (M4)
will be ON as shown in Table 6.

Fig 6:- Photograph of Prototype Design Results Water Level PH 6.5 – Submersible
No
Sensor 2 8.5 Pump 2 (M4)
 Water Level Reading Test 1 ON YA ON
This prototype uses 3 water level sensors installed in
2 ON TIDAK OFF
the water reservoir containers, the PH level control
containers and the final containers as shown in Figure 7. 3 OFF YA OFF
3 OFF TIDAK OFF
Table 6:- Experiment of Water Level Sensor 2 with
Submersible Pump 2.

 Water Filling Container Water Testing


The process of moving water from the Final Results
container to the Water Collection container uses a
Submersible Pump 4 (M6) if the water level Sensor 3 is ON
(the buoy is raised by water) which indicates the presence
of water in the container, the Pump will be ON. Table 7
shows the results of Water Level 3 and Submersible Pump
4 Tests.

Submersible Pump 4
No Water Level Sensor 3
(M6)
Fig 7:- Water Level testing
1 ON ON
The way this sensor works is to read the water level in 2 OFF OFF
each containers, if the water level has been reached (sensor
Table 7:- Testing of Water Level Sensor 3 and Submersible
floats lifted by the water) then the connection to the sensor
Pump 4
will be lost. Briefly the results of the water reading test are
shown in Table 4.
 Water pH Reading Testing
The Water pH reading system uses a DF Robot pH
No Condition Connection sensor found in the pH control container as shown in Figure
8. Testing the pH Sensor
1 Reached Water Level Break
2 Water Level Not Achieved Connected
Table 4:- Test Results for Water Level Readings

IJISRT20FEB132 www.ijisrt.com 102


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig 8:- pH sensor

Testing is done by comparing the results of the value HCL and NaOH. The results of reading the object as shown
of the DF Robot pH sensor with litmus paper, the object in the table shows that the pH sensor works in accordance
being tested is mineral water, buffer pH 4, 7, a mixture of with a range that can be tolerated.

No The object Litmus Paper pH Sensor Reading

3.9

1 Buffer pH 4

7.1

2 Buffer pH 7

5.6
3 Air

13.31
1500 ml of Water and
4
100 ml of 48% NaOH

2.21
1500 ml of Water and
5
100 ml of 32% HCL

Table 8:- Testing pH values

 Blynk Connectivity Testing


This prototype requires an internet connection to
connect NodeMCU with the blynk cloud in order to
communicate with each other. In testing the NodeMCU
connection with Cloud Blynk through the internet network
(wifi), the results show that the quality of the network
greatly affects the speed of data transmission.

IJISRT20FEB132 www.ijisrt.com 103


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig 9:- Pengujian Konektivitas

Fig 11:- Blynk Testing

From the above Blynk test, it can be concluded that


NodeMCU successfully sent Water pH value data of 6.78,
Diaphragm 1 (M1) pump speed of 33%, Diaphragm 2 (M2)
Fig 10:- Testing of poor Internet connectivity pump speed of 0, and sent information that the system was
in the process of controlling Water pH.
 Testing Data Transmission from NodeMCU to Blynk
and Display Data at Blynk  Blynk Notification
This prototype uses Blynk to monitor Water pH, This prototype uses notification in the form of
system conditions and speed of Diaphragm 1 (M1) and 2 reporting water pH data every hour as a result of
(M2) pumps, then the data transmission test from monitoring the pH level of the water that will be sent from
NodeMCU to Blynk is shown in Figure 11 of the Blynk NodeMCU to Blynk and email. Figure 12 shows the results
Test. of the Blynk Notification Test. After testing the prototype
for 1 hour, it can be concluded that the results of
monitoring the pH of the water were successfully sent to
Blynk and email.Prototipe ini menggunakan notifikasi
berupa pelaporan data air pH setiap jam sebagai hasil
monitoring kadar pH Air yang akan dikirimkan dari
NodeMCU ke Blynk dan email. Gambar 12 menunjukkan
hasil Pengujian Notifikasi Blynk. Setelah dilakukan
pengujian terhadap prototipe selama 1 jam, dapat
disimpulkan bahwa hasil monitoring kadar pH Air berhasil
dikirimkan ke Blynk dan email.

Fig 12:- Testing of Blynk Notifications

IJISRT20FEB132 www.ijisrt.com 104


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Analysis of the test: from the results of the  Water pH Control Testing
connectivity test above it can be concluded that NodeMCU One of the goals of making this prototype is to find
successfully connected to the internet network via wifi and out the length of time needed to reach the pH level of water
connected with Blynk, and when the quality of the internet according to the specified standards. The test is carried out
connection is poor the transmission of NodeMCU data to by determining the pH level of the water first, then the time
blynk is disrupted. needed to obtain the pH standard that has been determined
is the pH of water 6.5 to 8.5. The active motor time is set
for 25 milliseconds and stops 1 second. Table 9 shows the
results of the Water pH control test.

No Initial pH The time it takes to reach pH 6.5-8.5 (seconds)

1 2.01 260
2 3.34 184
3 4.42 111
4 5.12 41
5 5.53 27
6 6.04 13
7 9.17 23
8 9.68 76
9 10.01 121
9 10.34 169
10 11.14 213
Table 9:- Testing of pH Control of Water

V. CONCLUSION process of mixing chemicals with water can be done


more quickly.
Based on the results of tests that have been carried out
on the prototype design of the pH water control system, the ACKNOWLEDGEMENT
following conclusions can be made:
 Based on testing the pH reading, the pH sensor of the Special thanks go to the Jayabaya University Faculty
DF Robot has a difference of 0.1 when measuring pH of Industrial Technology who have supported the funding
Buffer 4.0 and 7.0. of this research activity, so that this research can be
 Quality of Internet connection connected to NodeMCU completed well.
1 is very influential in sending data to CloudBlynk.
 Based on testing the diaphragm pump speed value, the REFERENCES
pump was successfully adjusted according to the value
of the processing of the pH value which is read using [1]. Achmad Dwiana Chandra, Hendra Cordova (2012)
the fuzzy logic of the Sugeno method. Rancang Bangun Kontrol pH Berbasis Self Tuning
 Based on the Water pH control test, the prototype of the PID Melalui Metode Adaptive Control. Jurnal Teknik
water pH control system succeeded in controlling the POMITS Vol 1(1): 1 – 6. Faculty of Industrial
Water pH of a capacity of 8 liters with a submersible Technology ITS Surabaya
pump speed of 1.31l / min, the highest pH reading of http://digilib.its.ac.id/public/ITS-paper-23284-
11.14 with a length of 213 seconds, and the lowest pH 2408100058-Paper.pdf, acceesed 24 July 2019
value of 2.01 with a duration of 260 seconds [2]. Bahroini Ahmad, Farmadi Andi, Nugroho Adi
Radityo (2016) Prediksi Permintaan Produk Mie
LIMITATION AND STUDY FORWARD Instan Dengan Metode Fuzzy Takagi-Sugeno.
Kumpulan Jurnal Ilmu Komputer (KLIK) Vol 3 No 2:
Some suggestions for the development of a prototype 221-223. Prodi Ilmu Komputer Lambung Mangkurat
of this water pH control system are as follows: University.
http://klik.ulm.ac.id/index.php/klik/article/download/6
 A water level reading system can be developed by 2/pdf, acceesed 24 July 2019
replacing the water level sensor with an ultrasonic [3]. Bayu, Sugito Slamet (2017) Analisis Kadar Derajat
sensor so that it can read the water level with varying Keasaman (pH) dalam Pemeliharaan Ikan Hias Koki
values. pada Media Tanaman Hias Air dengan Penambahan
 A water stirring pump can be developed by using a Nonilfenol, Buletin Teknik Litkayasa Akuakultur, Vol
faster pump motor or adding a pump so that the time 15 (1). Fisheries Research Center, Maritime and

IJISRT20FEB132 www.ijisrt.com 105


Volume 5, Issue 2, February – 2020 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Fisheries Research and Human Resources Agency.
http://ejournal-balitbang.kkp.go.id/index.php/
btla/article/view/6001, acceesed 24 July 2019
[4]. Minister of Health Regulation No. 416 / MEN.KES /
PER / IX / 1990 concerning Requirements and
Supervision of Water Quality.
http://web.ipb.ac.id/~tml_atsp/test/PerMenKes%2041
6_90.pdf , acceesed 24 July 2019
[5]. Mukhlish Kusuma Irawan, Hendra Cordova. 2010.
Skripsi:Perancangan Kontrol pH pada Proses Titrasi
Asam Basa. Faculty of Industrial Technology ITS
Surabaya. http://digilib.its.ac.id/public/ITS-
Undergraduate-10580-Paper.pdf, acceesed 24 July
2019
[6]. Minister of Health Regulation No. 416 / MEN.KES /
PER / IX / 1990 concerning Requirements and
Supervision of Water Quality.
http://web.ipb.ac.id/~tml_atsp/test/PerMenKes%2041
6_90.pdf , acceesed 24 July 2019
[7]. Rahakbauw Lodewyik Dorteus. 2015. Penerapan
Logika Fuzzy Metode Sugeno Untuk Menentukan
Jumlah Produksi Roti Berdasarkan Data Persediaan
Dan Jumlah Produksi Roti Berdasarkan Data
Persediaan Dan Jumlah Permintaan ( Studi Kasus :
Pabrik Roti Sarinda Ambon). Barekeng, Jurnal Ilmu
Matematika dan Terapan, Vol. 9(2): 122-124. FMIPA
Pattimura University.
https://ojs3.unpatti.ac.id/index.php/barekeng/article/
download/289/249/ . acceesed 24 July 2019
[8]. Utomo Suratmin. 2012. Bahan Berbahaya Dan
Beracun (B-3) dan Keberadaannya di Dalam Limbah.
Jurnal Konversi Vol 1(1). Muhamadiyah University
Jakarta.
https://jurnal.umj.ac.id/index.php/konversi/article/vie
w/1120/1025, acceesed 24 July 2019

IJISRT20FEB132 www.ijisrt.com 106

You might also like