Hapsa Final Project
Hapsa Final Project
Hapsa Final Project
(ICT)
i
THE MWALIMU NYERERE MEMORIAL ACADEMY
(ICT)
(ICT)
Submission date
31/03/2021
ii
PROJECT TITLE
Project type:
Hardware Project
Project category:
iii
DECLARATION
I HAPSA AHMED GHARIB declare that the project work entitled LORA BASWED
Mr. MUHAMMAD KASSIM and this report are submitted in the partial fulfillment of the
required diploma in information communication technology and that it has not been prepared to
any other University or higher learning Institutions for a similar or any other Diploma program.
Date: ………………………………………………
Date: ……………………………………………
iv
ABSTRACT
Water is the basic need of life. Our daily water supply is through water tanks and dams which are
constructed to store water for future usage. From there water crosses many stages through pipes
to reach our homes. Lora based domestic water meter system is proposed to monitor water
quantity, distribution, usage by either opening or closing a within a pipeline and measuring the
quantity (volume) of water that passes through a pipe or other outlet. Lora based domestic water
meter system consists of motorized valve, Lora node and getaway for provide communication for
a long range. The project involves literature review, proposed system and data collection. Data
were collected from Zanzibar Water authority through observation, and visiting sources of
Data analysis designing of the system, implementation and testing the prototype will be done in
v
ACKNOWLEDGMENT
First of all, I would like to send my gratitude to the almighty Allah (S.W) who enables me to
complete my report project, and give me good health and good condition and be able to stay well
Secondly, I should like to thanks my collage which is THE MWALIM NYERERE MEMORIAL
ACADEMY (MNMA). This collage boosts me to be confident and focusing on what I want I
will success.
Thirdly, Special thanks to my supervisor Mr. Muhamad Kassim who plays an important role to
By the way also I thank my family to help me and bringing up me well and most of all they are
more supporters to me, they are paying fee for me to proceed my knowledge at collage so they
and my fellow students thanks to you all for all good and bed.
i
TABLE OF CONTENT
DECLARATION..........................................................................................................................iv
ACKNOWLEDGMENT................................................................................................................i
LIST OF TABLES........................................................................................................................vi
CHAPTER ONE............................................................................................................................1
1.1. Introduction...........................................................................................................................1
CHAPTER THREE....................................................................................................................10
ii
4.1 Feasibility Study...................................................................................................................12
CHAPTER FIVE.........................................................................................................................27
6.0Prototype Implementation.....................................................................................................29
CHAPTER SEVEN.....................................................................................................................33
7.1 Summary..............................................................................................................................33
7.2 Challenge..............................................................................................................................33
7.3 Achievements.......................................................................................................................34
7.4 Recommendation..................................................................................................................34
iii
7.5 Conclusion............................................................................................................................34
iv
LIST OF ABBREVIATIONS
v
LIST OF TABLES
vi
LIST OF FIGURES / DIAGRAM
Figure 3...........................................................................................................................................5
vii
Figure 4: show how to cut structure of project............................................................................11
Figure 12: show flowchart of Lora based domestic water meter system....................................24
viii
CHAPTER ONE
1.1. Introduction
Currently, ZAWA used manual method to manage water billing. With this manual method, a
customer is required to submit water fee monthly based on the reading of his/her manual water
meter before an attendant from ZAWA come to cut the water supply pipe.
Water is the basic need of life. Our daily water supply is through water tanks and dams which are
constructed to store water for future usage. From there water crosses many stages through pipes
to reach our homes. The aim Lora based domestic water meter system is to monitor water
quantity, distribution.
Usage by either opening or closing a within a pipeline and measuring the quantity (volume)
of water that passes through a pipe or other outlet. Lora node is a new type of wireless
connectivity used for long-range transmission, the proposed work for any area. The main aim of
the Lora is to target the internet of things IOT requirement and also communication.
Lora devices have revolutionized IOT by enabling data communication over a long range while
using very little power, gateways are routers equipped with a Lora concentrator, allowing them
to receive Lora packets, Lora is flexible for rural, smart cities, smart homes and buildings, smart
agriculture also motorized control valve this device also well be used to design the project that
has function to allow for flow to be stopped, started, and adjusted as necessary to ensure that
operations continue as scheduled, when the valve is open, liquid is able to pass through freely
nearly with water flow sensor , water flow sensor are installed at the water source or pipes to
1
measure the rate of flow of water and calculate the amount of water flowed through the pipe.
Existing domestic water meter system was done manually where the owner who deal with
opening and close water must go in the pipeline to opening or block water and checking the
amount of water that customer used, this process is cost time, some of customer after block the
do unblock without any permission, also there is not communication or signal that identify
customer used water without bill but Lora based domestic water meter block and open water
automatically and signal to the central system this because there will be with Lora node wireless
connectivity used for long-range transmission, and gateways are routers equipped with
Existing system there is so many problems. The following are the problems of existing system as
follow,
This is problem that occurs if the customer does not pay the bills on time it will lead to
nonpayment on time for non-disconnection of water for seeing that they will not pay their bills
on time if they see that they are getting the water services.
Time consumption.
Occurs in process of going to cutting the water service of customer hey leave the office work and
do that process for lead dialogue in process and finally the customer pay half bills and release the
water services.
2
Corruption.
There some money that services provider is given money and lead delay to cutting the water
Impracticability.
Occurs if their services provided and customer, they are best friend so it leads to the customer
From the above problem I will design a system of Lora based domestic water meter system
which is going to block and open water flow meter automatic system and this proposed system
STSTEM
3
Components of the block diagram
A power supply is an electrical device that supplies electric power to an electrical load. The
primary function of a power supply is to convert electric current from a source to the
correct voltage, current, and frequency to power the load. As a result, power supplies are
Allow for flow to be stopped, started, and adjusted as necessary to ensure that operations
continue as scheduled. Motorized control valves work to control flow by either opening or
closing an opening within a pipeline. When the valve is open, liquid is able to pass through
freely.
New type of wireless connectivity used for long-range transmission; Lora devices have
Measure the rate of flow of water and calculate the amount of water flowed through the pipe.
v. LCD display
Is a flat panel display or other electronically modulated optical device that uses the light
screen.
4
vi. Lora Gateway
Routers equipped with a Lora concentrator, allowing them to receive Lora packets,
CLOUD
STREET
STREET
B
A
5
STREET
C
1.5. Literature Review.
This chapter explains on the different projects done previously with their strength and
weaknesses, it also explains much on my proposed system (Lora based domestic water meter
system) its weaknesses, strength and technology that will be used to design my project.
Advantages
They design system to management of meter a home that is important device that measures the
amount of water consumed by householders who have the device fitted within their premises.
Water conservation is a big issue in many apartments. A common meter is fitted and cumulative
consumption amount is shared among households where they are being charged more than what
is to be paid. There is several ideas to overcome this issue the devices that can communicate and
network with each other and with the environment by exchanging information via the internet
with or without human intervention that measures the amount of water consumption in a building
or home.
This system used to monitor meter and calculate the bill of a customer after that give the bill for
paid of consumption for customer at home and office of water that are used without blocking
they give customer freedom of used water without pay and cause to accursed the bill
6
Figure 3 show smart water meter home and office meter system
7
CHAPTER TWO
This chapter going to explain the main goal of objectives in case of main objectives and specific
The main objective of this project is to design Lora based domestic water meter system that
block and pen flow of water to customer automatically after pay the bill and measure usage
• Interface water flow sensor with microcontroller for measure the usage of customer.
• Interface motorized valve with microcontroller for block and open water services.
• Install and consumption getaway through internet for equipped with a Lora concentrator,
• Design system interface that will enable operator to interrupt with user device
This system is very important because it monitors the amount of water that is imported and
8
These services will enable water users to get reliable communication if they pay on time as soon
It saves time.
This service saves time when ZAWA employees go to out and pick up customers for payment.
Through the service staff will lock water users through the system without following
Reduce corruption.
This service is important because most of them accept bribes from customers to continue with
the water service. Through the services will not pay bribes if they are alleged to be blocked
People will no longer steal the water of the ZAWA everyone will use his water according to
This system has many obstacles that lead to losses in society. Among the disadvantages hat are
The system can operate in the presence of electricity because there are some components
This system can used for bill of water using smart phone or any computing device that customer
can be used for the purpose of billing and communicate with organization.
9
CHAPTER THREE
This chapter explains the steps and procedures which have been used in order to achieve the
i. Literature review.
Literature review
It describes the details and important thing in existing manual water meter system and their
advantages and disadvantages. It also explains the idea of the proposed system with the
corresponding advantages. This part has been accomplished through reading relevant books,
surfing the internet and consulting my supervisor, lectures and other experts.
Data Collection
In this part all necessary and relevant information which are required to collect have been
demonstrated in detail. The best selection of components will be done according to the collected
data. The lists of the collected data have been well shown in chapter four.
Data Analysis
In this part, different types and numerical values of the system components have been selection
10
Project design
In this part, different designed has been conducted in order to accomplish the project by
designing and interconnect all relevant components such as connect wire, relay switch and opt
In this part, different parts of the system have been interconnecting. The interconnection is done
in simulation tools first, before hardware implementation. If the system works well when
simulated, then the hardware interconnection has been done in the Printed circuit board PCB.
11
CHAPTER FOUR
Feasibility study can be considered as preliminary investigation that helps the management to
take a decision about whether the study of system should be feasible for development or not. In
this section explains more successful project in economic feasibility, technical, legal and social.
Economic feasibility study: during the planning phase you should be plan benefit and cost of a
system you want to develop, so I develop a new system the main aim of this system to design
Lora based domestic water meter system, like Lora node and motorized valve. I develop this
system which has high cost compare existing system because this system contains hardware and
software. Also this system has high number of hardware requirements. After accomplish to
develop this system increase my knowledge and new idea thought this system. It is beneficial in
economic when sale this project for home and other local area.
Technical feasibility study: I take this chance to use my techniques to interface this system for
now day new technology every day expand so I interface this system from low level to high new
technology does not mean that I complete to interface this project there is another developer will
come to interface this project to move another level. Also during this project I have been going to
use all technical in order to success my project like asking of people who have experience about
Legal feasibility study: This project in legal there is no any obstacle to develop this system
without the permission of Zanzibar water Authority because some of data cannot have ability to
12
get without their permission not only that but also this Authority are under control of
government.
In social this project has been going to solve problem of reduce water billing and helping ZAWA
workers cut off water automatic without to going to cut their pipes
In this part all necessary and relevant information which are required to be collected would be
demonstrated in detail. The best selection of components will be done according to the collected
data. The data collected in a preliminary stage is aimed to demonstrate the existence of the
problem and fig out the general requirement for proposed system.
This chapter shows the data collection that acts as a guide towards designed of the system. These
have been done through the studying the existing systems for reading books, surfing the internet
and consulting the experts for more technical data. It comprises of preliminary data collection
that can lead us to a technical data specification during the next part of this project.
The Data collected in a preliminary stage is aimed to demonstrate the existence of the problem
This chapter describes about the data collection. I was collected data from deferent system.
Observation
I observed that take time to discover they are leaking pipes of water that is transmitting in
customer. The operators of the system were initially taking the time o discover and difficult to
13
knowing where pipe of water are leak and cause water stagnation in people stress and cause the
I observed that incomplete payment of bill due to the process of cutting water meter they are
some negotiations and pay half bills and leading to existence of large bill into other month. In the
original system that there is dialogue between the user and water services provides when they
come to terminate the water services due to deployment at a time and lead to increase in debt and
cause decrease the money for driving their system through decision of customer used water
And also it lead to customer to paying the bill with time to get the water service without
interference of services provided at any time if the customer want to consumption the water
14
Technical
During data collection the data were collected from the following sites by observation.
At Zanzibar Water Authority (ZAWA). The following are application they have received each
In this part different types and numerical values of the system components has been obtained by
mathematical calculations basing on the collected data. Before complete my project, I was
system. This system contains Motorized valves work to control flow by either opening or closing
an opening within a pipeline. When the valve is open, liquid is able to pass through freely,
15
Water flow sensor Measure the rate of flow of water and calculate the amount of water flowed
through the pipe. Rate of flow of water is measured as liters per hour or cubic meters, Lora Node
used for long-range transmission; Lora devices have revolutionized IOT by enabling data
communication over a long range, and also we have Relay that electrically operated switch that
can be turned on or off, letting the current go through or not, and can be controlled with low
power supply
microcontroller unit
motorized valve
16
LCD display
Lora node
Lora getaway
Lora node
New type of wireless connectivity used for long-range transmission; Lora devices have
The Lora modem allows changing of the transmission power from 2dBm to 14dBm (433
915 MHz, and 923 MHz) as per the regulations of each country.
Lora’s high range is characterized by high wireless link budgets of around 155 dB to 170
dB.
Motorized Valve
Allow for flow to be stopped, started, and adjusted as necessary to ensure that operations
continue as scheduled. Motorized control valves work to control flow by either opening or
17
closing an opening within a pipeline. When the valve is open, liquid is able to pass through
freely.
Measure the rate of flow of water and calculate the amount of water flowed through the pipe.
Battery Exclude
18
Interface Dimensions G½Inch
Frequency F=(11*Q)Q=L/MIN±3%
Level DC5V)
Level DC5V)
Cycle
19
Figure 9: show motorized valve
Relay switch
Relay Is an electrically operated switch that can be turned on or off, letting the current go
through or not, and can be controlled with low voltages, like the 5V provided by the Lora
node pins
Specification of Relay
20
Dimensions 27mm x 34mm [1.063in x 1.338in]
OLED
OLED (Organic Light Emitting Diodes) is a flat light emitting technology, made by placing a
series of organic thin films between two conductors. When electrical current is applied, a bright
light is emitted. OLEDs are emissive displays that do not require a backlight and so are thinner
and more efficient than LCD displays (which do require a white backlight).
Specifications:
Driver IC SSD1306.
21
Figure 11: show OLED display
SOFTWARE CONSIDERATION
Software is a Computer program orinstructions that execute to provide the desired operation,
function and performance. Software should be written in such a way that it may evolve to meet
the changing needs of the users; it should not make wasteful use of system resources such as
The software development environments (IDEs) used during the course of this project are listed
22
Effective analysis: With the help of flowchart, problem can be analyzed in more
effective way.
all concerned.
Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis
Here is a flow chart which summarized all tasks performed in Lora based domestic water meter
system
23
Figure 12: show flowchart of Lora based domestic water meter system
possible tasks, events, or actions are intended to take place to finish the project within a given
period.
24
Weeks
activities 1 2 3 4 5 6 7 8 9 10
project
proposal
Planning
Analysis
report
needed to complete my system, to find some of the information for the purpose of completing
this project at a time and to get the solution of an existing system which was used in the water
authorities and other distributors. And also cost that use for buying hardware tools
25
s/no
26
CHAPTER FIVE
This chapter describes how the testing was carried out and what found from the test. The testing
carried out through the simulation software leads to the achievement of the project.
The project archived by interfacing various electronic components to the TTGO Lora board. The
interface of various components archived by using the open source software called FRITZING.
27
The project connection done through computer software, after connection of my components and
28
CHAPTER SIX
6.0Prototype Implementation
This chapter contains the implementation of the system, that is, the procedures carried out in the
construction of the system in order to accomplish the aim of the project which is design and
construction of an enhanced biometric system. It also includes the testing of the various modules
of the system in different conditions to test the functionality and reliability of the system.
The implementation of this project was based on the system design from starting point until the
ending of the project while designing the prototype I passed through different steps, those
an acrylic material as an example of place where parking place can be used, also by put a
metallic black paper as the road. Design of parking symbols as well as zebra symbols in
29
Components soldering: various components were solid to the main board the soldering
was done by using gun and solder wire after the design the second thing is to attach
components and soldering it so as to bond metal work pieces. It supplies heat to melt
solder so that it can flow into the joint between two work pieces.
Circuit attachment: it was transferred to the structure after soldering the wires the
next part it was to interconnect different parts in a circuit board those components that
were connected to a circuit board includes Lora node with relay switch, motorized valve
30
Figure 16: show circuit attachments
Powering a system: after the attachments of a circuit in a broad board the next step was
to power a system so that to know if a system works properly or errors appears. Therefore
after powering a system it work properly without any errors but after several minutes it is
unable to work.
Testing: after the powering a system, a system work properly at a night also at the
Debugging: debug some few error the next step after testing and ensure that there is
error is to debug so as to make a system to work properly and free from errors.
31
6.2 Results and Discussion
After connection of my components and testing through computer the next step was to test in
reality at the first time errors were appeared and after identified the problem then errors were
32
CHAPTER SEVEN
In this chapter explain the recommendation, conclusion and summary of each chapter from the
7.1 Summary
As far as project is concerned, all the relevant chapters have been completed, this includes;
Chapter one which introduces the project, the problem of an existing system was clearly
provided.
Chapter two prevailed step by step approach that was used to achieve the main objective of this
project and specific objectives, significance and limitation and future scope.
Chapter four discusses the data collection and analysis with the general system design and
selected of components and tools procedures so as to achieve the efficient system design.
Chapter five discusses the simulation and results of the implementation design
Chapter six there is prototype implementation procedures and results on designing a system
Chapter seven discusses the recommendation, conclusion and the goals for achievements of a
system
7.2 Challenge
During the design and implementation on my system was faced many challenge that happen,
33
Time consuming for preparation
7.3 Achievements
I have been able to design Lora based domestic water meter system whereby using
microcontrollers programmed and make control water flow sensor and motorized valve.
7.4 Recommendation
students of ICT department were get all acquired material in order to ensure that were complete
Second is to ensure that all students were get full practice and acquired skills for hardware.
7.5 Conclusion
This chapter focuses on the findings of this Project study. The entire project deals with the
implementation of Lora based domestic water meter system. It comprises of the project
34
REFERRENCES
Wireless middleware solutions for smart water metering.sensors,19(8), 1853. retrieved from
https://www.mdpi.com/1424-8220/19/8/1853.
Barnes, j.w. (1994).statistical analysis for engineers and sci-entists: a computer-based approach.
Chen, y., &han, d. (2018). water quality monitoring in smartcity: a pilot project.elsevier science
Amit Bhimte, Rohit K.Mathew, Kumaravel S,“Development of smart energy meter in labview
H. Arasteh, V. Hosseinnezhad, V.Loia, A.Tommasetti,O.Troisi, M.S hafie Khan, P.Siano, “IoT Based
35
APPENDICES
#include <SPI.h>
#include <LoRa.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCK 5
#define MISO 19
#define MOSI 27
#define SS 18
#define RST 14
36
#define DIO0 26
//OLED pins
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RST 16
//packet packet_counter
#define LED_BUILTIN 16
#define SENSOR 23
37
//pins used for relay
#define offRelay 17
#define onRelay 25
long currentMillis = 0;
long previousMillis = 0;
byte pulse1Sec = 0;
38
float flowRate;
float flowLitres;
float totalLitres;
String lora_data;
void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
39
pinMode(onRelay, OUTPUT);
pinMode(offRelay, OUTPUT);
pinMode(SENSOR ,INPUT_PULLUP);
LOCKUSER();
pinMode(OLED_RST, OUTPUT);
digitalWrite(OLED_RST, LOW);
delay(20);
digitalWrite(OLED_RST, HIGH);
//initialize OLED
Wire.begin(OLED_SDA, OLED_SCL);
40
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.display();
if (!LoRa.begin(BAND)) {
41
while (1);
display.setCursor(0,10);
display.display();
delay(2000);
pulseCount = 0;
flowRate = 0.0;
flowMilliLitres = 0;
totalMilliLitres = 0;
previousMillis = 0;
oldtime=millis();
UNLOCKUSER();
42
void loop()
float X,Z;
boolean Y;
nowtime = millis();
Z= readVolume();
X= totalLitres;
do
Y = sendData(X,Z);
while(!Y);
Y=0;
oldtime=nowtime;
43
}
float readVolume()
pulse1Sec = pulseCount;
pulseCount = 0;
previousMillis = millis();
totalMilliLitres += flowMilliLitres;
totalLitres += flowLitres;
return flowLitres;
44
// Print the flow rate for this second in litres / minute
Serial.print(float(flowRate));
Serial.print("L/min");
Serial.print("\t");
String Data=String(userID)+'/'+String(vol,4)+'&'+String(rate,4);
LoRa.beginPacket();
LoRa.print(Data);
LoRa.endPacket();
delay(2000);
if(parcketSize==2)
45
{
while(LoRa.available())
lora_data=LoRa.readString();
Serial.println(lora_data);
if(lora_data=="OK")
Data="";
return 1;
else
return 0;
else
46
{
return 0;
boolean readCommand()
if(parcketSize==4){
while(LoRa.available())
lora_data=LoRa.readString();
Serial.println(lora_data);
if(lora_data=="LOCK"){
LOCKUSER();
return 1;
47
}
else if(parcketSize==6){
while(LoRa.available())
lora_data=LoRa.readString();
Serial.println(lora_data);
if(lora_data=="UNLOCK"){
UNLOCKUSER();
return 1;
else
return 0;
48
}
void pulseCounter()
pulseCount++;
void LOCKUSER()
digitalWrite(onRelay,HIGH);
digitalWrite(offRelay,LOW);
delay(switchingTime);
digitalWrite(onRelay,LOW);
digitalWrite(offRelay,LOW);
49
void UNLOCKUSER()
digitalWrite(onRelay,LOW);
digitalWrite(offRelay,HIGH);
delay(switchingTime);
digitalWrite(onRelay,LOW);
digitalWrite(offRelay,LOW);
50
LORA GETWAY RECEIVER
#include <SPI.h>
#include <LoRa.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCK 5
#define MISO 19
#define MOSI 27
#define SS 18
#define RST 14
#define DIO0 26
51
//433E6 for Asia
//OLED pins
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RST 16
String LoRa_Data;
String userID;
String volume;
52
String flowRate;
void setup() {
Serial.begin(115200);
pinMode(OLED_RST, OUTPUT);
digitalWrite(OLED_RST, LOW);
delay(20);
digitalWrite(OLED_RST, HIGH);
//initialize OLED
Wire.begin(OLED_SDA, OLED_SCL);
128x32
53
}
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.display();
if (!LoRa.begin(BAND)) {
54
Serial.println("Starting LoRa failed!");
while (1);
display.setCursor(0,10);
display.display();
void loop() {
if (packetSize) {
//received a packet
//read packet
while (LoRa.available()) {
LoRa_Data = LoRa.readString();
55
extractData(LoRa_Data);
Serial.print(LoRa_Data);
Serial.println(rssi);
// Dsiplay information
display.clearDisplay();
display.setCursor(0,0);
display.setCursor(0,20);
display.print("USER ID:");
display.print(userID);
display.setCursor(0,30);
56
display.print("FLOW RATE:");
display.print(flowRate);
display.setCursor(0,40);
display.print("VOLUME:");
display.print(volume);
display.setCursor(0,50);
display.print("----------*----------");
display.display();
////////////////////////////////////////////////////////////
57
userID = LoRa_Data.substring(0, pos1);
////////////////////////////////////////////////////////////
58