M1G3-Water Management System
M1G3-Water Management System
M1G3-Water Management System
Group Project
SKEM 4722
Capstone Projects
2019/2020-I
Contents
1.1 INTRODUCTION ..................................................................................................................................... 3
1.2 CONCEIVE-DESIGN-IMPLEMENT-OPERATE APPROACH ............................................................. 4
1.2.1 CONCEIVING ................................................................................................................................. 4
1.2.2 DESIGNING..................................................................................................................................... 4
1.2.3 IMPLEMENTING .......................................................................................................................... 10
1.2.3.1 Hardware implementation ....................................................................................................... 10
1.2.3.2 Electrical component implementation ......................................................................................... 11
1.2.3.3 Software implementation ............................................................................................................. 11
1.2.4 OPERATING .................................................................................................................................. 15
1.3 RESULT AND ANALYSIS .................................................................................................................... 16
1.4 INNOVATION ........................................................................................................................................ 17
1.5 CONCLUSION ....................................................................................................................................... 19
1.6 ACKNOWLEDGEMENT ....................................................................................................................... 19
REFERENCES ..................................................................................................................................................... 20
1
Water Management System
Muhammad Irfan Bin Jaafar, Akmal Muhaimin Bin Saleh, Navintiran A/L Rajan,
Abdulrahman Aly Awad
1.1 INTRODUCTION
Water is considered as the source of all life. It constitutes around 70% of the
human body and Earth surface. But, only 3% of that water is fresh, which brings
attention to water usage waste and pollution. Here, in Malaysia the average daily
consumption according to the UN is 300L/day which double the average consumption
by European countries (165L/day). The higher consumption is also reflected as higher
water bill. Therefore, a proper solution to manage water usage and consumption while
providing an alternative supply source is needed. The proposed solution is to use rain
water harvesting as alternative supply and provide a SCADA system to monitor water
usage and consumption by users.
The system also helps economically as it reduces water cost through first
providing an alternative source i.e rain water, early detection of leaks through
monitoring system and through improved user awareness to water usage as it was
found that installing such systems improves users’ behavior toward water
consumption overall.
The solution has some impacts on environment as it reduces water waste and
is considered as a renewable resource management solution.
1.2 CONCEIVE-DESIGN-IMPLEMENT-OPERATE APPROACH
1.2.1 CONCEIVING
The site visit to garden area of P19a was conducted to inspect possible
locations for tank installation. The area has small gardening plots and a resting area
supplied with tables for students to sit. There are two main rain water drains at the
middle and one at the back (office side). The 2nd is more preferable for installation as
it won’t obscure the area with having a large tank and easier to install tank and
system.
The problems related to water usage and consumption based on interviews can
be summarized into three major problems which are the high bill cost, leakage from
piping and connections and wastage of water on irrigation and cleaning. These
problems were identified by all interviewees with some focusing on bill cost and
others more on wasting resources in general. The personification of the target client
based on interviews can be summarized as a person concerned about their community,
keen on solving problems, has some technical background and preferably with a high
management position as it will make implementing the solution in companies or
institutes easier.
1.2.2 DESIGNING
Figure 1.7: The schematic circuit for the system (using KiCad).
Figure 1.8: Flowchart of water management system.
The BOM was made based on initial responses made by interviews and design
statement, several items were added later on (dates provided in appendix) to ensure
presentation works properly. The Gnatt chart is also included in appendix. The total
budget for the project was 253 RM spanning duration of 14 weeks.
1.2.3 IMPLEMENTING
To implement the system several steps were taken to ensure productivity and
efficiency. The 1st step was ordering the electrical components which are the Node-MCU,
flowmeters, 12V solenoid valve and ultrasonic sensor. The items were purchased through
Shopee (online shopping app). The next step was to test the components performance and
ensure are all working properly. After confirming the team started implementing the water
tank based on design specifications, which require four pipes to be connected to the system.
One for rain water input, one for water supply intake (hybrid), one for overflow and one main
output line. The team purchased a 20 L empty drum to develop as main tank, and used PVC
pipes and connectors to connect the sensors and valves. The assembly process with its
requirements of drilling, cutting and gluing was done in the Automation Lab at P10. This was
followed by designing the electric circuit of the system. Finally the system was tested to
ensure are parts are working as required.
Afterwards the team used PVC pipes (1/2 inch) and connectors to fix the flow
meters and valve into the system. The top of the drum was cut and removed to
make installing pipes easier and also to fix the ultrasonic sensor. The real tank
also has an opening at the top which also can be used to fix the ultrasonic
sensor and cover it with PVC cover which is also included. Sealing tape and
PVC glue were used to ensure system doesn’t leak. The system (mock) is
expected to be tested under low pressure condition so robustness was not taken
into consideration as it is a mock prototype.
1.2.3.2 Electrical component implementation
The team used a 12V battery as main power supply. A 5V voltage regulator
was used to power the relay, Node-MCU which has an internal voltage
regulator to 3.3V and the flowmeters. The solenoid valve received supply
directly from battery. The ultrasonic sensor was power using Node-MCU
3.3V.
𝑃𝑢𝑙𝑠𝑒 ∗ 100
𝐹𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 =
𝑡 − 𝑡𝑜
𝐹𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦
𝐹𝑙𝑜𝑤 =
7.5
𝐹𝑙𝑜𝑤
𝑉𝑜𝑙𝑢𝑚𝑒𝑜 =
60
𝐹𝑙𝑜𝑤
𝑉𝑜𝑙𝑢𝑚𝑒𝑛𝑒𝑤 = + 𝑉𝑜𝑙𝑢𝑚𝑒𝑜
60
Pulse interval is taken from echo and trigger pins, the factor is the speed of
sound in space and is divided by two to cover for the time travelled back and
forth.
1.2.4 OPERATING
The water management system was tested to check its performance. The
system was tested using a 12V pump to provide water flow into the tank (hybrid), and
a small water container with a cone (funnel) was used to mimic rain water intake. The
system was set to allow hybrid input if water supply drops below 15cm in tank. The
test run showed the hybrid input is switched on when water level went below 15 cm
(after a delay to ensure that shaking of water surface won’t cause valve to open and
close frequently). The data sent from flow meters was monitored using “thingspeak”
and the readings were updated every 15 s (minimum time allowed for update
interval).
Benefits:
Help reduce water bill.
Automated hybrid system.
Provide data analytics on consumption behaviour.
Provide data analytics on saved cost.
Can detect leaks early using analytics.
Comparing benefits with customer needs it can be seen that all requirements were
fulfilled.
Table 1.8: Performance analysis
Test Result
Test Ultrasonic sensor Water Level updated regularly (15 s)
Valve operates when water level drops below set
Test Valve range (15 cm)
Works well under low pressure, leaking when
Testing for leaking using tap water input (high pressure).
1.4 INNOVATION
Installing WMS can replace up to 50% of daily water usage as it is estimated that only
10% of total water consumption requires drinking quality water. Average Malaysian
household pays around 14-17 RM for water bill, if we save only 50% per month (8
RM), then by 10 years the system would have paid for its value.
Table 1.9: Comparison with similar products
Developed
Features Voda[16] Monier[17] Wastech[18] Aura-lite[19] DDtechniche[20] EcoOutdoor[21] BacFree[22] EcoClean[23]
prototype
Tank
Filtering
Pump
1st Flush
diverter
Leaf
Filter
Data
Analytics
1.6 ACKNOWLEDGEMENT
1. Chung, E.,(2018), This Is How Much Water Malaysians Waste Every Day, SAYS,
Article [online], Retrieved from: https://says.com/my/lifestyle/world-water-day-
malaysians-waste-water.
2. EPA, (January, 2013), Rainwater Harvesting, Article [online], Retrieved from:
https://www.epa.gov/sites/production/files/2015-11/documents/rainharvesting.pdf
3. EPA,(Nov, 2018), Statistics and Facts, Article [online], Retrieved from:
https://www.epa.gov/watersense/statistics-and-facts
4. Fewkes, A. (2012). A review of rainwater harvesting in the UK. Structural Survey,
30(2), 174-194.
5. Hammerstrom, J., Pushard, D., (2016), Is Rainwater Harvesting a Good Investment,
HarvestH2o, Article [online], Retrieved from:
http://www.harvesth2o.com/Is_RWH_a_good_investment.shtml#idc-cover
6. Kua, K. S.,(2019), Water Crisis At The Price of Populism, The Star Online, Retrieved
from: https://www.thestar.com.my/news/nation/2019/07/28/water-crisis--the-price-of-
populism
7. Lani, N. H. M., Syafiuddin, A., & Yusop, Z. (2018, September). Comparison of Cost
Benefits of New Installation and Retrofitted Rainwater Harvesting Systems for
Commercial Buildings. In International Conference on Urban Drainage Modelling
(pp. 169-174). Springer, Cham.
8. Laura, N., (2017), How People Are Resolving To Reduce Water Scarcity, Article
[online], Retrieved from: https://www.waterlogicaustralia.com.au/blog/reduce-water-
scarcity/
9. Monash University, (2018), Quest to Solve Water Scarcity, Article [online], Retrieved
from: https://www.monash.edu.my/research/researchers-say/quest-to-solve-water-
scarce
10. Rajboot, S.,(2019), Importance of Rainwater Harvesting In Today’s Age, Youth Ki
Awaaz, Article [online], Retrieved from:
https://www.youthkiawaaz.com/2019/05/water-harvesting-conservation-techniques-
to-be-applied-in-buildings-for-sustainability/
11. Saad, F.,(n.d.), Real Cost of Water, Focus Malaysia Issue 268, Retrieved from:
http://www.focusmalaysia.my/Mainstream/real-cost-of-water
12. SPAN,(n.d.), Water Tariff, Article [online], Retrieved from:
https://www.span.gov.my/document/upload/AtBz79IrBNcxpXRh9R2SXYAcr1cAZ5
oK.pdf
13. The Economic Times,(2019), ET View: A Looming Water Crisis, Article[online],
Retrieved from: https://economictimes.indiatimes.com/opinion/et-view/et-view-a-
looming-water-crisis/articleshow/69906497.cms?from=mdr
14. WHO,(2019), Drinking Water, Article [online], Retrieved from:
https://www.who.int/news-room/fact-sheets/detail/drinking-water.
15. Wonderful Malaysia,(n.d.), Article, Retreived from:
http://www.wonderfulmalaysia.com/faq/monsoon-in-malaysia.htm.
16. Voda Rain Water Harvesting System, Online, Retrieved from:
http://vodarainwaterharvesting.com/
17. Monier Rain Water Harvesting System, Online, Retrieved from:
https://www.monier.com.my/product/monierr-solarroof-tm-system/monier-rainwater-
harvesting-system.html
18. Wastech Rain Water Harvesting System, Online, Retrieved from:
https://wastech.com.my/rain-water-harvesting-system-malaysia/Voda Rain Water
Harvesting System, Online, Retrieved from: http://vodarainwaterharvesting.com/
19. Aura-Lite Rain Water Harvesting System, Online, Retrieved from: https://aura-
lite.com.my/catalogue/
20. DDtechniche Rain Water Harvesting System, Online, Retrieved from:
https://ddtechniche.com/product-category/rainwater-harvesting-tanks/
21. EcoOutdoor Rain Water Harvesting System, Online, Retrieved from:
https://www.ecooutdoor.com.my/rainwater-harvesting/
22. BacFree Rain Water Harvesting System, Online, Retrieved from:
https://bacfree.com.my/professional/rwhs/
23. EcoClean Rain Water Harvesting System, Online, Retrieved from:
http://www.ecoclean.com.my/tech-rainwater-harvesting.php
24. ElecFreaks, (n.d), Ultrasonic Ranging Module HC - SR04, Online, Retrieved from:
https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf
25. HoppyElectronics,(2019), YF-S201 Hall Effect Water Flow Meter / Sensor , Online,
Retrieved from : http://www.hobbytronics.co.uk/yf-s201-water-flow-meter
26. Handson Technology,(n.d), ESP8266 NodeMCU WiFi Devkit, Online, Retrieved from:
https://www.handsontec.com/pdf_learn/esp8266-V10.pdf
Interview Script Appendix 1
1st Interview
Interviewee: Dr. Kamaluddin,
Interviewer(s): Aly, Irfan
Date: 23/ Sept. / 2019
Q: What are the problems the school is facing when it comes to water management?
A: The main problem not just for the school is that the utility bill is very high.
Q: In your opinion can this solution help solve the water wastage problem completely?
A: If we can implement it across the campus it will save a lot of money, we try to solve the problem
to the best of our ability but we still cannot ignore the human factor like irresponsible water usage for
example leaving tap water open.
Q: What are the improvements that you would like to see by implementing such a system?
A: Our main aim is to reduce water usage, which will reduce total bill cost. This saved money can be
used to help the university and students.
Q: What features would you like to have in the water monitoring system?
A: 1st we need to study how much is the capacity of the tank, so that it can store enough water to be
used for aquaponics, gardening and cleaning. Also we should be able to monitor water level in the
tank. Lastly the system preferably should be a hybrid system, so when water in the tank reaches a
certain level the system switches to local water supply.
Q: What do you think are the major causes for water wastage?
A: From my observation, I can say the way how we use the water for example the toilet; some people
just leave it open and that’s a small case. But if you go around the campus you will notice some
leakage and also there is underground water leakage. For underground water leakage we cannot notice
with our own eyes but if you go to P08 building you will notice that the drain is always having water
flowing even when there has been no rain for a while.
Q: Dr. Kamal proposed rain harvesting as a solution to the problem, why that system was chosen?
A: Why not? fixing leakages especially underground water leakage will be costly and will take quite
some time. Rain harvesting is a simple and short solution, I’ve already seen many schools, and
government offices have already started rain harvesting and already seen the benefit of it.
Q: Would it be possible to use the water for sanitary toilet usage (not for drinking)?
A: I think for your rain harvesting system there will be; I hope; a simple filtering system that will
make it safe for washing hands and cleaning.
Q: Do you think the cost of running and maintaining the project will be offset by the saved water
cost?
A: Well for starter the system is using low voltage to run controllers which can be covered by using a
substitute electric source like solar. Another point, this system is our first time so the project can be
considered as a study to see the impact of such system; we have high hopes that it will reduce our
water bill. For maintenance and improvement we hope that the future batches can maintain and even
improve the system.
Observation Script
Profile
• Age 28+
• High management position.
• Knowledgeable, technical background.
• Critical thinker.
• Concerned about their community.
• Keen on solving problems
Pain Points
• High water bill cost.
• Water wastage on cleaning and irrigation
• Leakage and damaged piping.
Needs
• Lower bill cost.
• Monitor water level in tank.
• Hybrid system with automatic control.
• Monitor water flow from tank and from irrigation and cleaning taps.
Design Statement
Question:-
How we may help Mr. Kamaluddin reduce bill cost and monitor water usage?
Week
No Task
2 3 4 5 6 7 8 9 10 11 12 13 14
Introduction of
Capstone Project
1
and CDIO
framework
Interview script
2 and interview
session
Personification,
design statement
3
and prototype
design
Brainstorming
4
system design
Create design
5 and prototype
development
Prototype
6
presentation
Purchasing
7
Materials
Engineering
8 design and
drawing
Circuit design
9 and
implementation
Programming
10 (coding, testing
and debugging)
3D printing and
11 hardware
development
Model design
12
and development
Implementation
13
and testing
14 Finalization
Report writing
15
and submission
BOM Appendix 5
Quantit
No. Date item Cost total
y
1 Flow Meter Sensor 4 9.88 39.52
2 12V solenoid Valve 1 9.42 9.42
3 Shipping cost 1 3.8 3.8
#include <ESP8266WiFi.h>;
#include <WiFiClient.h>;
#include <ESP8266HTTPClient.h>;
#ifdef THINGSPEAK
#include <ThingSpeak.h>;
const char* writeAPIKey = THINGSPEAK_API_KEY;
#endif
// Wifi information
const char* ssid = WIFI_SSID;
const char* password = WIFI_PASSWORD;
WiFiClient client;
HTTPClient http;
void print_value() {
Serial.print("Q1 = ");
Serial.print(Q1);
Serial.print(" V1 = ");
Serial.print(volume1);
Serial.print(" Q2 = ");
Serial.print(Q2);
Serial.print(" V2 = ");
Serial.print(volume2);
Serial.print(" Q3 = ");
Serial.print(Q3);
Serial.print(" V3 = ");
Serial.print(volume3);
Serial.print(" Q4 = ");
Serial.print(Q4);
Serial.print(" V4 = ");
Serial.print(volume4);
Serial.print(" level = ");
Serial.print(distance);
Serial.println();
}
// U
void flow_sensor() {
flow_and_volume(pulse1, volume1);
Q1 = Q;
volume1 = volume;
pulse1 = 0;
flow_and_volume(pulse2, volume2);
Q2 = Q;
volume2 = volume;
pulse2 = 0;
flow_and_volume(pulse3, volume3);
Q3 = Q;
volume3 = volume;
pulse3 = 0;
flow_and_volume(pulse4, volume4);
Q4 = Q;
volume4 = volume;
pulse4 = 0;
void level_sensor() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
pulseTime = pulseIn(echoPin, HIGH);
distance = 37 - pulseTime * 0.0343 / 2.0;
}
void control_valve() {
if (distance > 15) {
digitalWrite(valve, HIGH);
}
else {
digitalWrite(valve, LOW);
}
}
void wifiConnect()
{
// Connect to the network
WiFi.begin(ssid, password);
WiFi.setAutoReconnect(true);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
Serial.print("Connecting to ");
Serial.print(ssid); Serial.println(" ...");
#ifdef NO_BLOCKING
Serial.println("Let it connect itself.");
#else
int teller = 0;
// Wait for the Wi-Fi to connect
while (WiFi.status() != WL_CONNECTED)
{
delay(1000);
Serial.print(++teller); Serial.print(' ');
}
Serial.println('\n');
Serial.println("Connection established!");
// Send the IP address of the ESP8266 to the computer
Serial.print("IP address:\t");
Serial.println(WiFi.localIP());
#endif
}
void send_to_net() {
#ifdef THINGSPEAK
Serial.println("Sending Thingspeak...");
ThingSpeak.setField(1, Q1);
ThingSpeak.setField(2, Q2);
ThingSpeak.setField(3, Q3);
ThingSpeak.setField(4, distance);
ThingSpeak.setField(5, hybridflow);
ThingSpeak.setField(6, costSaved);
ThingSpeak.writeFields(channelNumber, writeAPIKey);
Serial.println("Updated to Thingspeak.");
#endif
// Send data in JSON format to HTTP
#ifdef LOCAL_WIFI
Serial.println("Sending to local...");
http.begin(address);
http.addHeader("Content-Type", "application/json");
String data = "{\"value\":";
data += hybridflow;
data += "}";
int httpCode = http.POST(data);
String payload = http.getString();
Serial.println(httpCode);
Serial.println(payload);
http.end();
Serial.print("*");
delay(200);
http.begin(address2);
http.addHeader("Content-Type", "application/json");
String data2 = "{\"value\":";
data2 += costSaved;
data2 += "}";
httpCode = http.POST(data2);
payload = http.getString();
Serial.println(httpCode);
Serial.println(payload);
http.end();
Serial.println("Updated to local.");
#endif
Serial.println();
}
void setup() {
// Initialize everything
Serial.begin(9600);
pinMode(echoPin, INPUT);
pinMode(trigPin, OUTPUT);
pinMode(valve, OUTPUT);
attachInterrupt(digitalPinToInterrupt(flowrate1), flow1, RISING);
attachInterrupt(digitalPinToInterrupt(flowrate2), flow2, RISING);
attachInterrupt(digitalPinToInterrupt(flowrate3), flow3, RISING);
attachInterrupt(digitalPinToInterrupt(flowrate4), flow4, RISING);
delay(10);
wifiConnect();
#ifdef THINGSPEAK
ThingSpeak.begin(client);
#endif
}
void loop() {
t = millis();
// Update every 15 seconds
if (t - to > 15000) {
flow_sensor();
level_sensor();
control_valve();
print_value();
send_to_net();
to = t;
}
}
Appendix 7
TurnItIn Report