Hapsa Final Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 71

THE MWALIMU NYERERE MEMORIAL ACADEMY (MNMA)

KARUME CAMPUS ZANZIBAR

DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY

(ICT)

ORDINARY DIPLOMA IN INFORMATION AND COMMUNICATION

Candidate Reg. No: MNMA/ODZ.ICT/0030/2020

Candidate Name: HAPSA AHMED GHARIB

Project Title: LORA BASED DOMESTIC WATER METER SYSTEM

Academic Year 2021

i
THE MWALIMU NYERERE MEMORIAL ACADEMY

KARUME CAMPUS ZANZIBAR

DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY

(ICT)

ORDINARY DIPLOMA IN INFORMATION AND COMMUNICATION TECHNOLOGY

(ICT)

Project Code: ITT 06105

Project Name: Project Proposal

Candidate Reg. No MNMA/ODZ.ICT/0030/2020

Candidate Name: Hapsa Ahmed Gharib

Academic Year: 2020/2021

Submission date

31/03/2021

ii
PROJECT TITLE

Title of the project:

LORA BASED DOMESTIC WATER METER SYSTEM

Project type:

Hardware Project

Project category:

Problem Solving Type

iii
DECLARATION

I HAPSA AHMED GHARIB declare that the project work entitled LORA BASWED

DOMESTIC WATER METER SYSTEM submitted to (THE MWALIMU NYERERE

MEMORIAL ACADEMY) is a record of an original work done by me under the guidance of

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.

Student’s Signature: ….…………………………………….

Date: ………………………………………………

Supervisor’s Name: …………………………………………………

Supervisor’s Signature: …………………………................

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

water like tank of SAATENI.

Data analysis designing of the system, implementation and testing the prototype will be done in

my project that will be conducted through the second semester

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

during the whole period of preparation of report

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

direct and supervise me well up to the end my project.

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

are most important to me.

In generally, I provide my thankful to Allah, my collage (MNMA), my supervisors, my family

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

LIST OF FIGURES / DIAGRAM..............................................................................................vii

CHAPTER ONE............................................................................................................................1

1.1. Introduction...........................................................................................................................1

1.2 Background of the project......................................................................................................2

1.3 Problem of existing system....................................................................................................2

1.5. Literature Review..................................................................................................................6

Disadvantage of this project.........................................................................................................6

2.0. The main and specific objectives...........................................................................................8

2.1. Main objective...................................................................................................................8

2.2. Specific objectives.................................................................................................................8

2.3 Significance of the project......................................................................................................8

2.4 limitations of the project.........................................................................................................9

2.5 Scope of the project...........................................................................................................9

CHAPTER THREE....................................................................................................................10

3.1 Methodology Used in System Design and Implementation.................................................10

4.0 Data Collections and Data Analysis.....................................................................................12

ii
4.1 Feasibility Study...................................................................................................................12

4.2 Data Collection.....................................................................................................................13

4.3 Data Analysis.......................................................................................................................15

4.4 General System Design........................................................................................................15

4.4.0: Selection of Components and Tools..........................................................................16

4.4 1: Hardware components.............................................................................................16

4.5 Design Algorithm Presentation............................................................................................22

4.6 Time Frame of the Project....................................................................................................24

4.7 Project Budget......................................................................................................................25

CHAPTER FIVE.........................................................................................................................27

5.0 Simulation and Result...........................................................................................................27

5.1 Project Setup.........................................................................................................................27

6.0Prototype Implementation.....................................................................................................29

6.1 Implementation Procedures..................................................................................................29

CHAPTER SEVEN.....................................................................................................................33

7.0 Recommendations and Conclusion......................................................................................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

MNMA Mwalimu Nyerere Memorial Academy

LORA Long Range

WFS Water Flow Sensor

MCU Microcontroller Unit

PSU Power Supply Unit

ICT Information and Communication Technology

v
LIST OF TABLES

Table 1: show the power usage of appliance...............................................................................15

Table 2: Time frame of the project...............................................................................................25

Table 3: project budget.................................................................................................................26

vi
LIST OF FIGURES / DIAGRAM

Figure 1: proposed block diagram.................................................................................................3

Figure 2: overall system operation.................................................................................................5

Figure 3...........................................................................................................................................5

vii
Figure 4: show how to cut structure of project............................................................................11

Figure 5: leaking pipes of water that are transmit......................................................................14

Figure 6: General Design.............................................................................................................16

Figure 7: show TTGO Lora node.................................................................................................17

Figure 8: show motorized valve....................................................................................................18

Figure 9: show motorized valve....................................................................................................20

Figure 10: show relay switch........................................................................................................20

Figure 11: show OLED display....................................................................................................22

Figure 12: show flowchart of Lora based domestic water meter system....................................24

Figure 13: show Circuit Diagram................................................................................................27

Figure 14: show the structure of project......................................................................................29

Figure 15: show soldering............................................................................................................30

Figure 16: show circuit attachments............................................................................................31

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.

Rate of flow of water is measured as liters per hour or cubic meters.

1.2 Background of the project.

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

a Lora concentrator, allowing them to receive Lora packets.

1.3 Problem of existing system.

Existing system there is so many problems. The following are the problems of existing system as

follow,

 Delay in repayment of water

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

services for their customer

 Impracticability.

Occurs if their services provided and customer, they are best friend so it leads to the customer

not cutting the water services

1.4 Proposed system

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

will remove all the above-mentioned problems of an existing system.

PROPOSED BLOCK DIAGRAM FOR LORA BASED DOMESTIC WATER METER

STSTEM

Figure 1: proposed block diagram

3
Components of the block diagram

i. Power supply unit (PSU).

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

sometimes referred to as electric power converters.

ii. Motorized control valves

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.

iii. Lora node

New type of wireless connectivity used for long-range transmission; Lora devices have

revolutionized IOT by enabling data communication over a long range.

iv. 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.

v. LCD display

Is a flat panel display or other electronically modulated optical device that uses the light

modulating? LCD designed to project on screen information of a microcomputer onto a large

screen.

4
vi. Lora Gateway

Routers equipped with a Lora concentrator, allowing them to receive Lora packets,

Figure 2: overall system operation


ZAWA
Figure 3
DATABASE

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.

Disadvantage of this project

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

2.0. The main and specific objectives

This chapter going to explain the main goal of objectives in case of main objectives and specific

objectives that has been helped to accomplish the design of a system.

2.1. Main objective

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

of water that pass-through the water flow sensor.

2.2. Specific objectives.

• Interface Lora node with microcontroller for exchanging information from

microcontroller device to Lora node

• 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,

allowing them to receive Lora packets,

• Design system interface that will enable operator to interrupt with user device

2.3 Significance of the project

 Eliminate wastage of water.

This system is very important because it monitors the amount of water that is imported and

discharged without wasting it elsewhere.

 Provide efficiently data and communication in real time.

8
These services will enable water users to get reliable communication if they pay on time as soon

as services are closed.

 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

directly through the system.

 Reduce water thief.

People will no longer steal the water of the ZAWA everyone will use his water according to

connecting and will pay for it on time without found occur

2.4 limitations of the project

This system has many obstacles that lead to losses in society. Among the disadvantages hat are

in the system re as follow

 The system can operate in the presence of electricity because there are some components

which need power source to work.

 Cost of devices, some of devices are more expansive.

2.5 Scope of the project

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

3.1 Methodology Used in System Design and Implementation

This chapter explains the steps and procedures which have been used in order to achieve the

objectives of the project.

The following steps were used;

i. Literature review.

ii. Data collection.

iii. Implementation and testing prototype

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

according to the collected data.

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

couple rand others in microcontroller

Implementation and testing prototype

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.

Figure 4: show how to cut structure of project

11
CHAPTER FOUR

4.0 Data Collections and Data Analysis

This chapter explains the collected data and analysis of data

4.1 Feasibility Study

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

a hardware development system.

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.

Social feasibility study:

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.

4.2 Data Collection

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

and fig out the general requirement for proposed system.

This chapter describes about the data collection. I was collected data from deferent system.

Consist part that are for observation and technical

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

disease in society for playing with water.

Figure 5: leaking pipes of water that are transmit

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

without pay the water bill

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

year in various locations

WARD NO OF HOUSE POPULATION

Saateni 223 3450

Bububu 490 1566

Kiembe samaki 241 2400

Chumbuni 495 3200

Mfenesini 365 2803

Table 1: show the power usage of appliance

4.3 Data Analysis

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

observed and location that install my system.

4.4 General System Design


Lora based domestic water meter for control water automatic that block and open through

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

voltages, like the 5V provided by the Lora node pins.

Figure 6: General Design

4.4.0: Selection of Components and Tools

4.4 1: Hardware components

 power supply

 microcontroller unit

 motorized valve

 water flow sensor

16
 LCD display

 Lora node

 Lora getaway

Lora node

New type of wireless connectivity used for long-range transmission; Lora devices have

revolutionized IOT by enabling data communication over a long range.

Specifications of Lora node

 The Lora modem allows changing of the transmission power from 2dBm to 14dBm (433

MHz) or as high as 20dBm (865 MHz to 867 MHz,

 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.

Figure 7: show TTGO Lora node

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.

Specifications of motorized valve

 Available in Sizes from G1/2″ to G2 1/2″

 Voltage options: 12V DC, 24V DC and 220V AC

Figure 8: show motorized valve

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.

Specifications of water flow sensor

 Dimensions 0mm x0mm x0mm

 Weight G.W 79g

 Battery Exclude

 Mini. Wokring Voltage DC 4.5V

 Max. Working Current 15mA (DC 5V)

 Working Voltage DC 5V~15V

18
 Interface Dimensions G½Inch

 Flow Rate Range 1~25L/min

 Frequency F=(11*Q)Q=L/MIN±3%

 Error Range (1~30L\MIN) ±3%

 Load Capacity ≤10mA (DC 5V)

 Operating Temperature 0 ~ 80℃

 Liquid Temperature ≤120℃

 Operating Humidity 35%~90%RH

 Water Pressure ≤1.75MPa

 Material Description H57Copper+POM

 Storage Temperature -25~+ 80℃

 Storage Humidity 25%~95%RH

 Output Pulse High >DC 4.7V (Input Voltage

Level DC5V)

 Output Pulse Low <DC 0.5V (Input Voltage

Level DC5V)

 Output Pulse Duty 50%±10%

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

Figure 10: show relay switch

Specification of Relay

 TTL Control Signal 5VDC to 12VDC

 Maximum AC 10A 250VAC

 Maximum DC 10A 30VDC

 Contact Type NC and NO

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:

 High-resolution at 128x64 pixels.

 160 degrees viewing angle.

 Lower power consumption: only 0.06W with normal use.

 Power supply AC3V-5V, working very well with Arduino.

 Working temperature: -30 degrees to 70 degree Celsius.

 Dimensions: L27. 8 x W27. ...

 Compatible 3.3v and 5.0v chip I/O level.

 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

memory and processor cycles.

The software development environments (IDEs) used during the course of this project are listed

and detailed below:

 Arduino IDE for coding

 Proteus for circuit simulation

 Fritzing for project setup and connection

4.5 Design Algorithm Presentation

The algorithm used to represent system is FLOW CHART TECHNIQUE.

Here are the selection criteria:

22
 Effective analysis: With the help of flowchart, problem can be analyzed in more

effective way.

 Communication: Flowcharts are better way of communicating the logic of a system to

all concerned.

 Proper Debugging: The flowchart helps in debugging process.

 Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis

and program development phase.

 Efficient Program Maintenance: The maintenance of operating program becomes easy

with the help of flowchart.

 Proper documentation: Program flowcharts serve as a good program documentation,

which is needed for various purposes.

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

4.6 Time Frame of the Project


A schedule or a time frame as a basic time management tool consists of a list of times at which

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

Table 2: Time frame of the project

4.7 Project Budget


The budget cost of this project Lora based domestic water meter system is some devices which

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

Description Quantities Cost total cost

25
s/no

1 MCU 1 35000 35,000/=

2 Water flow sensor 1 49,782/= 49,782/=

3 power adapter 1 25,000/= 25,000/=

4 LCD display 1 100,000/= 100,000/=

5 Motorized valve 1 18,000/= 18,000/=

6 Relay 1 5000/= 5,000/=

7 Lora get way 2 37106/= 37106/=

8 Lora node 1 50000/= 50000/=

total cost 519888/=

Table 3: project budget

26
CHAPTER FIVE

5.0 Simulation and Result

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.

5.1 Project Setup

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.

The connections of components are summarized in the diagram below;

Figure 13: show Circuit Diagram

27
The project connection done through computer software, after connection of my components and

testing through computer all errors appeared were debugged.

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.

6.1 Implementation Procedures

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

procedures are as follows;

 Structure: implementation was started at a designed of structure of a system by design

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

order to make it looking better as a real parking place.

Figure 14: show the structure of project

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.

Figure 15: show soldering

 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

with relay switch ,hylink with battery and other components.

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

morning but errors appeared at a presentation.

 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

debugged and therefore finally it work properly without any errors.

32
CHAPTER SEVEN

7.0 Recommendations and Conclusion

In this chapter explain the recommendation, conclusion and summary of each chapter from the

first up to the end of the book

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 three discusses the methodology and implementations to a system design

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,

among them are:

33
 Time consuming for preparation

 High cost of access the component for making the system

 It need more knowledge to design this project

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

My recommendation to the Mwalimu Nyerere Memorial Academy(MNMA)is to ensure that the

students of ICT department were get all acquired material in order to ensure that were complete

the project in well and high quality.

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

summary, challenges encountered, its achievement and lastly the recommendation

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.

new york: mcgraw-hill college.

Chen, y., &han, d. (2018). water quality monitoring in smartcity: a pilot project.elsevier science

bv,89, 307–316.retrieved from

Martirano,MatteoManganelli,DaniloSbordone,‘‘Design and classification of smart metering system

Amit Bhimte, Rohit K.Mathew, Kumaravel S,“Development of smart energy meter in labview

for power distribution systems”, “IEEE INDICON 20151570186881”, 2015.

H. Arasteh, V. Hosseinnezhad, V.Loia, A.Tommasetti,O.Troisi, M.S hafie Khan, P.Siano, “IoT Based

SmartCities: A survey”IEEE 978.

35
APPENDICES

LORA NODE TRANSMITTER

//Libraries for LoRa

#include <SPI.h>

#include <LoRa.h>

//Libraries for OLED Display

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>

//define the pins used by the LoRa transceiver module

#define SCK 5

#define MISO 19

#define MOSI 27

#define SS 18

#define RST 14

36
#define DIO0 26

//433E6 for Asia

//866E6 for Europe

//915E6 for North America

#define BAND 866E6

//OLED pins

#define OLED_SDA 4

#define OLED_SCL 15

#define OLED_RST 16

#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels

//packet packet_counter

#define LED_BUILTIN 16

#define SENSOR 23

37
//pins used for relay

#define offRelay 17

#define onRelay 25

//variable to handle water flow parameters

long currentMillis = 0;

long previousMillis = 0;

unsigned int oldtime=0;

unsigned int nowtime=0;

unsigned const int upInt=10000;

unsigned const int userID=0001;

int interval = 1000;

boolean ledState = LOW;

float calibrationFactor = 4.5;

volatile byte pulseCount;

byte pulse1Sec = 0;

38
float flowRate;

unsigned long flowMilliLitres;

unsigned int totalMilliLitres;

float flowLitres;

float totalLitres;

String lora_data;

const int switchingTime = 15000;

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RST);

void setup() {

//initialize Serial Monitor

Serial.begin(115200);

//initialize led and water flowrate sensor

pinMode(LED_BUILTIN, OUTPUT);

39
pinMode(onRelay, OUTPUT);

pinMode(offRelay, OUTPUT);

pinMode(SENSOR ,INPUT_PULLUP);

LOCKUSER();

//reset OLED display via software

pinMode(OLED_RST, OUTPUT);

digitalWrite(OLED_RST, LOW);

delay(20);

digitalWrite(OLED_RST, HIGH);

//initialize OLED

Wire.begin(OLED_SDA, OLED_SCL);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3c, false, false))

{ // Address 0x3C for 128x32

Serial.println(F("SSD1306 allocation failed"));

for(;;); // Don't proceed, loop forever

40
display.clearDisplay();

display.setTextColor(WHITE);

display.setTextSize(1);

display.setCursor(0,0);

display.print(" WATER METER");

display.display();

Serial.println("WATER METER TEST");

//SPI LoRa pins

SPI.begin(SCK, MISO, MOSI, SS);

//setup LoRa transceiver module

LoRa.setPins(SS, RST, DIO0);

if (!LoRa.begin(BAND)) {

Serial.println("Starting LoRa failed!");

41
while (1);

Serial.println("LoRa Initializing OK!");

display.setCursor(0,10);

display.print("LoRa Initializing OK!");

display.display();

delay(2000);

pulseCount = 0;

flowRate = 0.0;

flowMilliLitres = 0;

totalMilliLitres = 0;

previousMillis = 0;

attachInterrupt(digitalPinToInterrupt(SENSOR), pulseCounter, FALLING);

oldtime=millis();

UNLOCKUSER();

42
void loop()

float X,Z;

boolean Y;

nowtime = millis();

if (nowtime - oldtime >upInt)

Z= readVolume();

X= totalLitres;

do

Y = sendData(X,Z);

while(!Y);

Y=0;

oldtime=nowtime;

43
}

float readVolume()

pulse1Sec = pulseCount;

pulseCount = 0;

flowRate = ((1000.0 / (millis() - previousMillis)) * pulse1Sec) / calibrationFactor;

previousMillis = millis();

flowMilliLitres = (flowRate / 60) * 1000;

flowLitres = (flowRate / 60);

totalMilliLitres += flowMilliLitres;

totalLitres += flowLitres;

return flowLitres;

44
// Print the flow rate for this second in litres / minute

Serial.print("Flow rate: ");

Serial.print(float(flowRate));

Serial.print("L/min");

Serial.print("\t");

boolean sendData(float vol,float rate)

// LoRaData format: readingID/volume&flowrate

String Data=String(userID)+'/'+String(vol,4)+'&'+String(rate,4);

LoRa.beginPacket();

LoRa.print(Data);

LoRa.endPacket();

delay(2000);

int parcketSize = LoRa.parsePacket();

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()

int parcketSize = LoRa.parsePacket();

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

//Libraries for LoRa

#include <SPI.h>

#include <LoRa.h>

//Libraries for OLED Display

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>

//define the pins used by the LoRa transceiver module

#define SCK 5

#define MISO 19

#define MOSI 27

#define SS 18

#define RST 14

#define DIO0 26

51
//433E6 for Asia

//866E6 for Europe

//915E6 for North America

#define BAND 866E6

//OLED pins

#define OLED_SDA 4

#define OLED_SCL 15

#define OLED_RST 16

#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RST);

String LoRa_Data;

String userID;

String volume;

52
String flowRate;

void setup() {

//initialize Serial Monitor

Serial.begin(115200);

//reset OLED display via software

pinMode(OLED_RST, OUTPUT);

digitalWrite(OLED_RST, LOW);

delay(20);

digitalWrite(OLED_RST, HIGH);

//initialize OLED

Wire.begin(OLED_SDA, OLED_SCL);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3c, false, false)) { // Address 0x3C for

128x32

Serial.println(F("SSD1306 allocation failed"));

for(;;); // Don't proceed, loop forever

53
}

display.clearDisplay();

display.setTextColor(WHITE);

display.setTextSize(1);

display.setCursor(0,0);

display.print("RECEIVER & GATEWAY");

display.display();

Serial.println("LoRa Receiver Test");

//SPI LoRa pins

SPI.begin(SCK, MISO, MOSI, SS);

//setup LoRa transceiver module

LoRa.setPins(SS, RST, DIO0);

if (!LoRa.begin(BAND)) {

54
Serial.println("Starting LoRa failed!");

while (1);

Serial.println("LoRa Initializing OK!");

display.setCursor(0,10);

display.println("LoRa Initializing OK!");

display.display();

void loop() {

//try to parse packet

int packetSize = LoRa.parsePacket();

if (packetSize) {

//received a packet

Serial.print("Received packet ");

//read packet

while (LoRa.available()) {

LoRa_Data = LoRa.readString();

55
extractData(LoRa_Data);

Serial.print(LoRa_Data);

//print RSSI of packet

int rssi = LoRa.packetRssi();

Serial.print(" with RSSI ");

Serial.println(rssi);

// Dsiplay information

display.clearDisplay();

display.setCursor(0,0);

display.print(" RECEIVER & GATEWAY ");

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();

void extractData(String rawdata)

// Get readingID, volume , flowRate and deviceStatus

int pos1 = LoRa_Data.indexOf('/');

int pos2 = LoRa_Data.indexOf('&');

////////////////////////////////////////////////////////////

57
userID = LoRa_Data.substring(0, pos1);

volume = LoRa_Data.substring(pos1+1, pos2);

flowRate = LoRa_Data.substring(pos2+1, LoRa_Data.length());

////////////////////////////////////////////////////////////

58

You might also like