0% found this document useful (0 votes)
5 views67 pages

Project Report

The document presents a project report on the development of a School Bus Monitoring System using IoT, aimed at enhancing the safety and tracking of school children during transportation. It incorporates GPS and GSM technologies for real-time location tracking and biometric identification for student verification, addressing concerns about children's safety and potential accidents. The report outlines the project's objectives, methodologies, and applications, emphasizing the importance of technology in ensuring secure school transportation.

Uploaded by

kedarivilas90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views67 pages

Project Report

The document presents a project report on the development of a School Bus Monitoring System using IoT, aimed at enhancing the safety and tracking of school children during transportation. It incorporates GPS and GSM technologies for real-time location tracking and biometric identification for student verification, addressing concerns about children's safety and potential accidents. The report outlines the project's objectives, methodologies, and applications, emphasizing the importance of technology in ensuring secure school transportation.

Uploaded by

kedarivilas90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

DEVELOPMENT OF SCHOOL BUS

MONITORING SYSTEM USING IOT

A PROJECT REPORT

Submitted by

ASHWIN S (17BMC027)
BHUVANKARTHI D M (17BMC042)
GOWTHAMKUMAR T J (17BMC034)
NIDHISH KUMAR M (17BMC052)

in partial fulfillment for the award of the degree


of

BACHELOR OF ENGINEERING
IN

MECHATRONICS ENGINEERING

KUMARAGURU COLLEGE OF TECHNOLOGY,


COIMBATORE 641 049
(An Autonomous Institution Affiliated to Anna University, Chennai)

MAY - 2021
KUMARAGURU COLLEGE OF TECHNOLOGY,
COIMBATORE - 641 049
(An Autonomous Institution Affiliated to Anna University, Chennai)

BONAFIDE CERTIFICATE

Certified that this project report “DEVELOPMENT OF SCHOOL BUS

MONITORING SYSTEM USING IOT” is the bonafide work of “ASHWIN S,

BHUVANKARTHI D M, GOWTHAMKUMAR T J, NIDISH KUMAR M” who

carried out the project work under my supervision.

SIGNATURE SIGNATURE

Dr. M. SARAVANA MOHAN MURUGESAN K


HEAD OF THE DEPARTMENT SUPERVISOR

DEPARTMENT OF MECHATRONICS DEPARTMENT OF MECHATRONICS


ENGINEERING ENGINEERING

KUMARAGURU COLLEGE OF KUMARAGURU COLLEGE OF


TECHNOLOGY TECHNOLOGY
COIMBATORE - 641049 COIMBATORE - 641049

INTERNAL EXAMINER EXTERNAL EXAMINER


ABSTRACT

The present generation requires the information time to time. The use of technology have been
increasing day by day. So, we are planning for the combination of present technology with the
requirement of information transmission, we planned for the creative approach of “Vehicle Tracking
System using GPS and GSM”.
To overcome the drawbacks of the previous methods of paper based and we introduce a project to
track a vehicle using GPS and GSM. For this, the Vehicle Tracking System can also be used for
Accident Detection Alert System, Soldier Tracking System and many more, by just making few
changes in hardware and software and widely in tracking Cabs/Taxis, stolen vehicles, school/colleges
buses.
In present time due to increase in the number of kidnapping and road accident cases, parents
always worry about their school going children. This paper recommends an android based solution
which assists parents to track their children’s location in real time using IoT implications. To track
the location GPS technology is used and to identify the identity of the child a biometric identification
is used which is inbuilt in the system. Whenever a child boards a bus, the system will identify the
child and update logs on the server. This information consisting the current location and time which
will be saved on school server and would be send to the parent’s cell phone. Also, when the child
reaches home; parent need to send a text message to the school server ID; this will act as an
acknowledgement of child reaching home safe.

KEY WORDS: GPS, GSM, Tracking system


ACKNOWLEDGEMENT

The successful completion of our Project was due to the effort of not just us but also the
faculties who guided and motivated us. We are greatly indebted to our Respected Principal
Dr. D. Saravanan, who provided us this opportunity. We express our gratitude to
Dr. M. Saravana Mohan, Head of the Department of Mechatronics Engineering,
Kumaraguru College of Technology for his encouragement. We are very grateful to our
project coordinator Prof. A. Ramkumar and our project supervisor Prof. K. Murugesan,
Department of Mechatronics Engineering, for his valuable guidance, timely help, constant
encouragement and advice rendered throughout the project period for the successful
completion of project. We are grateful to the faculty members of the Department of
Mechatronics Engineering, who have helped us in innumerable ways.

SI. NO. NAME REGISTER SIGNATURE


NUMBER
1 ASHWIN S 17BMC027

2 BHUVANKARTHI.D.M 17BMC042

3 GOWTHAMKUMAR.T.J 17BMC034

4 NIDHISH KUMAR.M 17BMC052


TABLE OF
CONTENTS

CHAPTER TITLE PAGE

ABSTRACT 3
LIST OF TABLES 6
LIST OF FIGURES 7
NOMENCLATURE 8

1 INTRODUCTION
1.1 OBJECTIVE 10
1.2 INTRODUCTION OF EMBEDDED 10
SYSTEMS
1.3 APPLICATIONS OF EMBEDDED 11
SYSTEMS
1.3.1 MILITARY AND AEROSPACE 13
SOFTWARE APPLICATIONS
1.3.2 COMMUNICATION 13
APPLICATIONS
1.3.3 ELECTRONIC DEVICES AND 14
CONSUMER DEVICES
1.4 INDUSTRIAL AUTOMATION AND 14
PROCESS CONTROL SOFTWARE

2 LITERATURE REVIEW 15
3 MATERIALS AND METHODS 21
3.1 BLOCK DIAGRAM 21
3.2 FUNCTION OF EACH BLOCK 22
3.3 GSM TECHNOLOGY 24
3.3.1 DEFINITION 24
3.3.2 HISTORY OF GSM 25
3.3.3 GSM SERVICES 26
3.3.4 OPERATION OF GSM 27
3.3.5 SECURITY IN GSM 28
3.3.6 CHARACTERISTICS OF GSM 28
3.3.7 ADVANTAGES OF GSM 29
3.3.8 GSM APPLICATIONS 29
3.3.9 FUTURE OF GSM 30

4 HARDWARE IMPLEMENTATION 31
4.1 PIC16F877A MICROCONTROLLER 31
4.1.1 INTRODUCTION OF PIC16F877A 31
4.1.2 ARCHITECTURE OF PIC16F877A 32
4.1.3 MEMORY ORGANIZATION OF 34
PIC16F877A
37
4.1.4 SFR
4.1.5.IOT GENERAL DESCRIPTION 37

4.2 LIQUID CRYSTAL DISPLAY (16 X 2) 39


4.3 RELAY 42
4.3.1 NPN RELAY SWITCH CIRCUIT 44
4.3.2 RELAY SWITCH CIRCUIT 46
SUMMARY
4.4 DC MOTOR 47
4.5 POWER SUPPLY 49

4.5.1 TRANSFORMER 49

4.5.2 RECTIFIER 50

4.5.3 FILTERS 50

4.6 MESSAGE MANAGEMENT 51


FLOWCHART AND WORKING 54
5 PROCEDURE
5.1 FLOW CHART 54

5.2 WORKING PROCEDURE 55

5.3 ALGORITHM 55

5.4 CREATING PROJECT IN ARDUINO


1.7.11 VERSION 55

6 CONCLUSION AND FUTURE WORKS 66


6.1 RESULT 66

6.2 CONCLUSION 68
68
6.2 SCOPE OF FUTURE STUDIES
REFERENCES 69
LIST OF TABLES

TABLE TITLE PAGE


4.1 DATA MEMORY ORGANISATION OF PIC 37
4.3.1 MESSAGE MANAGEMENT GENERAL DESCRIPTION 43
THROUGH LCD
LIST OF FIGURES

FIGURE TITLE PAGE


1.1 BLOCK DIAGRAM OF EMBEDDED SYSTEM 13
3.1 BLOCK DIAGRAM 22
3.2 GSM MODULE 26
3.3 GRAPH OF GSM MODULE 27
3.4 GSM NETWORK ARCHITECTURE 28
3.5 OPERATION OF GSM 29
4.1 PIN CONFIGURATION OF PIC16F877A 33
4.2 PIC ARCHITECTURE 34
4.3 PIC PROGRAM MEMORY 36
4.4 LCD 40
4.4.1 PROCEDURE ON 8-BIT INITIALIZATION 41
4.4.2 INTERNAL STRUCTURE OF LCD 42
4.5 NPN RELAY SWITCH CIRCUIT 45
4.6 BLOCK DIAGRAM OF POWER SUPPLY 49
5.1 FLOW CHART 55
NOMENCLATURE

ABBREVIATIONS:

CPU Central Processing Unit


DC Direct Current
ECD Electrostatic Discharge
DPS Digital power supply
G Ground
IE Interrupt Enable
IP Interrupt priority
ISP In-System Programmable
IEEE Institute of Electrical and Electronics
Engineers
ALE Address latch enable.
SFR Special function registers
PCON Power control register
TCON Timer control registers
TMOD Timer mode
ROM Read only memory
RAM Random access memory
UART Universal asynchronous
receiver/transmitter
CHAPTER 1

INTRODUCTION

1.1 OBJECTIVE

School bus plays an essential role in carrying most of children everyday all over the
world. While there are several problems that might disturb the parents with respect to the travel
of school going kids; the paper aspires to look into initiating the safety with respect of school
buses through bus tracking and security system that will help the school kids’ transportation in
a protected and more secure way. The circumstance of forgetting kids in the bus is one of the
problems suffered, that has risen considerably in recent years. This has often led to the demise
of many students due to suffocation. The commute of students from home to school and back
has always been a source of concern for parents. Students often get on the wrong buses and get
off at the wrong stops. Bus drivers may not be able to identify all the students and will not know
in time if a student is missing. Parents have no way of knowing if their ward is safe until the
evening when the bus returns. An article published in India says in every eight minutes a child
goes missing as data published by national crime records bureau. Statistical report says that
around 50,000 children go missing every year from which 42% children are not found.

This system is designed using single microcontroller which will reduce the hardware
size and so the cost. The biometric identification of the child using a fingerprint module help
to identify and maintain records of students travelling to and from between school and their
respective drop point. The real time monitoring of the bus through GPS technology will help
parents to track the school bus and their estimated time to reach home back. Alcohol intake
detection using an alcohol sensor and over-speeding of the bus is tracked as a safety measure.
The paper also suggests an IoT based bus safety mechanism which is designed to count the

11
entry/exit of students from the bus, through which it intends to create an appropriate
environment via following certain set of criteria of security and wellbeing for the school
transport that will have a positive impact on safety of children.

1.2 INTRODUCTION TO EMBEDDED SYSTEMS

The microprocessor-based system is built for controlling a function or range of functions


and is not designed to be programmed by the end user in the same way a PC is defined as an
embedded system. An embedded system is designed to perform one particular task albeit with
different choices and options.

Embedded systems contain processing cores that are either microcontrollers or digital
signal processors. Microcontrollers are generally known as "chip", which may itself be
packaged with other microcontrollers in a hybrid system of Application Specific Integrated
Circuit (ASIC). In general, input always comes from a detector or sensors in more specific word
and meanwhile the output goes to the activator which may start or stop the operation of the
machine or the operating system.

An embedded system is a combination of both hardware and software, each embedded


system is unique, and the hardware is highly specialized in the application domain. Hardware
consists of processors, microcontroller, IR sensors etc. On the other hand, Software is just like
a brain of the whole embedded system as this consists of the programming languages used
which makes hardware work. As a result, embedded systems programming can be a widely
varying experience.

An embedded system is combination of computer hardware and software, either fixed


incapability or programmable, that is specifically designed for particular kind of application
device. Industrial machines, automobiles, medical equipment, vending machines and toys (as

12
well as the more obvious cellular phone and PDA) are among the myriad possible hosts of an
embedded system. Embedded systems that are programmable are provided with a programming
interface, and embedded systems programming id specialized occupation.

Embedded Systems

Hardware Software

Microcon EX.Keil
trollers or ,Arduino etc...
microproces
sors
Figure 1.1 Block diagram of embedded system

Figure2.1 illustrate the Block diagram of Embedded System (ES consists of hardware
and software part which again consists of programming language and physical peripherals
respectively).
On the other hand, the microcontroller is a single silicon chip consisting of all input,
output and peripherals on it. A single microcontroller has the following features:

13
1. Arithmetic and logic unit

2. Memory for storing program.

3. EEPROM for nonvolatile and special function registers

4. Input/output ports

5. Analog to digital converter

6. Circuits

7. Serial communication ports

1.3 APPLICATIONS OF EMBEDDED SYSTEM

We are living in the embedded world. You are surrounded with many embedded
products and your daily life largely depends on the proper functioning’s of these gadgets,
television, radio, CD layer of your living room, washing machines or microwave oven in your
kitchen, card readers, access controllers, palm devices of your work space enable to do many
of your tasks very effectively. Apart from all these, many controllers embedded in your car take
care of your car operation between the bumper and most of the times tend to ignore all these
controllers.

In recent days you are showered with variety of information about these embedded
controllers in many places. All kind of magazines and journals regularly dish out details about
latest technologies, new devices: fast applications which make you believe that your basic
survival is controlled by these embedded products. Now you can agree to that fact these
embedded products have successfully invaded into our world. you must be wandering about
these embedded controllers or systems.

14
The computer you use to compose your mails or create a document or analyze the
database is known as standard desktop computer. These desktop computers are manufactured
to serve many purposes and applications.

1.3.1 MILITARY AND AEROSPACE SOFTWARE APPLICATIONS

From in-orbit embedded system to jumbo jets to vital battlefield networks, designer’s
performance, scalability, and high-availability facilities consistently turn to the Linux OS,
RTOS and LinuxOS-178RTOs for software certification to DO-178B rich in system resources
and networking serviced, Linux OS provides an off-the-shelf software platform with hard real-
time response backed by powerful distributed computing
(COBRA), high reliability’s software certification, and long-term support options.

1.3.2 COMMUNICATIONS APPLICATIONS

Five-nine” availability, compact PCI hot swap support, and hard real-time response
Linux OS delivers on these key requirements and more for today’s carrier-class systems.
Scalable kernel configurations, distributed computing capabilities, intergraded communications
stacks, and fault-management facilities make Linux OS the ideal choice for companies looking
for single operating system for all embedded telecommunication applications from complex
central to single line/trunk cards.

15
1.3.3 ELECTRONICS APPLICATIONS AND CONSUMER DEVICES

As the number of powerful embedded processor in consumer devices continues to rise,


the blue cat Linux operating system provides a highly reliable and royalty-free option for
system designers. And as the wireless appliance revolution rolls on, web enabled navigation
systems, radios, personal communication devices, phones and PDAs all benefit from the cost-
effective dependability, proven stability and full product life cycle support opportunities
associated with blue cat embedded Linux. Blue cat has teamed with industry leaders to make
it easier to build Linux mobile phones with java integration.

1.4 INDUSTRIAL AUTOMATION AND PROCESS CONTROL SOFTWARE

Designers of industrial and process control systems know from experience that Linux
works operating system provide the security and reliability that their industrial applications
require. From ISO 9001 certification to fault-tolerance, secure portioning and high availability,
we’ve got it all. The advantage of our 20 years of experience with the embedded system. Now
a day’s embedded system widely using in the industrial areas to reduce to tike perform the task.
This replacing the less work and also more efficient gives the accurate result.

16
CHAPTER 2

LITERATURE REVIEW

INTRODUCTION

The literature review comprises of numerous papers of child safety, driver safety, live
location and path tracking of buses. The common features across the previous work include
location tracking and transmission, unique identification of each child and notifications
about the activity to parents. The first and most important feature, common to all
applications, was the live location tracking of the bus.

USING ANDROID APP TO TRACK STUDENTS VIA GPS

G. Jemilda et al proposed a paper [1] built as an android application. The driver


switches on his location at the start of the route which is transmitted via the app to all
registered users. However, this does not take account to pick-up and drop-off activity of
each passenger. In more advanced papers, each student’s pick up and drop off is noted.
Location is primarily implemented via two means. Some solutions use a separate GPS
module installed on the bus, which transmits the live location to the school servers at all
times. From there, the parents are notified. This system is robust as the GPS module
functions are reliable with less chance of failure, however, requires additional hardware
and greater complexity for integration into a mobile app. In contrast, other research efforts
in this domain make use of the inbuilt GPS present in mobile phones. The conductor/driver
has the tracking application installed from which the live location is constantly transmitted
to authorities and parents. This is much simpler to implement and less expensive, however,
requires the bus staff’s phone to be constantly operational. The review concluded that
location tracking using the phone’s inbuilt GPS was the more viable option due to its ease
of use. Since the application requires a unique notification for each student at their pick up

17
and drop off, the student needs to be identified by the application so his/her parents are
notified.

USING RFID SCANNERS

Snehal P. Umratkar et al had an approach [2] which designed an android app geared
at toddler’s safety. In this, the conductor manual makes note of the child as they board or
leave and enters the child’s ID into the application. To make the process more automated,
RFID readers were used by numerous applications. RFID tags each represent a unique
value, which can be attached to the child’s ID Card. A scan of these tags will authenticate
the child and record his entry or exit from the bus. Mayur Bhor et al [3] proposed RFID
technology to be used alongside GPS. On scanning, the transmissions would be received
by an LCD which would keep a count of the students on the bus at a time. Further
implementations of RFID were also seen in numerous other references, used in conjunction
with other techniques. [7] [8] [9] [12] [14] [16] However RFID tags require special
scanners that either need to be attached to the phone or used independently. Moreover the,
scanned data also has to be transmitted to the server. An alternative to this was using QR
codes. Since most phones come equipped with a QR-Scanner, these can easily be integrated
into a mobile application.

USING QR SCANNERS

Sangeetha et al [4] proposed one such system where a QR code is scanned every
time the child boards a system and a notification goes to the parent. This was also further
implemented in [11] and [13]. Therefore, out of surveyed techniques, the QR code appears
to be the best for authentication. Once the child has been authenticated on boarding the
bus, a notification is dispatched to concerned authorities. In cases where a mobile
application is not used, such as the work of Amit Boyar et al [7] and [12] and S.Dukre et
al [14], the authors propose a GSM module to establish a connection between the scanning
device used on the bus and the server of the school. From there, via SMS notifications are
dispatched.P.Ambekdar et al [15] made use of GPS in the school buses so that all the
18
signals from the vehicle are sent to an integrated central server, which communicates with
parents via email or text, thus not requiring a smartphone. However, for approaches using
mobile apps, the parent is notified via an app notification itself. [3] [5] [10] Simultaneously,
a notification log is dispatched and recorded in the school-side server, for the school
authorities to refer. Many existing systems surveyed also have special mechanisms to
provide added layers of security. They can issue alerts in case of the system detecting any
unusual activity, or simply provide additional information besides pick up, drop off and
location.

TRACKING IN CASE OF UNSTABLE INTERNET CONNECTION

Supriya S Sinha et al [5] proposed an application wherein, the system also constantly
provide the estimated arrival time for each child. The system keeps track of all expected
bus routes, and in case of lack of internet connection causing the bus live location to not
be transmitted, it computes the estimated time using the normal route and average bus
speed. The tracking system designed by Miss.M. R. Desai. [11] is yet another mobile
application which provides the instantaneous location and time arrival statistics. In S.Eken
et al’s work [13] the estimated arrival time calculated using the C4.5 algorithm to lessen
the passengers waiting time. It takes into account road and traffic conditions, possible
routes and locations. The innovative system proposed by TS Lim et al [8] uses an alcohol
sensing technology to prevent possible accidents and also uses an odometer, to keep the
speed of the bus in check.

Along similar lines, Abhilash R et al [6] used accelerometer sensors of the phone to alert
in case of over speeding, jerks, or accidents. Another novel feature implemented was
detecting deviation from the expected route. In I.kormaz et al’s work [17], the expected
route for each bus is included in the system. At different points during the current trajectory
is compared with the normal route and if the bus is found to be off-track, and alert is issued
to the school authorities. The literature survey indicates that a smart-phone based solution
is the most viable and easiest to use and implement. Thus, keeping an android based

19
solution in mind, this paper proposes automated authentication and identification of
children to record travel activity. It incorporates additional security features besides
location tracking and notifications, such as detecting route anomalies, issuing alerts and
predicting delays. The system avoids the use of expensive or complicated hardware and
has an interface that is easy to use.

OUR PROJECT

We developed a school bus tracking device, in collaboration with RFID, GPS and
GSM/GPRS technologies. Whenever a child enters/exits the bus, the tracking system is
capable of notifying the child’s parents, through SMS alerts. An Android application has
been developed to display vehicle location on Google maps and, display arrival times of a
school bus, at each of its designated bus-stop. The implementation is very cost-effective,
as it is based on easily accessible electronic devices. To predict the expected arrival time
of school bus, at each node (stop), we resorted to Kalman filtering dynamic algorithm. The
accuracy of the algorithm calculated using RMSE was shown to be self-evident as the
algorithm’s predictions returned the most accurate results. We found that a single algorithm
cannot predict 100% accurate results. We assert that the accuracy of the proposed system
can be enhanced by unifying the algorithm with other machine learning algorithms, such
as Artificial Neural Network (ANN), Support Vector Machine (SVM).

20
CHAPTER 3

MATERIALS AND METHODS

3.1 BLOCK DIAGRAM OF THE PROJECT

Fig:3.1. Block diagram[7]

21
3.2 FUNCTIONS OF EACH BLOCK

POWER SUPPLY:

The primary function of a power supply is to convert one form of electrical energy into another
and, as a result power supplies.

MICROCONTROLLER:

The microcontroller is used to manipulate the serial operation based the program present in the
output is taken from one of the four ports.

LCD DISPLAY:

LCDs are available to display arbitrary images which can be displayed or hidden, such as preset
words, digits and 7 segment displays as in a digital clock. They use some basic technology,
except that arbitrary images are made up of a large number of pixels, while other displays have
larger elements.

GSM MODEM:

Global system for mobile communication (GSM) is a globally accepted standard for
digital cellular communication. GSM is the name of a standardization group established in 1982
to create a common European mobile telephone standard that would formulate specifications
for a pan-European mobile cellular radio system operating at 900 MHz

22
GPS RECEIVER:

GPS, in full Global Positioning System, space-based radio-navigation system that


broadcasts highly accurate navigation pulses to users on or near the Earth. In the United States’
Navstar GPS, 24 main satellites in 6 orbits circle the Earth every 12 hours. In addition, Russia
maintains a constellation called GLONASS (Global Navigation Satellite System).

Finger printer:
Finger print scanning technology uses a finger print scanner to identify people and
provide a high level of security. In the case of a computer, finger scanner software is installed
to allow the finger print scanner to identify people using the computer and deny access to
anyone whose fingerprints do not match those of the people allowed to use the computer.

PIC16F877A microcontroller
PIC16f877a finds its applications in a huge number of devices. It is used in remote
sensors, security and safety devices, home automation and in many industrial instruments. An
EEPROM is also featured in it which makes it possible to store some of the information
permanently like transmitter codes and receiver frequencies and some other related data. The
cost of this controller is low, and its handling is also easy. Its flexible and can be used in areas
where microcontrollers have never been used before as in coprocessor applications and timer
functions.

DC MOTOR :

DC motor is any of a class of electrical machines that converts direct current electrical power
into mechanical power. Nearly all types of DC motors have some internal mechanism, either
electromechanical or electronic, to periodically change the direction of current flow in part of
the motor. Most types produce rotary motion; a linear motor directly produces force and motion
in a straight line.

23
DC motors were the first type widely used, since they could be powered from existing
direct-current lighting power distribution systems. A DC motor's speed can be controlled over
a wide range, using either a variable supply voltage or by changing the strength of current in
its field windings. Small DC motors are used in tools, toys, and appliances. The universal
motor can operate on direct current but is a lightweight motor used for portable power tools
and appliances.

3.3 GSM TECHNOLOGY

3.3.1 DEFINITION OF GSM

Global system for mobile communication (GSM) is a globally accepted standard for digital
cellular communication. GSM is the name of a standardization group established in 1982 to
create a common European mobile telephone standard that would formulate specifications for
a pan-European mobile cellular radio system operating at 900 MHz

Figure3.2 GSM module

24
3.3.2 HISTORY OF GSM

Global system for mobile communication is a globally accepted standard for digital
cellular communication. GSM is the name of a standardization group established in 1982 to
create a common European mobile telephone standard that would formulate specifications for
a pan-European mobile cellular radio system operating at 900 MHz It is estimated that many
countries outside of Europe will join the GSM partnership. GSM, the Global System for Mobile
communications, is a digital cellular communications system, which has rapidly gained
acceptance and market share worldwide, although it was initially developed in a European
context. In addition to digital transmission, GSM incorporates many advanced services and
features, including ISDN compatibility and worldwide roaming in other GSM networks. The
advanced services and architecture of GSM have made it a model for future third generation
cellular systems, such as UMTS. This will give an overview of the services offered by GSM,
the system architecture, the radio transmission

Figure3.3 Graph for GSM module [8]

25
3.3.3 GSM Services

⚫ Tele-services

⚫ Bearer or Data Services

⚫ Supplementary services

Tele-services:

Telecommunication services that enable voice communication via mobile phones


Offered services, Mobile telephony, Emergency calling

Bearer or Data Services:

Include various data services for information transfer between GSM and other networks
like PSTN, ISDN etc. at rates from 300 to 9600 bps ,Short Message Service (SMS) up to 160-
character alphanumeric data transmission to/from the mobile terminal Unified, Messaging
Services (UMS),Group 3 fax, Voice mailbox, Electronic mail

Supplementary services

Call related services like Call Waiting- Notification of an incoming call while
on the handset, Call Hold- Put a caller on hold to take another call, Call Barring- All
calls, outgoing calls, or incoming calls, Call Forwarding- Calls can be sent to various
numbers defined by the user, Multi Party Call Conferencing - Link multiple calls
together

⚫ CLIP – Caller line identification presentation

⚫ CLIR – Caller line identification restriction

26
Figure3.4 GSM Network Architecture [9]

3.3.4 Operation GSM

The basis of the GPS is a constellation of satellites that are continuously


orbiting the earth. These satellites, which are equipped with atomic clocks, transmit
radio signals that contain their exact location, time, and other information. The radio
signals from the satellites, which are monitored and corrected by control stations,
are picked up by the GPS receiver. A Global Positioning System receiver needs only
three satellites to plot a rough, 2D position, which will not be very accurate.

27
Figure3.5 GSM operation

3.3.5 Security in GSM

⚫ On air interface, GSM uses encryption and TMSI instead of IMSI.

⚫ SIM is provided 4–8-digit PIN to validate the ownership of SIM 3


algorithms are specified :
- A3 algorithm for authentication

- A5 algorithm for encryption

- A8 algorithm for key generation

3.3.6 Characteristics of GSM Standard

⚫ Fully digital system using 900,1800 MHz frequency band.

⚫ TDMA over radio carriers(200 KHz carrier spacing.

⚫ 8 full rate or 16 half rate TDMA channels per carrier.

⚫ User/terminal authentication for fraud control.

⚫ Encryption of speech and data transmission over the radio path.

28
⚫ Full international roaming capability.

⚫ Low speed data services (up to 9.6 Kb/s).

⚫ Compatibility with ISDN.

⚫ Support of Short Message Service (SMS).

3.3.7 Advantages of GSM over Analog system

⚫ Capacity increases

⚫ Reduced RF transmission power and longer battery life.

⚫ International roaming capability.

⚫ Better security against fraud (through terminal validation and user authentication).

⚫ Encryption capability for information security and privacy.

⚫ Compatibility with ISDN, leading to wider range of services.

3.3.8 GSM Applications

⚫ Mobile telephony

⚫ GSM-R

⚫ Telemetry System

- Fleet management

- Automatic meter reading

- Toll Collection

29
3.3.9Future of GSM

⚫ 2nd Generation

– GSM -9.6 Kbps (data rate

⚫ Generation ( Future of GSM)

– HSCSD (High Speed circuit Switched data ) its data rate : 76.8 Kbps (9.6
x 8 kbps)
– GPRS (General Packet Radio service) its data rate: 14.4 - 115.2 Kbps

– EDGE (Enhanced data rate for GSM Evolution) its data rate: 547.2 Kbps
(max)

⚫ 3 Generation

– WCDMA(Wide band CDMA its data rate : 0.348 – 2.0 Mbps

30
CHAPTER 4

HARDWARE IMPLEMENTATION

4.1.PIC MICROCONTROLLER Description


The PIC microcontroller PIC16f877a is one of the most renowned
microcontrollers in the industry. This controller is very convenient to use, the coding or
programming of this controller is also easier. One of the main advantages is that it can be
write-erase as many times as possible because it uses FLASH memory technology. It has a
total number of 40 pins and there are 33 pins for input and output. PIC16F877A is used in
many pic microcontroller projects. PIC16F877A also have many applications in digital
electronics circuits.

4.1.1. Introduction to PIC16F877A microcontroller


PIC16f877a finds its applications in a huge number of devices. It is used in remote
sensors, security and safety devices, home automation and in many industrial instruments.
An EEPROM is also featured in it which makes it possible to store some of the information
permanently like transmitter codes and receiver frequencies and some other related data.
The cost of this controller is low and its handling is also easy. Its flexible and can be used
in areas where microcontrollers have never been used before as in coprocessor applications
and timer functions etc.

31
Figure4.1 PIN CONFIGURATION OF PIC16F877A [10]

4.1.2 Architecture

32
Figure 4.2 PIC Architecture

33
4.1.3.Memory Organization of PIC16F877

The memory of a PIC 16F877 chip is divided into 3 sections. They are

1. Program memory
2. Data memory and
3. Data EEPROM
Program memory
Program memory contains the programs that are written by the user. The program
counter (PC) executes these stored commands one by one. Usually, PIC16F877 devices have
a 13-bit wide program counter that is capable of addressing 8K×14-bit program memory
space. This memory is primarily used for storing the programs that are written (burned) to be
used by the PIC. These devices also have 8K*14 bits of flash memory that can be electrically
erasable /reprogrammed. Each time we write a new program to the controller, we must delete
the old one at that time. The figure below shows the program memory map and stack.

Figure 4.3 PIC16f877 Program Memory [11]

34
The PIC16F87XA family has an 8-level deep x 13-bit wide hardware stack. The stack
space is not a part of either program or data space and the stack pointers are not readable
or writable. In the PIC microcontrollers, this is a special block of RAM memory used
only for this purpose. Each time the main program execution starts at address 0000 –
Reset Vector. The address 0004 is “reserved” for the “interrupt service routine” (ISR).

PIC16F87XA Data Memory Organization


The data memory of PIC16F877 is separated into multiple banks which contain the
general-purpose registers (GPR) and special function registers (SPR). According to the type
of the microcontroller, these banks may vary. The PIC16F877 chip only has four banks
(BANK 0, BANK 1, BANK 2, and BANK4). Each bank holds 128 bytes of addressable
memory.

Data Memory Organization

BANK RP0 RP1

0 0 0

1 1 0

2 0 1

3 1 1

Table 4.1 A bit of RP1 & RP0 of the STATUS register selects the bank access.

Data EEPROM and FLASH


The data EEPROM and Flash program memory is readable and writable during normal
operation (over the full VDD range). This memory is not directly mapped in the register file
35
space. Instead, it is indirectly addressed through the Special Function Registers. There are
six SFRs used to read and write this memory:

• EECON1

• EECON2

• EEDATA

• EEDATH

• EEADR

• EEADRH

The EEPROM data memory allows single-byte read and writes. The Flash program
memory allows single-word reads and four-word block writes. Program memory write
operations automatically perform an erase-before write on blocks of four words. A byte write
in data EEPROM memory automatically erases the location and writes the new data (erase-
before-write). The write time is controlled by an on-chip timer. The write/erase voltages are
generated by an on-chip charge pump, rated to operate over the voltage range of the device for
byte or word operations.

4.1.4.SPECIAL FUNCTION REGISTERS (SFR)

The special function registers are also memory registers which is used for special
dedicated functions. These registers perform various dedicated functions inside the PIC
chip. Each special function inside this PIC chip is controlled by using these registers. These
registers are used by the CPU and peripheral modules for controlling the desired operation
of the device. These registers are normally implemented as in the form of static RAM

36
memory. A list of these registers is given in the tables below. The Special Function Registers
can be classified into two sets: core (CPU) and peripheral. Those registers associated with
the core functions are described in detail in this section. The figures below show SFR
memory map of PIC16F877.

4.1.5. IoT GENERAL DESCRIPTION

IoT has evolved from the convergence of wireless technologies, microelectron


mechanical systems (MEMS) and the Internet. The concept may also be referred to as the
Internet of Everything. The internet of things(IoT) is the internetworking of physical devices,
vehicles, buildings and other items—embedded with electronics, software, sensors, actuators,
and network connectivity that enable these objects to collect and exchange data. A thing, in the
Internet of Things, can be a person with a heart monitor implant, a farm animal with a biochip
transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low
--or any other natural or man-made object that can be assigned an IP address and provided with
the ability to transfer data over a network.

4.1.6. PRODUCT DESCRIPTION


Internet of Things (IoT) is an environment in which objects, animals or people are
provided with unique identifiers and the ability to transfer data over a network without requiring
human-
to-human or human-to-computer interaction. The IoT allows objects to be sensed and/or
controlled remotely across existing network infrastructure, creating opportunities for more
direct integration of the physical world into computer-based systems, and resulting in improved
efficiency, accuracy and economic benefit. IoT board featured with SIM900 GPRS modem to
activate internet connection also equipped with a controller to process all input data.
UART data to GPRS based online data. Data may be updated to a specific site or a social

37
network by which the user can able to access the ratio.
FEATURES
• Power Supply: DC +12v 1Amp.
• Auto data updating: 30sec
• Digital Output port Pins: +5V DC
• Message Format: *message or Data # (Start with * and End with #)
• Provided with 3 links
• Data updating to a specific web site
APPLICATIONS
• Online Traffic monitoring
• Online Health monitoring
• Real time Transport and Logistics monitoring
• Daily life and domestics

4.2LIQUID CRYSTAL DISPLAY (16 X 2 )

LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.


2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep
displaying the data.
4. Ease of programming for characters and graphics.

These components are “specialized” for being used with the microcontrollers,
which means that they cannot be activated by standard IC circuits. They are used

38
for writing different messages on a miniature LCD.

Fig 4.4 : LCD Display

A model described here is for its low price and great possibilities most
frequently used in practice. It is based on the HD44780 microcontroller (Hitachi)
and can display messages in two lines with 16 characters each. It displays all the
alphabets, Greek letters, punctuation marks, mathematical symbols etc. In addition,
it is possible to display symbols that user makes up on its own. Automatic shifting
message on display (shift left and right), appearance of the pointer, backlight etc.
are considered as useful characteristics.

Pins Functions

There are pins along one side of the small printed board used for connection
to the microcontroller. Their function is described in the table

39
Figure 4.4.1: Procedure on 8-bit initialization.

LCD screen:

LCD screen consists of two lines with 16 characters each. Each character
consists of 5x7 dot matrix. Contrast on display depends on the power supply voltage
and whether messages are displayed in one or two lines. Trimmer potentiometer is
usually used for that purpose. Some versions of displays have built in backlight
When used during operating, a resistor for current limitation should be used

40
Figure 4.4.2: Internal Structure of LCD

LCD Basic Commands


All data transferred to LCD through outputs D0-D7 will be interpreted as commands or
as data, which depends on logic state on pin RS:
RS = 1 - Bits D0 - D7 are addresses of characters that should be displayed. Built in processor
addresses built in “map of characters” and displays corresponding symbols. Displaying position
is determined by DDRAM address. This address is either previously defined or the address of
previously transferred character is automatically incremented.

RS = 0 - Bits D0 - D7 are commands which determine display mode. List of commands which
LCD recognizes are given in the table below:

41
Table 4.2 LCD BASIC COMMANDS
Refer reference [12]

42
4.3.RELAY:

A relay is an electrically operated switch. Many relays use an electromagnet to mechanically


operate a switch, but other operating principles are also used, such as solid-state relays. Relays are used
where it is necessary to control a circuit by a separate low-power signal, or where several circuits
must be controlled by one signal. The first relays were used in long distance telegraph circuits as
amplifiers: they repeated the signal coming in from one circuit and re-transmitted it on another circuit.
Relays were used extensively in telephone exchanges and early computers to perform logical
operations. A type of relay that can handle the high power required to directly control an electric
motor or other loads is called a contactor. Solid-state relays control power circuits with no moving parts,
instead using a semiconductor device to perform switching. Relays with calibrated operating
characteristics and sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are performed by digital
instruments still called "relays”. Magnetic latching relays require one pulse of coil power to move their
contacts in one direction, and another, redirected pulse to move them back. Repeated pulses from the
same input have no effect. Magnetic latching relays are useful in applications where interrupted power
should not be able to transition the contacts. Magnetic latching relays can have either single or dual
coils. On a single coil device, the relay will operate in one direction when power is applied with one
polarity, and will reset when the polarity is reversed. On a dual coil device, when polarized voltage
is applied to the reset coil the contacts will transition. AC controlled magnetic latch relays have single
coils that employ steering diodes to differentiate between operate and reset commands.

43
4.3.1NPN Relay Switch Circuit

A typical relay switch circuit has the coil driven by a NPN transistor switch, TR1 as shown depending
on the input voltage level. When the Base voltage of the transistor is zero (or negative), the transistor
is cut-off and acts as an open switch. In this condition no Collector current flows and the relay coil is
de-energized because being current devices, if no current flows into the Base, then no current will
flow through the relay coil.

If a large enough positive current is now driven into the Base to saturate the NPN transistor, the
current flowing from Base to Emitter (B to E) controls the larger relay coil current flowing through
the transistor from the Collector to Emitter.

For most bipolar switching transistors, the amount of relay coil current flowing into the Collector
would be somewhere between 50 to 800 times that of the required Base current to drive the transistor
into saturation. The current gain, or beta value ( β ) of the general purpose BC109 shown is typically
about 290 at 2mA (Datasheet).

Figure 4.5 NPN Relay switch circuit

Note that the relay coil is not only an electromagnet but it is also an inductor. When power is applied
to the coil due to the switching action of the transistor, a maximum current will flow as a result of the
DC resistance of the coil as defined by Ohms Law, (I = V/R). Some of this electrical energy is stored
within the relay coil’s magnetic field.

44
When the transistor switches “OFF”, the current flowing through the relay coil decreases and the
magnetic field collapses. However, the stored energy within the magnetic field has to go somewhere
and a reverse voltage is developed across the coil as it tries to maintain the current in the relay coil.
This action produces a high voltage spike across the relays coil that can damage the switching NPN
transistor if allowed to build up.

So, in order to prevent damage to the semiconductor transistor, a “flywheel diode”, also known as a
freewheeling diode, is connected across the relay coil. This flywheel diode clamps the reverse voltage
across the coil to about 0.7V dissipating the stored energy and protecting the switching transistor.
Flywheel diodes are only applicable when the supply is a polarized DC voltage. An AC coil requires
a different protection method, and for this an RC snubber circuit is used.

4.3.5Relay Switching Circuit Summary

In this tutorial we have seen how we can use both Bipolar Junction Transistors, either NPN or PNP
and Enhancement MOSFETs, either N-channel or P-channel as a transistor switching circuit.

Sometimes when building Electronic or Micro-controller circuits we want to use a transistor switch
to control a high-power device, such as motors, lamps, heating elements or AC circuits. Generally,
these devices require larger currents or higher voltages than a single power transistor can handle then
we can use a relay switching circuit to do this.

Bipolar transistors (BJT’s) make very good and cheap relay switching circuits, but BJT’s are current
operated devices as they convert a small Base current into a larger load current to energise the relay
coil.

However, the MOSFET switch is ideal as an electrical switch as it takes virtually no Gate current to
turn “ON”, converting a Gate voltage into a load current. Therefore, a MOSFET can be operated as
a voltage-controlled switch.

In many applications bipolar transistors can be substituted with enhancement-type MOSFETs


offering faster switching action, much higher input impedance, and probably less power dissipation.
The combination of a very high Gate impedance, very low power consumption in its “OFF” state,
and very fast switching capability makes the MOSFET suitable for many digital switching

45
applications. Also, with zero Gate current its switching action cannot overload the output circuit of a
digital gate or micro-controller.

However, because the gate of an E-MOSFET is insulated from the rest of the component, it is
especially sensitive to static electricity which could destroy the thin oxide layer on the Gate. Then
special care should be taken either when handling the component, or when it is in use and that any
circuit using e-MOSFETs includes appropriate protection from static and voltage spikes.

Also, for additional protection of either BJT’s or MOSFETs, always use a flywheel diode across and
relay coil to safely dissipate the back emf generated by the transistors switching action.

4.4.DC MOTOR :

DC motor is any of a class of electrical machines that converts direct current electrical power into
mechanical power. The most common types rely on the forces produced by magnetic fields. Nearly
all types of DC motors have some internal mechanism, either electromechanical or electronic, to
periodically change the direction of current flow in part of the motor. Most types produce rotary
motion; a linear motor directly produces force and motion in a straight line.

DC motors were the first type widely used, since they could be powered from existing direct-current
lighting power distribution systems. A DC motor's speed can be controlled over a wide range, using
either a variable supply voltage or by changing the strength of current in its field windings. Small DC
motors are used in tools, toys, and appliances. The universal motor can operate on direct current but
is a lightweight motor used for portable power tools and appliances. Larger DC motors are used in
propulsion of electric vehicles, elevator and hoists, or in drives for steel rolling mills. The advent of
power electronics has made replacement of DC motors with AC motors possible in many
applications.

Electromagnetic motor

A coil of wire with a current running through it generates an electromagnetic field aligned with the
center of the coil. The direction and magnitude of the magnetic field produced by the coil can be
changed with the direction and magnitude of the current flowing through it.

46
A simple DC motor has a stationary set of magnets in the stator and an armature with one or more
windings of insulated wire wrapped around a soft iron core that concentrates the magnetic field. The
windings usually have multiple turns around the core, and in large motors there can be several parallel
current paths. The ends of the wire winding are connected to a commutator. The commutator allows
each armature coil to be energized in turn and connects the rotating coils with the external power
supply through brushes. (Brushless DC motors have electronics that switch the DC current to each
coil on and off and have no brushes.)

The total amount of current sent to the coil, the coil's size and what it's wrapped around dictate the
strength of the electromagnetic field created.

The sequence of turning a particular coil on or off dictates what direction the effective
electromagnetic fields are pointed. By turning on and off coils in sequence a rotating magnetic field
can be created. These rotating magnetic fields interact with the magnetic fields of the magnets
(permanent or electromagnets) in the stationary part of the motor (stator) to create a force on the
armature which causes it to rotate. In some DC motor designs the stator fields use electromagnets to
create their magnetic fields which allow greater control over the motor.

At high power levels, DC motors are almost always cooled using forced air. Different number of
stator and armature fields as well as how they are connected provide different inherent speed/torque
regulation characteristics. The speed of a DC motor can be controlled by changing the voltage applied
to the armature. The introduction of variable resistance in the armature circuit or field circuit allowed
speed control. Modern DC motors are often controlled by power electronics systems which adjust the
voltage by "chopping" the DC current into on and off cycles which have an effective lower voltage.

Since the series-wound DC motor develops its highest torque at low speed. The DC motor was the
mainstay of electric traction drives on both electric and diesel-electric locomotives, street-cars/trams
and diesel electric drilling rigs for many years.

47
4.5. POWER SUPPLY

In this project we have power supplies with +5V & -5V option normally +5V is enough for total
circuit. Another (-5V) supply is used in case of OP amp circuit .Transformer primary side has
230/50HZ AC voltage whereas at the secondary winding the voltage is step downed to 12/50hz and
this voltage is rectified using two full wave rectifiers .the rectified output is given to a filter circuit to
fitter the unwanted ac in the signal After that the output is again applied to a regulator LM7805(to
provide +5v) regulator. Whereas LM7905 is for providing –5V regulation.

z(+12V circuit is used for stepper motors, Fan and Relay by using LM7812 regulator same process
like above supplies).

Fig 4.6: Block Diagram Of Power Supply


Refer reference [13]

4.5.1 TRANSFORMER

Transformers are used to convert electricity from one voltage to another with minimal loss of
power. They only work with AC (alternating current) because they require a changing magnetic field
to be created in their core. Transformers can increase voltage (step-up) as well as reduce voltage
(step-down).

Alternating current flowing in the primary (input) coil creates a continually changing magnetic
field in the iron core. This field also passes through the secondary (output) coil and the changing
strength of the magnetic field induces an alternating voltage in the secondary coil. If the secondary
coil is connected to a load the induced voltage will make an induced current flow. The correct term
for the induced voltage is 'induced electromotive force' which is usually abbreviated to induced e.m.f.
48
4.5.2 RECTIFIERS

The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR) Rectifier


converts AC current or voltages into DC current or voltage. Both use components called diodes to
convert AC into DC.

4.5.3 FILTERS

A filter circuit is a device which removes the ac component of rectifier output but allows
the dc component to the load. The most commonly used filter circuits are capacitor filter, choke input
filter and capacitor input filter or pi-filter. We used capacitor filter here.

The capacitor filter circuit is extremely popular because of its low cost, small size, little weight
and good characteristics. For small load currents this type of filter is preferred. it is commonly used
in transistor radio battery eliminators.

Rectifier O/P C RL

Fig 4.4.1: Block Diagram of Capacitive Filter

49
4.6.MESSAGE MANAGEMENT

Message Management General Description:


Playback and record operations are managed by on-chip circuitry. There are several available
messaging modes depending upon desired operation. These message modes determine message
management style, message length, and external parts count. Therefore, the designer must select the
Appropriate operating mode before beginning the design. Operating modes do not affect voice
quality; for information on factors affecting quality refer to the Sampling Rate & Voice Quality
section. The device supports five message management modes (defined by the MSEL1, MSEL2 and
/M8_OPTION pins shown in Figures 1 and 2):

Random access mode with 2, 4, or 8 fixed-duration messages Tape mode, with multiple
variable-duration messages, provides two options:
- Auto rewind
- Normal
Modes cannot be mixed. Switching of modes after the device has recorded an initial message
is not recommended. If modes are switched after an initial recording has been made some
unpredictable message fragments from the previous mode may remain present, and be audible on
playback, in the new mode. These fragments will disappear after a Record operation in the newly
selected mode. Table 1 defines the decoding necessary to choose the desired mode. An important
feature of the APR9600 Message management capabilities is the ability to audibly prompt the user to
change in the device's status through the use of "beeps" superimposed on the device's output. This
feature is enabled by asserting a logic high level on the BE pin. Random Access Mode
Random access mode supports 2, 4, or 8 Message segments of fixed duration. As suggested
recording or playback can be made randomly in any of the selected messages.
The length of each message segment is the total recording length available (as defined by the
selected sampling rate) divided by the total number of segments enabled (as decoded in Table1).
Random access mode provides easy indexing to message segments.
Functional Description.
On power up, the device is ready to record or playback, in any of the enabled message
segments. To playback,/CE must be set low to enable the device and /RE must be set high to disable
recording & enable playback. You initiate playback by applying a high to low edge on the message
50
trigger pin that represents the message segment you intend to playback. Playback will continue until
the end of the message is reached. If a high to low edge occurs on the same message trigger pin during
playback, playback of the current message stops immediately. If a different message trigger pin pulses
during playback, playback of the current message stops immediately (indicated by one beep) and
playback of the new message segment begins. A delay equal to 8,400 cycles of the sample clock will
be encountered before the device starts playing the new message. If a message trigger pin is held low,
the selected message is played back repeatedly as long as the trigger pin stays low. A period of silence,
of duration equal to 8,400 cycles of the sampling clock, will be inserted during looping as an indicator
to the user of the transition between the end and the beginning of the message.
Tape mode manages messages sequentially much like traditional cassette tape recorders.
Within tape mode two options exist, auto rewind and normal. Auto rewind mode configures the device
to automatically rewind to the beginning of the message immediately following recording or
playback of the message. In tape mode, using either option, messages must be recorded or played
back sequentially, much like a traditional cassette tape recorder.
A. Function Description of Recording in Tape Mode using the Auto Rewind Option On
power up, the device is ready to record or playback, starting at the first address in the memory array.
To record, /CE must be set low to enable the device and /RE must be set low to enable recording. A
falling edge of the /M1_MESSAGE pin initiates voice recording (indicated by one beep).A
subsequent rising edge of the /M1_MESSAGE pin during recording stops the recording (also
indicated by one beep). However, caution must be practiced because a subsequent record operation
will overwrite the last recorded message unless the user remembers to pulse the /M2_Next pin in
order to increment the device past the current message. You can preserve the previously recorded
message by using the /M2_Next input to advance to the next available message segment. To perform
this function, the
/M2_NEXT pin must be pulled low for at least 400 cycles of the sample clock. The auto rewind mode
allows the user to record over the just recorded message simply by initiating a record sequence
without first toggling the /M2_NEXT pin.
To record over any other message however requires a different sequence. The /M2_NEXT pin
must then be pulsed low for the specified number of times to move to the start of the message you
wish to overwrite. Upon arriving at the desired message, a record sequence can be initiated to
overwrite the previously recorded material.

51
CHAPTER 5

FLOWCHART & WORKING PROCEDURE

5.1 FLOW CHART

Figure 5.1 Flow chart

52
5.2 WORKING PROCEDURE

This project clearly uses two main modules of GSM and a microcontroller. The user when sends the
messages through his phones those reaches the GSM, through the AT commands all those messages
reach the microcontroller. That microcontroller takes the data in terms of bits through the
Max232.That information will be transmitted to the LCD display.

5.3. ALGORITHM

1.Initialize the LCD display.


2.Initialize the baurd rete at 38400.
3.By using the AT commands to read the SMS data.
4.Sent At+CMGR=1.
5.Read the data from the GSM modem.
6.The string should be scroll at the bottom line.
7.In top displays Phone number.
8.This action will continuous for all 30 SMS.
9.Once the SMS read that will be deleted.
10.If SMS is important, that will rotate those many times as we declare to rotate.

5.4 CREATING PROJECT IN MPLAB-X.

Getting Ready for Programming:

Since we have decided to use the PIC16F877A, with the XC8 compiler let us get started with
their datasheet. I recommend everyone to download the PIC16F877A Datasheet and the XC8
Compiler manual, as we will be referring to these frequently as we progress through our tutorial. It is
always a good practice to read the complete Datasheet of any MCU before we actually start
programming with it.

53
Now, before we open our MPLAB-X and start programming, there are few basic things that
one has to be aware of. Anyway, since this is our first program, I don't want to harangue you people
with lot of theory but we will stop here & there as we program and I will explain your things as
such. If you don't have enough time to read through all these then just have a glimpse and jump into
the video at the bottom of the page.

Creating a New Project using MPLAB-X:

Step 1: Launch the MPLAB-X IDE that we installed in the previous class, once loaded it should look
something like this.

Step 2: Click on Files -> New Project, or use the hotkey Ctrl + Shift + N. You will get the following
POP-UP, from which you have to select Standalone Project and click Next.

54
Step 3: Now we have to select our Device for the project. So, type as PIC16F877A over the Select
Device dropdown section. Once done it should be like this and then Click on Next.

55
Step 4: The next page will allow us to select the tool for our project. This would be Pick it 3 for our
project. Select Pick it 3 and click on next

Step 5: Next page will ask to select the compiler, select the XC8 Compiler and click next.

Step 6: In this page we have to name our project and select the location where the project has to be
saved. I have named this Project as Blink and saved it on my desktop. You can name and save it in

56
your preferable way. Our project will be saved as a folder with the Extension .X, which can be
directly launched by MAPLB-X. Click Finish once done.

Step 7: That's it!!! Our project has been created. The left most window will show the project name
(Here Blink), click on it so that we can view all the directories inside it.

In order to start programming we need to add a C Main file, inside our Source file directory. To do
this simply right click on the source file and select New -> C Main File, as shown in the image below.

57
Step 8: The following dialog box will appear in which the name of the C-file has to be mentioned. I
have named in Blink again, but the choice is left to you. Name it in the File name column and click
on finish.

Step 9: Once the C main File is created, the IDE will open it for us with some default codes in it, as
shown below.

58
Step 10: That's it knows we can start programming our code in the C-main File. The default code
will not be used in our tutorials. So, let's delete them completely.

Getting to Know the Configuration Registers:

Before starting to program any Microcontroller, we have to know about its configuration registers.

So, what are these Configuration registers, how and why should we set them?

The PIC devices have several locations which contain the Configuration bits or fuses. These
bits specify fundamental device operation, such as the oscillator mode, watchdog timer, programming
mode and code protection. These bits must be set correctly in order to run the code otherwise we have
non-running device. So, it is very important to know about these configuration Registers before even
we start with our Blink Program.

In order to use these Configuration registers, we have to read through the Datasheet and
understand what the different types of Configuration bits are available and their functions. These bits
can be set or reset based on our programming requirements using a configuration pragma.

The pragma has the following forms.

#pragma config setting = state value

#pragma config register = value

where setting is a configuration setting descriptor, e.g., WDT, and state is a textual description of the
desired state, e.g., OFF. Consider the following examples.

#pragma config WDT = ON // turn on watchdog timer

#pragma config WDTPS = 0x1A // specify the timer post scale value

RELAX!! ..... RELAX!!.... RELAX!!......


59
I know it has gone too much into our heads and setting these Configuration bits might seem to be a
bit difficult for a newbie!! But it is defiantly not with our MPLAB-X.

Setting the Configuration Bits in MPLAB-X:

Microchip has made this tiring process a lot easier by using graphical representations of the different
types of Configuration bits. So now in order to set them we simply have to follow the steps below.

Step 1: Click on Window -> PIC Memory View -> Configuration Bits. As shown below.

Step 2: This should open the Configuration Bits window in the bottom of our IDE as shown below.
This is the place where we can set each of the configuration bits according to our needs. I will explain
each of the bits and its purpose as we progress through the steps.

60
Step 3: The first Bit is the oscillator selection bit.

The PIC16F87XA can be operated in four different oscillator modes. These four modes can be
selected by programming two configuration bits (FOSC1 and FOSC0):

▪ LP Low-Power Crystal
▪ XT Crystal/Resonator
▪ HS High-Speed Crystal/Resonator
▪ RC Resistor/Capacitor

61
For our projects we are using a 20Mhz Osc hence we have to select the HS from the dropdown box.

Step 4: The next bit will be our watchdog timer Enable Bit.

The Watchdog Timer is a free running, on-chip RC oscillator which does not require any external
components. This RC oscillator is separate from the RC oscillator of the OSC1/CLKI pin. That means
that the WDT will run even if the clock on the OSC1/CLKI and OSC2/CLKO pins of the device has
been stopped. During normal operation, a WDT time-out generates a device Reset (Watchdog Timer
Reset). The TO bit in the Status register will be cleared upon a Watchdog Timer time-out. If the timer
is not cleared in our software coding, then the whole MCU will reset upon every WDT timer overflow.
The WDT can be permanently disabled by clearing configuration bit.

We are not using WDT in our program so let us clear it, by selecting OFF from the dropdown box.

Step 5: The next bit will be Power-up timer Bit.

The Power-up Timer provides a fixed 72 MS nominal time-out on power-up only from the POR. The
Powerup Timer operates on an internal RC oscillator. The chip is kept in Reset as long as the PWRT
is active. The PWRT’s time delay allows VDD to rise to an acceptable level. A configuration bit is
provided to enable or disable the PWRT.

Step 6: The next bit will be the Low-Voltage Programming.

Let us turn off LVP so that we can use RB3 as an I/O pin. To do this, simply turn
this OFF using the dropdown box.

Step 7: The next bits will be EEPROM and Program memory Protection bits. If this bit is turned on,
once the MCU is programmed no one will be retrieve our program from the hardware. But for now,
let us leave all the three turned OFF.

Once the settings are done as instructed the Dialog box should look something like this.

62
Step 8: Now click on Generate Source Code to Output, our code will be generated now just copy it
along with header file and paste in on our Blink.c C-File, as shown below.

63
CHAPTER 6

CONCLUSION AND FUTURE WORKS

6.1 CONCLUSION

The project titled “tracing down the vehicle using GSM and satellite communication” is a model for
vehicle tracking unit with the help of GPS receivers and GSM modem. Vehicle tracking system
resulted in improving overall productivity

In order to prevent Kidnapping and bunking of school going kids; is the motive of the paper.
This paper shows that android-based school bus tracking technology using IoT is feasible and it is an
alternative way for supervising and tracking the Children when they are driving to and from school
and home.

6.2 Results
These are the outputs which are observed for our project while under working.

Fig 6.1: Biometric scanner

64
Fig 6.2: Door operation

Fig 6.3: SMS Sample

Fig 6.4: Realtime location

65
Fig 6.5: Location summary

6.3 FUTURE SCOPE:


➢ We can use the EEPROM to store the previous Navigating positions up to 256

➢ Locations and we can navigate up to N number of locations by increasing its memory.


➢ We can reduce the size of the kit by using GPS+GSM on the same module.

➢ We can increase the accuracy up to 3m by increasing the cost of the GPS receivers.
➢ We can use our kit for detection of bomb by connecting to the bomb detector.

➢ With the help of high sensitivity vibration sensors, we can detect the accident.

➢ Whenever vehicle unexpectedly had an accident on the road with help of vibration

➢ Sensor we can detect the accident and we can send the location to the owner,
➢ hospital and police.
➢ We can use our kit to assist the traffic. By keeping the kits in the entire vehicles and by
knowing the locations of all the vehicles.
➢ If anybody steals our Bus, we can easily find our Bus around the globe.

66
REFERENCES
[1] Raja Godwin D, Abishablessy E, Dhivya Priya K, Kodeeswari B, Seshavardhan S,” Smart
School Bus Monitoring System Using IOT “International Journal of Pure and Applied
Mathematics Volume 118 No. 20 2018, 617-623.
[2] Abhilash Kanakanti,”College Buses And Students Monitoring System With IOT”
International Journal of Advanced Research in Advance Engineering & Technology Volume
6, Issue 1 MAR 2017.
[3] Ms. Deepali M. Bhavale, Ms. Priyanka S. Bhawale, Ms. TejalSasane, Mr. Atul S.
Bhawale,”IOT Based Unified Approach for Women and Children Security Using "Wireless
and GPS”International Journal of Advanced Research in Computer Engineering &
Technology (IJARCE International Journal of Advanced Research in Computer Engineering
& Technology (IJARCET) Volume 5, Issue 8, August 2016.
[4] ShahidBangali,S.K.Shah, “review: Real Time School Bus Security System with Biometrics,
GPS and GPRS using ARM Controller” International Journal of Advanced Research in
Electronics and Communication Engineering (IJARECE)Volume 4, Issue 4,PP 730-732,April
2015.
[5] Sumit S. Dukar, et.al “Vehicle Tracking, Monitoring and Alerting System: A Review
”International Journal of Computer Applications, Volume 119 No.10, PP 39-44, June 2015.
[6] Khaled Shaaban, AbdelmoulaBekkali, Elyes Ben Hamida, Abdullah Kadri,”Smart Tracking
System for School Buses using Passive RFID Technology to Enhance Child Safety,” Journal
of Traffic and Logistics Engineering,Vol,1,No.2, December, 2013.
[7] https://sci-hub.do/10.1109/ICACCI.2017.8125890
[8] www.researchgate.net
[9] www.btutraining.org
[10] https://images.app.goo.gl/NbAwVL3Wh8MgVQJZ6
[11] teknogenius.blogspot.com
[12] informationqu.blogspot.com
[13] www.ijareeie.com

67

You might also like