The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

eISBN 978-967-2860-01-3
PENYELIDIKAN DAN INOVASI HIJAU MPCCSustAWARD21
Wan Mohd Rumaizi Wan Taib
Mohamad Nazid Mukhtar
Muhammad Haziq Mohd Zain

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by wanrumaizi.poli, 2021-09-30 06:37:28

IoT Water Usage Management Module by Using Water Flow Sensor psis

eISBN 978-967-2860-01-3
PENYELIDIKAN DAN INOVASI HIJAU MPCCSustAWARD21
Wan Mohd Rumaizi Wan Taib
Mohamad Nazid Mukhtar
Muhammad Haziq Mohd Zain

PENYELIDIKAN DAN INOVASI
MPCCSustAWARD21

PENERBIT

H=2'U 08'0 OY2U 8 ' K'O O& &
0 7 8U K' 8 H 8" /' 8 U'8""'

& 0 'HU U KH 2'& K
U‡½~–Çrª íëíì

&r¡–ºÇr U‡½º‡¤–•r½rö U–r„r ©rªr
©rªr ~r•r‘–rª „r½–ºr„r ~Ë¡Ë –ª–
Ûrª‘ ~¯¤‡• „–Á–r½
LJ½~–Ç¡rª Á‡©Ë¤r „r¤r© Á‡~r½rª‘ ~‡ªÇË¡ „rª

„‡ª‘rª rºr r½r Á‡¡r¤–ºËª LJ½©rÁË¡¤r• ‡¤‡¡Ç½¯ª–¡÷ ©‡¡rª–¡r¤÷
¯Ç¯¡¯º–÷ ½r¡r©rª „rª Á‡~r‘r–ªÛr Çrªºr ©‡ª„rºrÇ –à–ª ~‡½Çˤ–Á

„r½–ºr„r H‡ªË¤–Á „rª H‡ª‡½~–Ç H¯¤–LJ¡ª–¡ OˤÇrª '„½–Á O•r•

‡'O 8 ôòóôñòíóñëëìî

H‡½ºËÁÇr¡rrª 8‡‘r½r 7r¤rÛÁ–r
rÇr H‡ª‘¡rÇr¤¯‘rª
„r¤r©
H‡ª‡½~–Çrª
H 8i 2' '0 8 8 '8=b O' &'/ Y 7H OËÁÇ c K íì

7¯„‡ ¯ r‡ÁÁø 'ªÇ‡½ª‡Ç

‡'O 8 ôòó
ôñò
íóñë
ëì
î
ìö "½‡‡ª U‡•ª¯¤¯‘Û

K‡Á‡r½•

7r¤rÛÁ–r
íö OËÁÇr–ªr~¤‡ ‡ª‘–ª‡‡½–ª‘

K‡Á‡r½• 7r¤rÛÁ–r


îö ªÔ–½¯©‡ªÇr¤ ‡ª‘–ª‡‡½–ª‘

K‡Á‡r½•

7r¤rÛÁ–r
ïö "¯Ô‡½©‡ªÇ HË~¤–rǖ¯ªÁ

7r¤rÛÁ–r

ðö ¤‡ǽ¯ª–Á ~¯¯¡Á
ñíóöëòíëðôð

Di terbitkan oleh
Politeknik Sultan Idris Shah
Sg. Lang, 45100 Sg Air Tawar

Selangor

8¯ö U‡¤ ø ëî îíóë ñíëë
8¯ö !rÚ ø ëî îíóë ñïëë

2r©rª Շ~ ø •ÇǺøggÕÕÕöºÁ–Áö‡„Ëö©Û















Anugerah
TerbaikKERTAS PENYELIDIKAN

MPCCSustAWARD21

7rr½Ç~‡¯½–ªr–¤à!r¯Ç–½¯ ªª=‡½‘HÛr¤"©‡0ª‡‡½½ªr‡Ç–¯¤ Oª•‡¤¤ Á H¯Ç‡ªÇ–r¤ ¯r¤ ¤‡ª„–ª‘ ¯©~ËÁǖ¯ª

Oەr©•ö–½7r•Ë•~r–ª©Ç–©irr„•Û rà–© ~–ª /r©r¤Ë„„–ª
O–Ç– 8¯½ O–¤©– ~–ªÇ– 8¯½„–ª
7˕r©©r„ 'àÕrª ~–ª 8¯½©rª
7¯•„ „–¤ &r¡r© ~–ª =Á©rª
H¯¤–LJ¡ª–¡ U˪ Oۇ„ 8rÁ–½ Oۇ„ 'Á©r–¤ jHUO8k

OËÁÇr–ªr~¤‡ ‡Ô‡¤¯º©‡ªÇ –ª ªÇ½‡º½‡ª‡Ë½Á•–º „Ërǖ¯ªø
¯ªÁˤǖª‘
~rÁ‡„ 2‡r½ª–ª‘ ºº½¯r•

½ 7rà˽r ~–ªÇ– 7rªÁ¯½
H¯¤–LJ¡ª–¡ OˤÇrª '„½–Á O•r• jHO'Ok

0H‡‡¤½‡¯Á¤‡Çr•½r–rªª&–ŸrËrª ‘rˤrª©rª7‡Uª–º–ª–¡‘r¡¤rÇ¡0r‡ªºr0„‡r‡¡rrºªr‘ªËHªr‡ªª‘‘Kˇªªr„rrª•U‡0ªrr½‘~r¯ª 7‡¤r¤Ë–

UÁö nr–ª¯¤½–ª ~–ª Orr½–
OUÁ–Çö– !Or˽•rr•ª~r–ª~ǖª– &ǖË'ÁÁ©Á–rª–¤
~„ˤ à–à– ~–ª /r©r¤Ë„–ª
H¯¤–LJ¡ª–¡ 7‡½Á–ª‘ /¯•¯½ jH7/k

Ër¤
ږÁ O¯¤r½ U½r¡‡½ H½¯Ç¯ÇÛº‡

7¯•„ 8r–© ~–ª 7r½àË¡–
7˕r©©r„ !–½„rËÁ ~–ª 7¯•„ à¤Û 2‡‡
H¯¤–LJ¡ª–¡ OˤÇrª &rŸ– •©r„ O•r• jH=2'O Ok

0‡~‡½¡‡Árªrª H‡ªŸ–©rÇrª U‡ªr‘r 7‡¤r¤Ë– H‡ªÛr©rª Y„r½r H¤rÇ U‡½©r¤ ¤‡¡Ç½–¡
jHYHU k

UÁö O•r½Ë¤ 8–àr© ~–ª irr¡¯º
UÁö 7˕r©r„ Á½Ë¤ ‡ª„– ~–ª 7rÇ 8¯½
00¯¯¤¤‡‡ŸŸ 00¯¯©©Ë˪ª––Çǖ– H0¯rÁÇr–½7Orr¤½rË¡„Ë

ò













Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

Automatic water billing system came into existence because of human error and inconsistence
that is associated with manually operated system. Human error associated with manually
operated system, improper bill creation, Bill availability and payments process which are time
consuming activities, Wastage of water in process of manually operated Water pump, these are
the problems that lead to the development of an “Water Usage Management by Using Water
Flow Sensor”.

2. LITERATURE RESEARCH

There is various factor that makes author towards to choose Arduino WEMOS D1 as
microcontroller for the development Water Usage Monitoring Module. As in figure 1 below,
The Arduino WEMOS D1 is the easiest point of entry to basic IoT with the standard form
factor of the UNO family. Whether looking at building a sensor network connected office or
home router, or if want to create a BLE device sending data to a cell phone, the Arduino
WEMOS D1 is your one-stop-solution for many of the basic IoT application scenarios. This
board also able to connect to a Wi-Fi network to the device such as smartphone, using its secure
ECC608 crypto chip accelerator. Arduino WEMOS D1 is a WIFI development board based on
ESP8266 12E. The functioning is similar to that of NODEMCU, except that the hardware is
built resembling Arduino UNO. The D1 board can be configured to work on Arduino
environment using boards manager (Hareendran, 2021).

Figure 1: Arduino WEMOS D1 Rev 2

Water flow sensor YF B5 as in figure 2, is used to take a note of how much water has been
transferred from one area to the other. It consists of a copper valve body, a water rotor and a
hall-effect sensor. Water flow sensor is designed to measure the volume of liquid traveling past
a given point, a great way to keep tabs on how much water that drip irrigation system is using,
or any other project were the flow of liquid needs to be tracked. The sensor itself is very simple
inside; there is a small flapper wheel that spins as water flows past. A magnet on the flapper
wheel triggers a hall effect sensor which sends a momentary pulse down the output wire with
each revolution, we can then determine the flow rate over time or the total volume that has
passes. Water flow sensor consists of a plastic valve body, a water rotor, and a hall-effect
sensor. When water flows through the rotor, rotor rolls. Its speed changes with different rate of
flow. The hall-effect sensor outputs the corresponding pulse signal (Botnroll, 2021).

Figure 2: Water Flow Sensor YF-B5

601

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

Blynk is a new platform that allows in build interfaces for controlling and monitoring a
hardware projects from iOS and Android devices. As figured in figure 3, currently, Blynk
supports most Arduino boards, Raspberry Pi models, the ESP8266, Particle Core, and a handful
of other common microcontrollers and single-board computers, and more are being added over
time (Alsen, 2017). Arduino Wi-Fi and Ethernet shields are supported in order to control
devices plugged into a computer’s USB port as well. There are three major components in the
platform i.e. Blynk App, Blynk Server and Blynk Libraries.

Figure 3: Blynk Application

3. METHODOLOGY

Arduino WEMOS D1 Rev 2 was used as a microcontroller which this controller was the latest
version of Arduino module, and this microcontroller will receive input from Hall Effect Based
Flow Sensor. Water flow sensor used to measure the volume of water used by residential that
are supplied with water by a public water supply system.

20X2
LCD DISPLAY

WATER ARDUINO Wi-Fi
FLOW WEMOS D1 R1 MODULE
SENSOR
ESP8266 (Blynk)
YF-B5
CONTROLLER

Figure 4: Block Diagram of the System

Block diagram shown in figure 4, consist of Arduino WEMOS D1 Rev 2 which is acts as a
microcontroller, Water Flow Sensor YF-B5 as input component, LCD as output. Firstly, the
initial process started with Hall Effect Sensor that placed in Water flow sensor interfaced with
Arduino through 3 ribbon connector and used to measure every litres water flow through it.
When water flows through the rotor, the rotor starts to rotate affected by the pressure. Its speed
changes with different rate of flow.

The Water Flow Sensor outputs the corresponding pulse signal. The Water Flow sensor is
utilized in the flow meter using a small fan/propeller shaped rotor which is placed in the path
of the water flowing. The water pushes against the fan of the rotor, causing it to rotate. The
shaft of the rotor is connected to a Hall Effect sensor. It is an arrangement of a current flowing
coil and a magnet connected to the shaft of the rotor, thus a voltage/pulse is induced as this
rotor rotates. In this flow meter, for every litre of water passing through it per minute, its outputs

602

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

about 4.5 pulses and then this data will send to microcontroller, diagram of Water Flow Sensor
as shown in figure 5 below.

The connections required for this flow rate sensor with respect to the Arduino is very minimal.
There are only three wires coming from the flow rate sensor the 5V Vcc (Red wire), the GND
(Black wire) and the signal/pulse (Usually yellow) line. Connect the Vcc and GND of the flow
meter to the Arduino Vcc and GND. The pulse line of the flow rate sensor is connected to the
Arduino pin. Arduino software is used for Arduino coding to find flow rate of water, display
the output in serial monitor and displayed on LCD which can be monitored by customers. Next,
when microcontroller read and retrieves data information from Water Flow sensor,
microcontroller will process data information and works on the principle of the water flow
sensor. According to which, a voltage difference is induced in a conductor transverse to the
electric current and the magnetic field perpendicular to it. In Water Flow Sensor, for every
litres of liquid passing through it per minute, its outputs about 4.5 pulses. This is due to the
changing magnetic field caused by the magnet attached to the rotor shaft as seen in the Figure
6. Microcontroller will measure the number of pulses using an Arduino WEMOS D1 and
calculating the flow rate in litres per hour (L/hr) by using a simple conversion formula. If
microcontroller failed to retrieves data information from water flow sensor, the process of the
system will be end.

Figure 5: Hall Effect of Water Flow Sensor

Figure 6: Process of Water Flow Sensor

The Arduino Integrated Development Environment or Arduino Software (IDE) is a cross-
platform application that is written in functions from C and C++ contains a text editor for
writing code, a message area, a text console, a toolbar with buttons for common functions and
a series of menus. It connects to the Arduino and Genuino hardware to upload programs and
communicate with them. Arduino IDE is used to generate the code and upload the code on
microcontroller for implementation and testing.

According to this principle, in this sensor, a voltage difference is induced in the conductor due
to the rotation of the rotor. This induced voltage difference is transverse to the electric current.
When the moving fan is rotated due to the flow of water, it rotates the rotor which induces the
voltage. This induced voltage is measured by the hall effect sensor and displayed on Blynk app.

603

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

Figure 7: Process Flow of the System

The calculation of the water flow data retrieved from the water flow sensor now to be converted
onto the written source coding in Arduino IDE to display the price of the water bills correctly
based on the tariff (SAJ, 2020) under company Ranhill Sdn Bhd or formerly known as Syarikat
Air Johor (SAJ) Sdn Bhd. Thus, output data will be sent through Wi-fi Module via Blynk
application in order sending to the consumer smartphone.

The hardware component of the system consists Arduino WEMOS D1 Rev 2, Hall Effect Water
Flow Sensor YF-B5, LCD display 2002 20x2 and AC DC Adapter 9V 1A for the input power
supply.

Figure 8: Schematic Circuit Overall System

604

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

Figure 9: Overview of Product

4. RESULT

The analysis and result for this project in order to calibrate and get a correct calculation on the
coding written by using a standard water tariff as a foundation of the calculation result as well
as a validity of the project and to get the efficiency of water flow sensor additionally can also
increase accuracy. The result from 10 times test attempts been analysed and further studied so
that the project is based on the correct data. Testing is done stage by stage.

4.1 Coding Calculation Validity
For the water bill calculation, the coding written according to water tariff from water supply
corporation in Johor which is Ranhill Sdn Bhd. For this experiment there are three (3) stages
which for first stage is to calibrate the frequency of the water flow sensor in order to get high
accuracy of water flow which is frequency author was set up to 4.99MHz. Second stage is flow
rating of water flow by referring to datasheet of water flow sensor which formula
(frequency/6.6) entered into a source code and by this way water flow sensor will reads a signal
pulse and calculate the water flow rate base on this formula set up. At final stage, entering the
formula for water bill calculation which is every litres water flowing through MyWaterMtr that
will send to microcontroller and will automatically calculate it, refer to water tariff i.e. for the
first 1m3 – 20m3 = RM0.80, for next 21m3 - 35m3 =RM2.00 and for 35m3 and above was
RM3.00. This tariff calculation only for domestic user and for religious institution, domestic
bulk or non-domestic category will be different.

Next, before this water tariff formula entered into a source code, units of water flowing were
converts firstly from metre cube to litres in order to get more accurate value:

ͳ͵ ൌ ͳͲͲͲ ‹–”‡ ‘ˆ ™ƒ–‡”ǡ
ͳ͵ൌ ͲǤͺͲ
‡…‡ǡ ͳ ൌ ͲǤͲͲͲͺ
ȗሺˆ‘” ‡˜‡”› ͳ ™ƒ–‡” ™‹ŽŽ –‹‡• ͲǤͲͲͲͺ ˆ‘” –Ї ˆ‹”•– ʹͲͲͲͲ ሻ

By using this simple conversion that added these formulae into source code of the
programming, whichever every litre water flowing through MyWaterMtr been calculated. For
final product functionality, author have made an experiment with 3Litre of water and end of
result, this project was shown the satisfactory output for the 3L water with RM0.0024 total bill
amount. Output result display can refer to figure below.

605

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

Figure 10: Final MyWaterMtr Functionality Test Output Display
4.2 Product Efficiency
Experiment was conducted to find the product efficiency. The table 1 below show the analysis
and result for this project such as analysis about how to get the efficiency of water flow sensor
additionally can also increase accuracy. The result from 10 times test was analyzed and further
studied so that the project is based on the correct data by setting on 5 Liter of water repeatedly.
Testing is done stage by stage. The result was good because of the efficiency of the product up
to 98% accurate of sensor reading.

Figure 11: Product Efficiency Testing Apparatus and Setup
Table 1: Result of Efficiency Test for 10 times Attempts

# of Attempt Input (litre/L) Output (litre/L)

1 5.00 4.95
2 5.00 4.97
3 5.00 4.89
4 5.00 4.95
5 5.00 5.00
6 5.00 4.96
7 5.00 4.89
8 5.00 4.97
9 5.00 4.97
10 5.00 4.99

Total 50.00 49.54

Efficiency ሺ߬ሻ:

σ ܱ‫ݐݑ݌ݐݑ‬
߬ ൌ σ ‫ ݐݑ݌݊ܫ‬ൈ ͳͲͲΨ

ͶͻǤͷͶ
߬ ൌ ͷͲǤͲͲ ൈ ͳͲͲΨ

࣎ ൌ ૢૢǤ ૙ૡΨ

Efficiency of the product was 99.08%

606

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

4.3 Data Sending Validity Test
The testing is to validate the water bill consumed when the water through the water flow sensor,
the Blynk will calculate the bill based on the formula that put in the Arduino programming. The
trial takes a litre of water flow by getting the price of RM0.008 as stated water bill tariff
accordingly.

Figure 12: Data Sending to Smartphone Testing Apparatus and Setup

Table 2: Result of Data Sending Test for Product Validity

Volume (litre/l) Flow Rate Amount (RM)
0.125 0.624 0.001
0.250 0.62 0.002
0.375 0.622 0.003
0.500 0.63 0.004
0.625 0.642 0.005
0.750 0.641 0.006
0.875 0.666 0.007
1.000 0.673 0.008

A correct data was sent though smartphone as desired calculated.

5. CONCLUSION

The product was successfully developed and proven to be used accordingly as its aimed to
measure the water flow by consuming of water per user and indirectly educate user to control
their water bill. The present water billing system used analogue and tedious water meters.
Modern electronic device such as water flow sensor can be used to overcome basic limitations
of analogue meter such as less accuracy, human error while billing etc. From the case study, it
is evident that flow sensor can produce very accurate results. The proposed system is a cost
effective and reliable system compared to present water billing system. The process of
monitoring water flow rate, transmitting the usage, calculating the bill etc. is through pre-
programmed Arduino controller and hence no errors as it avoids human intervention. Also,
Billing information is display on LCD and also can be send into consumer smartphone via Wi-
Fi developed module as a parts of Internet of Things (IoT) as a current global trend which is
real time notification is a reliable and also helpful for the consumer as the user gets
acknowledge the water usage and bill whenever user want.

607

Penyelidikan dan Inovasi Hijau, Malaysian Polytechnic & Community College Sustainable Award 2021
(MPCCSustAward21)

REFERENCES

A. Alsen (2017). Relay control using NodeMCU through Blynk App. Retrieved from
https://projects.digilentinc.com/shibinkp202/relay-control-using-nodemcu-through-
Blynk- app-b3750c#things.

Botnroll (2021). Water Flow Sensor YF-B5. Retrieved from
https://www.botnroll.com/en/biometrics/2546-water-flow-sensor-yf-b5.html.

In Lee, K. L. (2015). The Internet of Things (IoT): Applications, Investments, and Challenges
for Enterprises, Business Horizons, 431-440.

Nadiah Zamlus (2019). Paip Dalam Premis Bocor Punca Bil Air Tinggi, Informatic For Public.
Retrieved from https://selangorkini.my/2019/06/paip-dalam-premis-bocor-punca-bil-
air-tinggi/.

T. K. Hareendran (2021). WeMos D1 WiFi Review. Retrieved from
https://www.electroschematics.com/d1-wi-wi-board/.

SAJ (2020). Tariff Grid Syarikat Air Johor Holding (Malaysia). Retrieved from
https://tariffs.ib-net.org/sites/IBNET/ViewTariff?tariffId=1668&countryId=0.

608


Click to View FlipBook Version