automatic mail detector via sms mohd subhan bin...
TRANSCRIPT
AUTOMATIC MAIL DETECTOR VIA SMS
MOHD SUBHAN BIN GHARAT
This Report Is Submitted In Partial Fulfillment Of Requirements For The
Bachelor Degree Of Electronic Engineering (Industrial Electronic) With
Honours
Faculty Of Electronic Engineering And Computer Engineering
Universiti Teknikal Malaysia Melaka
April 2010
UNIVERSTI TEKNIKAL MALAYSIA MELAKAFAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER
BORANG PENGESAHAN STATUS LAPORAN
PROJEK SARJANA MUDA II
Tajuk Projek : AUTOMATIC MAIL DETECTOR VIA SMS
Sesi Pengajian
: SESI 2009/2010
Saya MOHD SUBHAN BIN GHARAT 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**(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA 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)
Tarikh: ……………………….. Tarikh: ………………………..
ii
I, MOHD SUBHAN BIN GHARAT hereby declare that this report is the result of
my own work and research except for quotes and cited in the references.
Signature :
Author : MOHD SUBHAN BIN GHARAT
Date : 26 APRIL 2010
iii
“I hereby declare that I have read this report and in my opinion this report is
sufficient in terms of the scope and quality for the award of Bachelor of Electronic
Engineering (Industrial Electronics) with Honors.”
Signature :
Supervisor’s Name: MISS ZARINA BT MOHD NOH
Date : 26 APRIL 2010
iv
Specially dedicated to my beloved parents;
Gharat Bin Kosrin and Maimon Bt Abdul
To my Supervisor;
Miss Zarina Bt Mohd Noh
Also to all my family members and fellow friends who have encouraged,
guided and inspired me throughout my journey of education. Hoping that all
of us will be successful in whatever field we are involved and be strong in
facing the challenges of life.
v
ACKNOWLEDGEMENT
Alhamdulillah, thank Allah S.W.T for the guidance and knowledge bestowed
upon me, for without it I would not have been able to come this far. I would like to
express my greatest gratitude and sincere thanks to my supervisor, Miss Zarina Bte
Mohd Noh, for her valuable advice and assistance in the supervision and consultation
of this Final Year Project. At times, the guidance and moral, support given by Miss
Zarina are very much motivating at the same time persuades me when obstacle arise
throughout the interlude of completing this project.
I would like to exemplify an extraordinary appreciation to the Faculty of
Electronics Engineering and Computer Engineering (FKEKK) on putting into
practice the Final Year Project as a compulsory chore for the final year students prior
to complete their course. Not forgetting Universiti Teknikal Malaysia Melaka for
their contribution on the facilities and also equipments as well as creating a platform
to the final year student to achieve and carry out their projects in durable manner.
Last but not least, I would like to thank to my beloved family for their
encouragement and never ending support. Their support and exquisite
companionship is another important source of my strength. My deepest appreciation
goes to all my fellow friends for the companionship, fruitful suggestion, proof
reading and wishes.
Therefore, I end this acknowledgement with THANK YOU VERY MUCH in
their reminiscence.
vi
ABSTRACT
Upon receiving new mails or letters in their mailbox, most users do not get
notified of this fact. They have to speculatively and periodically check their mailbox
contents. In most events, the users are neglectful on checking their mailbox. This at
times may lead towards the ignorance of important letters and results in various
miseries. Most of the multi story buildings such as apartments, condominiums, office
buildings etc limit the users on limited visits to check or collect their letters due to
the centralize mailbox location. Users find convenient to be on alert of mails they
receive to overwrite the conventional method of checking mailbox. Because of the
high confidentiality and official letters are increasing as a corresponding tool
globally, the users seek for a better solution which enables them to be on their toes
each time a mail is delivered. The state of the art electronics technology is
incorporated into these conventional mailboxes as a solution. The programmable
integrated circuit, interface module and the GSM modem can be incorporated by
linking the user’s mailbox with short messaging system or email facilities and this
enables the users to be notified whenever a new mail is delivered. Mails delivered
into the users mailbox, the system will automatically generate an alert which is send
in the form of a short message system or email that typically details the real time of
mail delivery. The system is designed to easy human life by sending short messaging
system or email to notify the users about important new mails reaching their
mailbox. This is likely to be a fast growing and popular application for short
messaging system and email towards the mankind.
vii
ABSTRAK
Semasa menerima mel baru atau surat-surat di dalam peti surat, sebahagian
besar pengguna tidak boleh diberitahu mengenai perkara ini. Mereka harus spekulasi
dan secara berkala memeriksa isi peti mel mereka. Dalam situasi tertentu,
kebanyakan pengguna lalai untuk menyemak peti mel mereka. Ini dalam masa yang
sama boleh mengakibatkan kepada ketidaktahuan surat penting dan hasil dalam
pelbagai pemberitahuan melalui surat-surat tersebut. Sebahagian besar bangunan
seperti apartmen, kondominium, pejabat dan lain-lain menyekat pengguna untuk
menyemak atau mengumpulkan surat-surat mereka kerana kedudukan lokasi tempat
surat tersebut. Pengguna berasa lebih selesa dan bersedia untuk menerima surat dari
peti mel mereka dengan cara yang mudah dan menyenangkan bagi menggantikan
kaedah konvensional pada masa sekarang ini untuk menyemak peti mel. Oleh kerana
penggunaan surat-surat rasmi meningkat sebagai alat yang sesuai secara global,
pengguna mencari penyelesaian yang lebih baik yang boleh memudahkan mereka
untuk memeriksa setiap kali surat dihantar. Penggunaan teknologi elektronik
diaplikasikan ke dalam peti mel konvensional sebagai penyelesaian. Litar bersepadu
diprogram, modul antaramuka dan modem GSM boleh dimasukkan dengan
menyambung peti mel pengguna dengan sistem mesej pesanan ringkas (sms) atau
kemudahan email dan ini membolehkan pengguna untuk diberitahu setiap kali surat
baru disampaikan. Apabila surat dimasukkan ke peti mel pengguna, sistem secara
automatik akan menghasilkan amaran yang dihantar dalam bentuk sistem mesej
pesanan ringkas (sms) atau email kepada pengguna. Ini mungkin merupakan suatu
aplikasi yang mudah untuk berkembang dan popular bagi sistem mesej pesanan
ringkas dan email terhadap kehidupan manusia.
viii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
PROJECT TITLE i
DECLARATION ii
DEDICATION iv
ACKNOWLEDGEMENT v
ABSTRACT vi
ABSTRAK vii
TABLE OF CONTENTS viii
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF ABBREVIATIONS xv
APPENDICES xvi
I INTRODUCTION
1.1 Background 1
1.2 Objective 2
1.3 Scope of project 3
1.4 Problem Statement 3
1.5 Research Methodology 3
1.6 Report Structure 4
ix
II LITERATURE REVIEW
2.1 Background 5
2.2 Mailing system, Sensor, GSM modem and interface
module; Concept, Overview of Concept, Element and
Specification 5
2.2.1 Mailing System 5
2.2.2 Control of the mail alert system 6
2.2.3 Element of AMDETSYS (concept) 7
2.2.3.1 PIC microcontroller for main circuit 7
2.2.3.2 Communnication Interface 17
2.2.3.3 GSM modem 22
2.2.3.4 Sensor 27
III METHODOLOGY
3.1 Introduction 32
3.2 Flow Chart of methodology 33
3.3 Project Plan Overview 34
3.4 Functional Block Diagram of AMDETSYS 35
3.5 Connection of AMDETSYS 36
3.6 Hardware Design and Development 37
3.7 Microcontrollers 37
3.7.1 Pin Diagram of PIC16F877A 38
3.7.2 Port Assignment 39
3.7.3 Basic Circuit for a Microcontroller 39
3.8 Printed Circuit Board (PCB) 41
3.8.1 PCB Design Rule and Consideration 41
3.9 Software Development 42
3.9.1 C Language 43
3.9.2 PIC Programmer 43
3.9.2.1 Programming a PIC 45
3.10 Testing 45
x
3.11 Expected Result 46
3.12 Gantt Chart of Project Planning 47
IV RESULT AND ANALYSIS
4.1 Introduction 48
4.2 Project Result 49
4.2.1 How the System Works 49
4.2.2 Software Analysis 51
4.2.2.1 Programming Procedure 51
4.2.3 Hardware Analysis 60
4.2.3.1 Medium range IR detector 60
4.2.3.2 Control unit 66
4.2.3.3 GSM Modem 72
4.2.3.4 Voltage regulator 73
4.2.4 Testing on breadboard 75
4.2.5 Design of the mailbox 75
4.2.6 Finish product of the prototype 76
V DISCUSSION AND CONCLUSION
5.1 Introduction 77
5.2 Discussion 77
5.3 Conclusion 78
5.4 Future Recommendations 80
REFERENCES 81
APPENDICES 82
xi
LIST OF TABLES
NO TITLE PAGE
2.1 Main features of a chip 9
2.2 PIC 16F87XA Device Features 15
2.3 Three-State Control of Receivers 20
2.4 Pin Definitions 30
3.1 Port Assignment 39
3.2 Common Design Rules of PCB Layout Design 42
4.1 IR specification 63
xii
LIST OF FIGURES
NO TITLE PAGE
2.1 Centralize mailbox system 6
2.2 PIC 16F877A microcontroller 7
2.3 Peripherals PIC 16F877A 14
2.4 Pic16F874A/877A Block Diagram 16
2.5 MAX220/MAX232/MAX232A Pin Configuration and
Typical Operating Circuit 17
2.6 MAX232 Communication Interface 21
2.7 Typical organization of network elements in a GSM network
Supporting SMS 23
2.8 WAVECOM Fastrack GSM Modem 26
2.9 Medium Range Infrared Sensor 29
2.10 PCB layout of the transmitter and receiver circuit (IR sensor) 31
3.1 Frame work of PSM 34
3.2 The AMDETSYS block diagram 35
3.3 Basic connection of AMDETSYS 36
3.4 Pin Diagram of Microcontroller PIC16F877A 38
xiii
3.5 Basic Circuit for a Microcontroller 40
3.6 PIC Programmer Circuit 44
3.7 IC-Prog Software 44
4.1 Full functional block diagram of AMDETSYS 50
4.2 Medium range IR detector 61
4.3 Schematic Circuit of IR 61
4.4 PCB Layout of IR Circuit 61
4.5 IR sensor place inside the mailbox 62
4.6 Signal detection overview 64
4.7 Signal detection using oscilloscope 64
4.8 Reflection of the sensor 65
4.9 PIC16F877A main circuit 66
4.10 Schematic Circuit of PIC Main Circuit 66
4.11 PCB Layout of PIC Main Circuit 66
4.12 Interface circuit using MAX 232 67
4.13 Schematic Circuit of Interface Circuit 68
4.14 PCB layout of Interface Circuit 68
4.15 Connection using RS232 cable 70
4.16 GSM Modem 72
4.17 GSM Modem connection with control unit 73
4.18 Voltage regulator 74
4.19 Schematic circuit of Voltage Regulator Circuit 74
xiv
4.20 PCB layout of voltage regulator Circuit 74
4.21 Testing on breadboard 75
4.22 Mail compartment and control unit casing 75
4.23 Finish product of the prototype 76
xv
LIST OF ABBREVIATIONS
CI - Communication Interface
CM - Conventional method
GSM - Global System for Mobile Communication Modem
LCD - Liquid Crystal Display
LED - Light Emitting Diode
PIC - Programmable Interface Controller
SMS - Short Message System
AMDETSYS - Automatic Mail Detector Via SMS
IR - Infra Red
SMS - Short Message System
xvi
APPENDICES
NO TITLE PAGE
A PIC16F87XA Data Sheet 82
B +5V-Powered, Multichannel RS-232 Drivers/Receivers 98
CHAPTER I
INTRODUCTION
1.1 Background
Nowadays all cellular networks, GSM, GPRS, UMTS, etc. provide handover,
location and paging functions. A handover is a change of access point by a mobile
terminal, without loss of connection. In the other hand, location is the process where
mobile node informs the networks about its position, so it could receive information
(SMS, call etc). GSM (Global System for Mobile Communication) is the most
popular standard for mobile telephony systems in the world. The GSM Association,
its promoting industry trade organization of mobile phone carriers and
manufacturers, estimates that 80% of the global mobile market uses the standard.
GSM is used by over 3 billion people across more than 212 countries and territories.
GSM is a cellular network, which means that mobile phones connect to it by
searching for cells in the immediate vicinity. There are five different cell sizes in a
GSM network (macro, micro, pico, femto and umbrella cells). The coverage area of
each cell varies according to the implementation environment.
Media Short Message Service (SMS) has been widely used for applications in
data communication various fields such as banking, entertainment and more. SMS is
used on this research as sensor data communication media, especially in data
transmission when the sensor detects an object. Transmission of data through the
electronic medium used to be able to facilitate users in their daily life as well as the
2
uses of advanced technologies are growing at present. Data delivery via sms system
will make it easier for users find information more quickly and efficiently. Media
used for send the data must have the ability to send data with two communication
ways to easiest the user get the information in short time. Most of the multi story
buildings such as apartments, condominiums, office buildings etc limit the users on
limited visits to check or collect their letters due to the centralize mailbox location.
They have to speculatively and periodically check their mailbox contents. The state
of the art electronics technology with the uses of GSM is incorporated into these
conventional mailboxes as a solution. The programmable interface controller,
interface module and the GSM modem can be incorporated by linking the user’s
mailbox with short messaging system or email facilities and this enables the users to
be notified whenever a new mail is delivered. Mails delivered into the users mailbox,
the system will automatically generate an alert which is send in the form of a short
message system or email that typically details the real time of mail delivery. The
system is designed to easy human life by sending short messaging system or email to
notify the users about important new mails reaching their mailbox.
1.2 Objective of this project are:
(a) To design and built a data transfer circuit between sensor and sms system.
(b) To replace the conventional method of checking mailbox.
(c) To explore application of sensor and gsm system use for data transfer and
communication system.
3
1.3 Scope of project:
(a) To study and design a mailbox with IR sensor and transmit data via SMS
system if some mail are detected to be inserted in the mailbox.
(b) To study the programmable interface controller, interface module and the
GSM/GPRS modem which can be incorporated by linking the user mailbox
with short messaging system.
(c) To introduce the system that will automatically generate an alert which will
be sent in the form of a short message system that typically details the real
time of mail delivery.
1.4 Problem Statement
Upon receiving new mails or letters in their mailbox, most users do not get
notified of this fact. They have to speculatively and periodically check their mailbox
contents. In most events, the users are neglectful on checking their mailbox. To
overcome the problem, this project is built to replace the conventional mailboxes as
the solution.
1.5 Research Methodology
There are 4 phases of methodology in order to achieve the objective of the
project. The first phase is project planning, second phase is literature review, third
stage hardware design and final phase is performance test.
4
1.6 Report Structure
These reports obtain five chapters that explain details about this project. The
first chapter is introduction of the project. This chapter contains project introduction,
project objective, project scope, problem statement and research methodology.
The second chapter is literature review about the AMDETSYS system. This
includes to makes system works by using PIC as a controller. For example, in order
to receive input from the IR sensor. Therefore, brief information about IR sensor also
include in this chapter. It is important to understand the concept involves and how
this system works.
The third chapter is Research Methodology. This chapter will decide the
selecting from literature review of figure out a few technique and approach that been
conducted. This is to make sure that all data and other technique will involve. The
factor, procedures, devices and method used to generate the expected results will
include in this chapter. This chapter also gives information about a circuit and the
main components used. The components are PIC (microcontroller).
The fourth chapter is focused on to build a few programming during attend
the PIC class and laboratory. The purpose of the test, expected result, procedures and
result for each test will be detailed out in this report (PSM 2).
The last chapter is about project application of the project, discussion, project
improvement, suggestion and also conclusion.
CHAPTER II
LITERATURE REVIEW
2.1 Background
This chapter contains the research and information about the project on
several important concepts of sensor, SMS system, GSM system, technology and
tools used in the study. Every facts and information, which found through journals or
other references, will be compared and the better methods have been chosen for the
project.
2.2 Mailing system, Sensor, GSM module and interface module; Concept,
Overview of Concept, Element, and Specification.
2.2.1 Mailing System
Mail is part of a postal system wherein written documents, typically enclosed
in envelopes, and also small packages, are delivered to destinations around the world.
Anything sent through the postal system is called mail or post [1]. In the late 1990’s
the e-mail has dominant the mailing system which is always faster than postal system
and cheap for users to communicate thought the world. The revolutions on mails
have been drastic yet the usage of the conventional mailing system is widely practice
6
thought out the world. Most of our important and official documents are sending by
the conventional way [2]. The centralize mailbox system is as shown in figure 2.1
Figure 2.1: Centralize mailbox system
This research has found a new revolution in using newer technologies to alert
the users on the event a mail is delivered, especially through the short message
service (SMS).
2.2.2 Control of the mail alert system
The Automatic Mail Detector via Sms (AMDETSYS) is a device that helps
the users by sending a real time notification on mail delivery overwriting the
conventional way of checking mails. This research on the real time AMDETSYS is a
new beginning for the mankind within the reach of available technology in making
our life’s easy especially for domestic and commercial users such as the industrial
people and office users [3].
7
2.2.3 Elements of AMDETSYS (Concept)
2.2.3.1 PIC Microcontroller for main circuit
The PIC microcontroller is the control unit used in the AMDETSYS is as
shown in figure 2.2. It compromises the requirements of the AMDETSYS in
supporting with real time control system with the capability of preprogrammed
wireless communication alerting system. The PIC microcontroller is an intelligent
and efficient device which is capable to work without human interventions at all
times. [4]
Figure 2.2: PIC 16F877A microcontroller
A PIC microcontroller is a processor with built in memory and RAM and can
be used to control much kind of projects (or build projects around it). So it saves
cost and etc to building a circuit that need to have separate external RAM, ROM and
peripheral chips. [4]