Wireless Water Meter System.

(1)

WIRELESS WATER METER SYSTEM

RAJA MARIATUL QIBTIAH BT RAJA JAAPAR

This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering (Industrial Electronics) With Honours

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka


(2)

UNIVERSTI TEKNIKAL MALAYSIA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II

Tajuk Projek : WIRELESS WATER METER SYSTEM

Sesi

Pengajian : 2008/2011

Saya RAJA MARIATUL QIBTIAH BT RAJA JAAPAR

mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka. 2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT* kepentingan Malaysia seperti yang termaktub di dalam AKTA (Mengandungi maklumat yang berdarjah keselamatan atau RAHSIA RASMI 1972)

TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________

(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat :LOT 4694, LORONG 3, KG TERSUSUN BT 6 31150 TAMBUN IPOH

PERAK.


(3)

iii

“I hereby declare that this report is the result of my own work except for quotes as cited in the reference”

Signature : ………

Author : RAJA MARIATUL QIBTIAH BT RAJA JAAPAR Date : 20th April 2011


(4)

iv

“I hereby declare that I have read this report and in my opinion this report is sufficient in terms scope and quality for the award of Bachelor of Electronic

Engineering (Industrial Electronics) With Honours”

Signature : ……….

Name : ENGR. FAKRULRADZI BIN IDRIS


(5)

v

Dedicated, in thankful appreciation for support, encouragement and understandings to my beloved father, mother, brother, sister, lecturers and friends.


(6)

vi

ACKNOWLEDGEMENTS

First and foremost, I would like to express my sincere appreciation to my Final Year Project supervisors Mr.Fakrulradzi bin Idris for his continuous guidance, encouragement and thought that has given to me through completing this project.

My appreciation also goes to my beloved family for their understanding, endless love and support, emotionally and financially all these years.

I would also like to thank CLEANER LAB team (staff and students) for their co-operations, guidance, help and invaluable assistance in this project.

Special thanks also go to all my friends for their kindly help and supports. And for those who give me support directly or indirectly to finish my final year project and throughout my 8 semesters in UTeM, thank you very much


(7)

vii

ABSTRACT

Nowadays, a conventional method to gather water consumption data from water meters in residential areas by using human recorders are costly and time consuming at especially urban residential area. The technology of wireless water meter system is a method to send water consumption data from the resident to mobile billing units would improve the service quality of billing system and increase revenue by reducing labor cost. In this project, wireless water meter system was developed in order to give solution based on this problem. The XBee Wireless Technology are used to send the water consumption data automatically to the mobile water meter reader. Microcontroller 16F877A was used as a processor to control the XBee Wireless Technology with coverage up to 100 meter of range and low power consumption. The developed product can be integrated with existing commercial water meter and support residential, commercial and industrial consumer.


(8)

viii

ABSTRAK

Perubahan Pengambilan data bagi penggunaan air menggunakan meter air di kawasan perumahan dengan meggunakan kaedah sedia ada seperti catatan daripada pekerja menyebabkan kos yang tinggi dan penggunaan masa yang banyak terutamanya di kawasan bandar. Sistem berteknologi meter air tanpa wayar adalah satu kaedah penghantaran data tanpa wayar daripada kediaman pengguna kepada stesen kawalan (Mobile meter reader) bagi memperbaiki kualiti perkhidmatan dan mengurangkan kadar kos pekerja. Hal yang demikian, Sistem meter air tanpa wayar dicipta bagi menyelesaikan masalah ini. XBee Wireless Technology digunakan untuk menghantar data secara automatik ke mobile water meter reader. Cip 16F877A pula digunakan untuk mengawal XBee Wireless Technology untuk penghantaran data sehingga 100 meter dan penggunaan kuasa yang rendah. Produk ini dapat diintegrasikan apabila wujudnya meter air secara komersial dengan sokongan pengguna, dan pihak perindustrian.


(9)

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

DECLARATION i

DEDICATION ii

ACKNOWLEDGEMENTS iii

ABSTRACT iv

ABSTRAK v

TABLE OF CONTENTS vii

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF APPENDICES xiv

1 INTRODUCTION

1.1 Project Background 1

1.2 Project Objective 2

1.3 Scope of Work 2

1.4 Problem Statement 2

1.5 Work Breakdown 3


(10)

viii

1.7 Thesis Outline 6

2 LITERATURE REVIEW

2.1 Introduction 7

2.2 Approaches 8

2.2.1 Radio Frequency (RF) 8

2.2.2 Mobile Telephone Network 8

2.2.3 Direct Wire Connection 9

2.3 System Description 9

2.4 Existing Digital Water Meter Classification 10

2.5 Design Issues 12

2.6 Radio Frequency Utilization 11

2.6.1 Frequency, Period, and Bandwidth 12

2.6.1.1 Period 14

2.6.1.2 Frequency 15

2.6.1.3 Bandwidth 15

2.6.2 IEEE Standard 15

2.6.2.1 802.11 (Standard) 16 2.6.2.2 ZigBee (Standard) 17

2.7 Microcontroller System 19

2.7.1 Microcontroller Features 20

2.7.2 PIC 17F877 Architecture 20

2.8 Software Programming 22


(11)

ix

2.8.2 Visual Basic (VB.NET) 22

2.8.2.1 Requirement VB.NET 22 2.9 SK40C Enhanced 40 pins Start-up Kit 24 2.10 Toggle Switch Single Pole Double Throw 25

3 DESIGN AND IMPLEMENTATION

3.1 Introduction 27

3.2 System Advantages 29

3.3 Hardware Implementation 29

3.3.1 Element of System 27

3.3.1.1 Microcontroller 30

3.3.1.2 ZigBee Protocol 34

3.3.1.3 Transceiver 36

3.3.1.4 Potentiometer 37

3.3.1.5 SK40C Enhance start-up Kit 38

3.4 Software Implementation 41

3.4.1 Graphical Unit for User Interface (GUI) 42

4 RESULT AND ANALYSIS

4.1 Expected Result 43

4.2 Testing the Functionality of the Prototype 44

4.2.1 Procedure 45

4.3 Samples collection and testing 45


(12)

x

5 CONCLUSION AND RECOMMENDATION

5.1 Hardware Development 52

5.2 Software Programming 53

5.2.1 A Device to Block the Water Supply 53 5.2.2 Change Xbee Module to Xbee Pro 53 5.2.3 Enhancement the system in automatically 53

REFERENCES 54


(13)

xi

LIST OF TABLES

TABLES TITLE PAGE

2.1 Classification of Existing Digital Water meter 11 2.2 Classification of Existing Digital Water Meter 13

2.3 Specification Band for RF spectrum 16

2.4 Common Wireless application and Frequency 16

2.5 Comparison with RF Module 19

2.6 Types of Visual Basic 24

3.1 LCD Pins Function 33

3.2 Comparison between ZigBee, Bluetooth and Wi-Fi 34

3.3 Specification of SK Xbee 36

3.4 Specification of Rotary Potentiometer 38


(14)

xii

LIST OF FIGURE

FIGURE TITLE PAGE

1.1 Example of WWM System from Digital Meter to 1 Control Station

1.2 Work Breakdowns for the Project 3

1.3 Work Flow of This Project 5

2.1 Configuration of Water Meter in Residential area 10

2.2 ZigBee Module 16

2.3 PIC 16F877A Internal Architecture 19

2.4 SK40C Enhanced 40 Pins PIC Start-up Kit 22 3.1 Direct connections between Meters with Different 25

Meter Number

3.2 Block Diagram of the design system 25

3.3 Block Diagram for Wireless Water Meter System 27

3.4 Example of Microcontroller Chip 28

3.5 Communication between Transmitter and receiver system 29


(15)

xiii

3.7 Form1 32

4.1 Architecture of Rotary Potentiometer 34

4.2 PIC 16F877A Pin Diagram 35

4.3 SK40C Enhanced 40 Pins PIC Start-up Kit 36

4.4 Side View 37

4.5 Bottom View 37

4.6 LCD (2X16 Characters) 38

4.7 LCD Connections Pins 39

4.8 Board Layout of SkXbee 41

4.9 Connection between microcontroller and SkXbee 41

5.1 View of Wireless Water Meter 43

5.2 Connections between PC and WWM 44

5.3 System ON 46

5.4 Potentiometer as Water Tap 46

5.5 Transmission data from WWM to Mobile Meter Reader 46

5.6 Set the WWM Port 47

5.7 Set the Baud Rate 47

5.8 Search the ID No of Meter 47

5.9 Port connected 48

5.10 Port Disconnected 48


(16)

xiv

LIST OF APPENDIX

APPENDIX TITLE PAGE

A Specification of the Xbee/XbeePro Oem Rf Modules 53 B Pin Assignments for the Xbee and Xbee – pro modules 54

C Analog to Digital in Microcontroller 55


(17)

1

CHAPTER I

INTRODUCTION

1.1 Project Background

Wireless water meter system is a system that is collect billing from residential areas where this system capable to improve the accuracy of billing system. The ZigBee wireless was use together data from the water meter. ZigBee is a wireless technology developed as an open global standard to address the unique needs of low cost, low power, wireless sensor network. In addition, the ZigBee protocol carries all the benefits of the 802.15.4 protocol with added networking functionality. The data would transmit to mobile meter reader with less of error. The develop system are more practical and affections to reduces the maintenances cost and improve the services quality of billing system.

Figure 1.1 Example of wireless water meter system from digital meter to control station.


(18)

2

1.2 Project Objectives

Thus this project includes several objectives and aims: i. To design and develops a digital wireless water meter system.

ii. To study sending and communicate data with control station using ZigBee.

iii. To improve the accuracy of billing system, reduced the maintenances cost and also improve the service quality of utility authorities.

1.3 Scopes of Work

The scope of this project covers:

i. Use ZigBee as wireless system to communicate with mobile meter reader. ii. Design and develop a wireless water meter that interface the water volume

measurement instrument with wireless device that be able to communicate with a mobile meter reader.

iii. The XBee Wireless technology is used to send the water consumption data automatically to the mobile water meter reader.

1.4 Problem Statement

i. Traditional method to gather data from residential meters:

Sending technicians to a residential area then record data manually for further processing, this method usually results in high labor costs.


(19)

3

ii. It could easily cause human errors:

A technician may record wrong data from a meter because of his exhaustion or faded colors on a numerical display.

iii. Microcontroller 16F877A was used as a processor to control the XBee Wireless Technology with coverage up to 100 meter of range and low power consumption

1.5 Work Breakdown

In order to achieve the objective of this project, there are several tasks that need to be done as shown in Figure 1.2 below. These tasks are divided into three main categories that are study, design and implementation. The related items that need to study in detail are the principle of the analog to digital converter, microcontroller architecture, programming for microcontroller and programming for graphical user interface.

Other than that, for this system it is needed to design the system block Diagram, hardware circuit, software algorithm and software programming. Following the design is the implementation of the hardware, software and system integration.


(20)

4

Figure1.2 Work Breakdowns for the Project

1.6 Work Flow

The summary of work flow for this project is simplified into block diagram as shown in the Figure 1.3 below. The starting point of this project is the literature review and theoretical study. But, these actions are continuous as new information must be gathered from time to time in order to proceed with this project.

After having an overview of the component to include in this project, the suitable components were selected based on the scope and limitation of this project. Hardware implementations begin after the components were available. On the other hand, software implementations begin with algorithm for the analog to digital 5 converters and continue with the graphical user interface. After that, the whole system was integrated for testing and optimization before the real demo and presentation to the panel of the final year project.


(21)

5

Literature review and theoretical study

Selection of hardware components

Hardware Implementation

Software Implementation

Hardware and Software Integration

Testing and Optimization

Presentation and Demo

Report Writing

Figure 1.3 Work flow of This Project

Figure 1.3 shows the detail of the works done with the time spending on it for the duration of two semesters.


(22)

6

1.7 Thesis outline

This thesis is a report of a final year project of title “Wireless Water Meter System”. There are five main chapters explained in detail within this thesis. Chapter 1 explain in detail the information about the project background, problem statement, objectives, scope, work flow, thesis content and work breakdown. In this chapter, the reader could find out the overview of this project and also the significant of this project. Next in chapter 2, the related literature to this project is provided in detail. The topic explained in this chapter included approaches, Design issues, Radio frequency utilization, software programming and basic of hardware involve. Chapter 3 is about design and implementation. In this chapter, the design and implementation step is explained in detail including the prototype. In Chapter 4, all the results and analysis about the system either it achieve the objectives or not and the last, Chapter 5 summarizes this project and with recommendations.


(23)

7

CHAPTER II

LITERATURE REVIEW

2.1 Introduction

This chapter presents the fundamental of ZigBee Protocol and the principle used to transmit and receive the data by using wireless communication system. This chapter also describes the content of PIC architecture, types of LCD Display, software programming, communication standard and other relevant fundamentals and components used in the project.

Traditional method to gather data from residential meters such as water meters to by sending technicians to a residential area. The technicians then record data manually into notebooks or electronic PDAs and store these data into a database for further processing. This method usually results in high labor costs and could easily cause human errors due to several factors. For example, a technician may record wrong data from a meter because of his fatigue or faded colors on a numerical display. To do remote metering, existing analog water meters have to be converted to digital ones. Also the information consumed water volume must be transmitted to the center through wireless communication equipments.


(24)

8

2.2 Approaches

There are several approaches have been proposed to improve meter data gathering to reduces costs and error. Currently applied approaches can be categorized as follows: 2.2.1 Radio Frequency (RF)

RF communication is applied to transmit data from the water meters to a base station as follows:

i. Fixed Based Station

In this method, meters directly transmit data using RF links to a fixed based station. However, this method can cover only a small area close to the station since the effective distance of RF propagation from a water meter to a high gain antenna at the base station is limited to short range due to limited battery powers of meters.

ii. Mobile Radio Station

This method is known as “walk-by” or “drive-by” method. A technician can carry a mobile station to read data from meters by either walking or driving into an area within an effective RF distance. For a small antenna, the effective distance is about 50–100 m from a meter.

2.2.2 Mobile Telephone Network

In this approach, a meter utilizes a cellular telephone network to send data via MS or GPRS to a base station. Although this method offers a longer effective distance, less human labor costs, and ease to gather data, but communication equipment and calling services from many meters to a based station are expensive. Thus, this approach is usually applied at where the number of meters used is low and for large consumers such as industrial plants. With a capability to collect data from areas to a base station using an ad-hoc manner, a wireless sensor network becomes an alternative for data gathering of water meters. An ad-hoc configuration can be utilized to gather data from a large number of sensor nodes to a sink node or a base


(1)

ii. It could easily cause human errors:

A technician may record wrong data from a meter because of his exhaustion or faded colors on a numerical display.

iii. Microcontroller 16F877A was used as a processor to control the XBee Wireless Technology with coverage up to 100 meter of range and low power consumption

1.5 Work Breakdown

In order to achieve the objective of this project, there are several tasks that need to be done as shown in Figure 1.2 below. These tasks are divided into three main categories that are study, design and implementation. The related items that need to study in detail are the principle of the analog to digital converter, microcontroller architecture, programming for microcontroller and programming for graphical user interface.

Other than that, for this system it is needed to design the system block Diagram, hardware circuit, software algorithm and software programming. Following the design is the implementation of the hardware, software and system integration.


(2)

Figure1.2 Work Breakdowns for the Project

1.6 Work Flow

The summary of work flow for this project is simplified into block diagram as shown in the Figure 1.3 below. The starting point of this project is the literature review and theoretical study. But, these actions are continuous as new information must be gathered from time to time in order to proceed with this project.

After having an overview of the component to include in this project, the suitable components were selected based on the scope and limitation of this project. Hardware implementations begin after the components were available. On the other hand, software implementations begin with algorithm for the analog to digital 5 converters and continue with the graphical user interface. After that, the whole system was integrated for testing and optimization before the real demo and presentation to the panel of the final year project.


(3)

Literature review and theoretical study

Selection of hardware components

Hardware Implementation

Software Implementation

Hardware and Software Integration

Testing and Optimization

Presentation and Demo

Report Writing

Figure 1.3 Work flow of This Project

Figure 1.3 shows the detail of the works done with the time spending on it for the duration of two semesters.


(4)

1.7 Thesis outline

This thesis is a report of a final year project of title “Wireless Water Meter System”. There are five main chapters explained in detail within this thesis. Chapter 1 explain in detail the information about the project background, problem statement, objectives, scope, work flow, thesis content and work breakdown. In this chapter, the reader could find out the overview of this project and also the significant of this project. Next in chapter 2, the related literature to this project is provided in detail. The topic explained in this chapter included approaches, Design issues, Radio frequency utilization, software programming and basic of hardware involve. Chapter 3 is about design and implementation. In this chapter, the design and implementation step is explained in detail including the prototype. In Chapter 4, all the results and analysis about the system either it achieve the objectives or not and the last, Chapter 5 summarizes this project and with recommendations.


(5)

CHAPTER II

LITERATURE REVIEW

2.1 Introduction

This chapter presents the fundamental of ZigBee Protocol and the principle used to transmit and receive the data by using wireless communication system. This chapter also describes the content of PIC architecture, types of LCD Display, software programming, communication standard and other relevant fundamentals and components used in the project.

Traditional method to gather data from residential meters such as water meters to by sending technicians to a residential area. The technicians then record data manually into notebooks or electronic PDAs and store these data into a database for further processing. This method usually results in high labor costs and could easily cause human errors due to several factors. For example, a technician may record wrong data from a meter because of his fatigue or faded colors on a numerical display. To do remote metering, existing analog water meters have to be converted to digital ones. Also the information consumed water volume must be transmitted to the center through wireless communication equipments.


(6)

2.2 Approaches

There are several approaches have been proposed to improve meter data gathering to reduces costs and error. Currently applied approaches can be categorized as follows: 2.2.1 Radio Frequency (RF)

RF communication is applied to transmit data from the water meters to a base station as follows:

i. Fixed Based Station

In this method, meters directly transmit data using RF links to a fixed based station. However, this method can cover only a small area close to the station since the effective distance of RF propagation from a water meter to a high gain antenna at the base station is limited to short range due to limited battery powers of meters. ii. Mobile Radio Station

This method is known as “walk-by” or “drive-by” method. A technician can carry a mobile station to read data from meters by either walking or driving into an area within an effective RF distance. For a small antenna, the effective distance is about 50–100 m from a meter.

2.2.2 Mobile Telephone Network

In this approach, a meter utilizes a cellular telephone network to send data via MS or GPRS to a base station. Although this method offers a longer effective distance, less human labor costs, and ease to gather data, but communication equipment and calling services from many meters to a based station are expensive. Thus, this approach is usually applied at where the number of meters used is low and for large consumers such as industrial plants. With a capability to collect data from areas to a base station using an ad-hoc manner, a wireless sensor network becomes an alternative for data gathering of water meters. An ad-hoc configuration can be utilized to gather data from a large number of sensor nodes to a sink node or a base