CHILD MONITORING SYSTEM (PARENT) NABILLAH BINTI SALEH This thesis is submitted as partial fulfillment of the requirements for the award of the degree of Bachelor of Electrical Engineering (Electronics) Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang NOVEMBER, 2008
24
Embed
CHILD MONITORING SYSTEM (PARENT) NABILLAH … are about PIC microcontroller, ... 4.2.2 PICKit 2 Software Programmer 26 4.2.3 ISIS 7 Professional 31. x ... EEPROM Electrically Erasable
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHILD MONITORING SYSTEM (PARENT)
NABILLAH BINTI SALEH
This thesis is submitted as partial fulfillment of the requirements
for the award of the degree of
Bachelor of Electrical Engineering (Electronics)
Faculty of Electrical & Electronics Engineering
Universiti Malaysia Pahang
NOVEMBER, 2008
iv
ACKNOWLEDGEMENT
I would like to express my gratitude to Allah with His permission I am done
with my project and it ran smoothly and successfully. Alhamdulillah, His
Willingness has made it possible for me as the author to complete the final year
project in time.
I would like to take this opportunity to give my special thanks to my
dedicated supervisor, Mr Fairuz Rizal bin Mohamad Rashidi for guiding this project
at every stage with clarity, spending much time to discuss and help with this project,
and that priceless gift of getting things done by sharing his valuable ideas as well as
share his knowledge.
I would also like to thank to all UMP lecturers and electrical technicians
whom had helped directly or indirectly in what so ever manner thus making this
project a reality.
Not forgotten are my best colleagues for their openhandedly and kindly
guided, assisted, supported and encouraged me to make this project successful. My
heartfelt thanks to my dearest family which always support and pray on me
throughout this project. Their blessing gave me the high-spirit and strength to face
any problem occurred and to overcome them rightly.
The great cooperation, kindheartedness and readiness to share worth
experiences that have been shown by them will be always appreciated and treasured
by me, thank you.
v
ABSTRACT
Bluetooth technology allowed multiple devices to communicate with each
other or one device could control and manage the other device wirelessly. The Child
Monitoring System (Parent) is one of alarm system which is developed using
Bluetooth technology to monitor child in a certain area which is about 20 meters
radius from the parent. The system is developed due to many cases of missing kids
that happen nowadays in our country. To develop the system, there are several things
needed to be learned. They are about PIC microcontroller, Bluetooth module data
transmission and reception and also the existence system proposed by the other
researchers. The important things to do during developing the system are assembly
of the hardware which contain Bluetooth module as the main component for data
transmission and reception while liquid crystal display (LCD) and buzzer as the
indicator for the status of the child. The PIC microcontroller is acted as a controller
that is reprogrammable and got the most important features to communicate two
Bluetooth which is Universal Asynchronous Receiver Transmitter (UART). The
software used is Microcode Studio to write and compile the PICBASIC
programming language. This system could assist the parent in keeping an eye for
their child whenever needed without the need of any licence.
vi
ABSTRAK
Teknologi Bluetooth membenarkan pelbagai alat berkomunikasi antara satu
sama lain atau satu alat menjadi pangawal dan pengurus alat-alat lain tanpa
menggunakan sebarang wayar. Sistem Pengawasan Kanak-Kanak (Ibu Bapa) adalah
satu sistem penggera yang dihasil menggunakan teknologi Bluetooth untuk
memerhati anak-anak dalam lingkungan 20 meter daripada ibu bapa. Sistem ini
dihasilkan kerana kes kehilangan kanak-kanak di negara ini semakin meningkat.
Bagi menghasilkan sistem ini, beberapa perkara perlu dipelajari antaranya mengenai
pengawalmikro PIC, cara penghantaran dan penerimaan data oleh modul Bluetooth
dan sistem yang telah ada yang telah diusulkan oleh pengkaji-pengkaji lain sebelum
ini. Perkara penting yang perlu dilakukan semasa penghasilan sistem ini ialah
menggabungkan perkakas yang terdiri daripada modul Bluetooth sebagai komponen
utama yang menghantar dan menerima data sementara paparan kristal cecair (LCD)
dan penggera sebagai penunjuk tentang status kanak-kanak. Pengawalmikro PIC
bertindak sebagai pengawal yang boleh diprogram semula dan mempunyai
keistimewaan yang penting untuk dua Bluetooth berkomunikasi iaitu Universal
Asynchronous Receiver Transmitter (UART). Perisian Microcode Studio digunakan
untuk menulis dan menukar bahasa program PICBASIC kepada bahasa mesin.
Sistem ini boleh membantu ibu bapa untuk mengawasi anak-anak apabila diperlukan
tanpa memerlukan sebarang lesen.
vii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES xii
LIST OF FIGURES xiii
LIST OF SYMBOLS xvi
LIST OF ABBREVIATIONS xvii
LIST OF APPENDICES xix
1 INTRODUCTION 1
1.1 Background 1
1.2 Introduction to the Project 1
1.3 Problem Statement 4
1.4 Objective 5
1.4.1 To design and program the parent’s part of
the system to monitor child in the specific
range of area by using Bluetooth
technology 4
1.4.2 To program the microcontroller to
function as desired 4
viii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
1.5 Scope of Project 5
1.5.1 Develop the system only for the parent’s
part 5
1.5.2 Develop the power module to supply
5V to the PIC and Bluetooth module 5
1.5.3 Develop the PIC module that contains
some components such as LCD and
buzzer to indicate the status of the child 5
1.5.4 Develop programming for the system to
function as desired 6
1.6 Thesis Overview 6
2 LITERATURE REVIEW 7
2.1 Personal Monitoring System 7
2.2 Kids Finder through Bluetooth Technology 8
2.3 KC Wirefree Bluetooth 10
2.3.1 Bluetooth Technology and Transceiver 10
2.4 PIC 16F877 12
2.4.1 Addressable Universal Synchronous
Asynchronous Receiver Transmitter
(USART) 12
2.4.1.1 USART Baud Rate Generator 13
2.4.2 I/O Ports 14
ix
TABLE OF CONTENTS
CHAPTER TITLE PAGE
2.5 PICBASIC Language 14
3 METHODOLOGY 15
3.1 Project Methodology 15
3.2 System’s Flow 17
3.3 System’s Diagram 19
4 SYSTEM’S ARCHITECTURE 20
4.1 Hardware Design 20
4.1.1 Power Supply Module 20
4.1.2 PIC Module 21
4.1.3 LCD Display and Buzzer 22
4.1.4 Bluetooth Module with PIC 23
4.2 Software Implementation 25
4.2.1 Microcode Studio 25
4.2.2 PICKit 2 Software Programmer 26
4.2.3 ISIS 7 Professional 31
x
TABLE OF CONTENTS
CHAPTER TITLE PAGE
5 RESULTS AND ANALYSIS 37
5.1 Power Supply Module 37
5.2 PIC Module 37
5.2.1 Blinking Test 38
5.2.2 LCD Test 39
5.2.3 UART Test 41
5.3 Bluetooth Module 42
5.3.1 Functionality Test 42
5.4 System Setting 45
5.4.1 Change Baud Rate 45
5.4.2 Bluetooth Module Setting 48
5.4.3 LCD Setting 49
5.5 Result 50
6 CONCLUSION 54
6.1 Achievement 54
6.2 Advantages and Disadvantages 55
6.3 Future Recommendation 55
6.4 Cost and Commercialization 56
xi
TABLE OF CONTENTS
CHAPTER TITLE PAGE
REFERENCES 58
APPENDICES A - G 60 - 95
xii
LIST OF TABLES
TABLE NO. TITLE PAGE
2.1 Baud Rate Formula 13
6.1 List of Components and Prices 57
xiii
LIST OF FIGURES
FIGURES NO. TITLE PAGE
1.1 Block diagram for Parent’s Part 2
2.1 Host to Host Communications through Bluetooth
Transceiver 11
3.1 Developing the Child Monitoring
System (Parent) 16
3.2 Flowchart on Parent’s Part 18
3.3 Block Diagram on Input and Output
of Microcontroller 19
4.1 Full Schematic Diagram 20
4.2 Power Module Circuit Diagram 21
4.3 Circuit Diagram for PIC Module 22
4.4 Schematic for LCD Display and Buzzer 22
4.5 Schematic for Bluetooth Module and PIC 23
4.6 Board Layout for the Parent’s Part (Master Device) 24
4.7 Board Layout for Bluetooth Module
With 5V Voltage In 24
4.8 Compile the Program 26
4.9 Device Family Selections 27
4.10 Midrange Device Family for PIC 16F877 27
4.11 Import .HEX File and Write Device Button 28
4.12 Import Hex File Dialogue Box 28
4.13 Download Program Progress 29
4.14 File Update Notifications 29
4.15 The Location of the Button on the Programmer
Hardware 30
xiv
LIST OF FIGURES
FIGURES NO. TITLE PAGE
4.16 The Success Downloading Process Notification 30
4.17 Edit Properties for PIC Microcontroller 31
4.18 Program File 32
4.19 File Selection 33
4.20 PIC Microcontroller Sending Data to Bluetooth 33
4.21 Connection Established with Slave Device 34
4.22 Data Receive From Slave Device
(In Range and Tag Attached) 35
4.23 Data Receive From Slave Device
(In Range and Tag Not Attach) 35
4.24 Data Receive From Slave Device (Out of Range) 35
4.25 Connection with Slave Device is Disconnected 36
5.1 Power Supply Module 38
5.2 LCD Test 40
5.3 HyperTerminal Displaying Data Received 42
5.4 HyperTerminal Window 43
5.5 Connect To Dialogue Box 43
5.6 COM Properties Dialogue Box 44
5.7 AT Response from KC Wirefree
Bluetooth Transceiver 44
5.8 Toolbar of HyperTerminal 45
5.9 Dropdown List of Transfer Menu 46
5.10 AT Command to Change Baud Rate 46
5.11 Selection of Change Baud Text File 47
5.12 AT Response for Changing Baud Rate 47
xv
LIST OF FIGURES
FIGURES NO. TITLE PAGE
5.13 Scan for Response from Slave Device Process 50
5.14 Connection with Slave Device Established 51
5.15 Slave Device Attached to Child 51
5.16 Slave Device Not Attach to Child 52
5.17 Child is Out of Range 52
5.18 Connection with Slave Device is Disconnected 53
xvi
LIST OF SYMBOLS
bps Bit Per Second
F Farad
G Giga
Hz Hertz
M Mega
p Piko
V Volts
VDC Volts Direct Current
xvii
LIST OF ABBREVIATIONS
A/D Analog to Digital
AT Attention
BASIC Beginners All Purpose Symbolic Instruction Code