You are on page 1of 86

APPENDIX F

APPENDIX F

ADAPTIVE VEHICLE SYSTEM


(AVS)
B.S. ELECTRONIC ENGINEERING, BATCH 2008
Internal Advisor

External Advisor

Mr. Shakir Karim Buksh

Mr. Maqbool Ahmed

Assistants Professor

Manager Electronics

Electronics Engineering Dept

SUPARCO

SSUET, Karachi
Submitted by

Karachi

Rehman Gul
Mahesh Kumar Chugh
Adamjee Ashraf Moten
Muhammad Tarique Saleem
Muhammad Abdul Hayee

2008 - EE - 008
2088 - EE - 010
2008 - EE - 015
2008 - EE - 016
2008 - EE - 025

DEPARTMENT

OF ELECTRONIC
ENGINEERING

SIR SYED UNIVERSITY OF ENGINEERING AND TECHNOLOGY,


KARACHI

APPENDIX F

JANUARY 2012
PREFACE
Being the student of electronic engineering it is vital that we do some field work.
Whatever we have learnt during our four years of our bachelor program we gather all of
it and bring it to the zone of practicality.

Communication has become the fastest growing technology in our modern day society
and without life would be impossible. One feels that a text should serve not only for the
benefit of the reader but also pedagogically sound outline for a course of instruction. A
text should be sufficiently clear to enable the reader to understand the material well by its
reading, with a realism that approaches hand-on experience. We also think that the text
should be more comprehensive than the course of action for which it is used: thus, the
student and engineer can use some material both as a reference source and source of
further examples and illustration. Finally, we feel that the text should be able to stand
alone, with minimal need of supplement documentation and references. We hope that
each student and instructor finds that all these objectives have met in this text.

The report, A.V.S, includes complete knowledge of the project that describes the devices
used in the formation and these associated with it. The text also elaborates the
terminologies and factors related to the project.

ACKNOWLEDGEMENTS

In the name of ALLAH the most merciful; the one and only supreme power, the one
whose will makes everything possible, and the one without whose will the simplest is
impossible.

We would like to thanks to our Family members for their prayers, guidance, support and
care. Without their moral and financial support it would not have been possible for us to
achieve this milestone.

We are highly indebted to respected Mr. Najeeb Siddiqui, Chairman of Electronics


Engineering Department SSUET, Mr. Muhammad Sharif, FYPC Coordinator & FYPC
members for their sincere help and guidance.

We are thankful to Mr. Shakir Karim Bukhsh, Assistant Professor, Electronic Engineering
Department SSUET who under took the task of being our project supervisor, for his kind
support and guidance during the troubled times we have faced until now.

We also wish our gratitude to all the staff in the university and last but not the least we
acknowledge the efforts of our teachers who have been our source of inspiration
throughout the university years and have shared their knowledge and skills with us.

Sir Syed University of Engineering & Technology


1

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY


University Road, Karachi-75300, Pakistan.
Tel: 34988000-2, 34982393, 3474583, Fax(92-21) 34982393
http://www.ssuet.edu.pk
The Faculty of Electronic Engineering
Project Approval
Project Title
ADAPTIVE VEHICLE SYSTEM (AVS)
Internal Advisor
Mr. Shakir Karim Buksh
Academic Year
2008
Group Members:
Rehman Gul
2008 - EE - 008
Mahesh Kumar Chugh
2008 - EE - 010
Adamjee Ashraf Moten
2008 - EE - 015
Muhammad Tarique Saleem
2008 - EE - 016
Muhammad Abdul Hayee
2008 - EE - 025
The Department of Electronic Engineering Sir Syed University of Engineering &
Technology has approved this Final Year Project. The Project is submitted in partial
fulfillment of the requirements for the degree of Bachelor of Science in Electronic
Engineering
Approval committee:
Shakir Karim Buksh
Internal Advisor

Maqbool Ahmed Siddiqui


External Advisor

Muhammad Sharif
FYP Project Coordinator

Prof. Najeeb Siddiqui


Chairman EE Department
January/2012

Sir Syed University of Engineering & Technology


2

ABSTRACT
The modern technology in every field is all about making the life more convenient, safe
and secure for human beings. Thus living up to this fact AVS aims to make the car more
convenient and user friendly, by incorporating set of electronic features.
The smart design of ADAPTIVE VEHICLE SYSTEM frees the car user from various
tedious tasks of performing checks on cars basic parameters along with providing
intuitive control system. More over the smart design features various nourished safeties
and securities simple to operate and easy to use. The project comprises of four main sets
of features:
Security (2) Safety (3) Control (of accessories) (4) Monitoring
Upon entering car, system automatically starts-up, welcoming the driver & show
car/engines basic parameters on a LCD screen, eliminating the need of performing
physical checks like radiator water lever, battery water etc. With simple to use interactive
keypad, user can easily control windows, door locks, Boot & Fuel lid.
AVS will make the car ever more secure with the Anti-Theft & Dacoit System (using
GSM, via SMS commands) along with car immobilizing techniques. Moreover, AVS will
make the car & passenger of car safer by providing speed limiting options, overrevolution alert & alert upon detecting accident or collision.
Major Hardware components/modules used are: PIC18F452, PIC16F877A, GSM
Sim900D, GPS GR-89, ADXL-335.
AVS makes automobile much more convenient, reliable, and safe & secure, along with
much intuitive control & access to car. AVS can further be improved very much by
adding more features. In this modern era Convenience, Reliability, Safety & Security
are such aspects with the help of which choice of better product is made. So it would be
worth spending an additional amount of money while buying a vehicle with AVS.

Sir Syed University of Engineering & Technology


3

TABLE OF CONTENTS

ACKNOWLEDGEMENTS.................................................................................................i
ABSTRACT.......................................................................................................................iii
LIST OF FIGURES.............................................................................................................1
1

PROJECT INTRODUCTION AND METHODOLOGY...........................................2


1.1

OVERVIEW.3

1.1.1

SIGNIFICANCE OF THE PROJECT..........................................................3

1.1.2

DESCRIPTION.............................................................................................3

1.1.3

BACKGROUND...........................................................................................4

1.2

MOTIVATION.....5

1.3

METHODOLOGY...6

1.3.1
1.4

IMPLEMENTATION PHASE.....6

1.4.1
1.5
2

TESTING PHASE.........................................................................................6

DESIGN FLOW...7

AVS FEATURES.........................................................................................................8
2.1

DESIGN PHASE...........................................................................................6

AVS FEATURES.....9

2.1.1

MONITORING FEATURES........................................................................9

2.1.2

CONTROLLING FEATURES....................................................................10

2.1.3

SAFETY FEATURES.................................................................................10

2.1.4

SECURITY FEATURES.............................................................................11

SYSTEM EXPLANATION......................................................................................12
3.1

SYSTEM OVERVIEW......13

3.2

OVERALL SYSTEM.....13

3.3

SYSTEM EXPLANATIONS.....14

Sir Syed University of Engineering & Technology


1

3.3.1

MONITORING UNIT.................................................................................14

3.3.2

CONTROL UNIT:.......................................................................................15

3.3.3

SAFETY UNIT:...........................................................................................16

3.3.4

SECURITY UNIT:......................................................................................17

3.3.5

MASTER CONTROL UNIT......................................................................18

SYSTEM OPERATION............................................................................................20
4.1

OVERALL SYSTEM OPERATION.........21

4.2

INTER MODULE COMMUNICATION......21

4.2.1

COMPARISON...........................................................................................21

4.2.2

WHY I2C?...................................................................................................22

4.3

MONITORING UNIT OPERATION OVERVIEW......22

4.4

CONTROL UNIT OPERATION OVERVIEW.....23

4.5

SAFETY UNIT OPERATION OVERVIEW.........24

4.5.1

4.6

SECURITY UNIT OPERATION OVERVIEW....26

4.7

MASTER CONTROL UNIT OPERATION OVERVIEW...27

SYSTEM DESIGN....................................................................................................30
5.1

PROJECT STRUCTURE ..........31

5.2

SUMMARY OF MAJOR HARDWARE USED .......31

5.2.1
5.3

BETTER WAY OF IMPLEMENTING SPEED LIMITER FUNCTION...25

BRIEF HARDWARE DISCRIPTION........................................................31

SOFTWARES USED. ...........36

5.3.1

PROTEUS PRO..........................................................................................36

5.3.2

MIKROC PRO FOR PIC............................................................................37

RESULTS & DISCUSSION.....................................................................................40


6.1

RESULT.............41

6.2

PROBLEMS FACED.............41

6.2.1

NON-AVAILIBILITY OF HARDWARE...................................................41

Sir Syed University of Engineering & Technology


2

6.2.2

SYSTEM OPERATION COMPLICATIONS.............................................41

6.2.3

NOISE AND INTERFERENCE.................................................................42

APPLICATIONS & FUTURE ENHANCEMENTS.................................................43


7.1

APPLICATIONS............44

7.2

FUTURE ENHANCEMENTS...........44

7.3

CONCLUSSION............44

APPENDIX A....................................................................................................................46
TIME ANALYSIS............46
APPENDIX B....................................................................................................................47
COST ANALYSIS............47
APPENDIX C....................................................................................................................49
SCHEMATICS..............49
APPENDIX D...................................................................................................................56
SOURCE CODE OF MICROCONTROLLER.....56
APPENDIX E....................................................................................................................61
LIST OF SMS COMMANDS SUPPORTED.......61
APPENDIX F....................................................................................................................62
DATASHEETS.............62
ADXL335..................................................................................................................62
GRAPHICAL LCD JHD240128...............................................................................64
GPS RECEIVER MODULE HOLUX GR-89..........................................................65
GSM MODULE SIM900D.......................................................................................67

LIST OF FIGURES
Figure 1-1 AVS System diagram........................................................................................3
Sir Syed University of Engineering & Technology
3

Figure 1-1-2 Design Flow...................................................................................................7


Figure 3-1 AVS System Overview....................................................................................13
Figure 3-2 Monitoring Unit...............................................................................................14
Figure 3-3 Control Unit.....................................................................................................15
Figure 3-4 Reed Switch.....................................................................................................15
Figure 3-5 Door lock Actuator.........................................................................................15
Figure 3-6 Safety Unit.......................................................................................................16
Figure 3-7 Security Unit....................................................................................................17
Figure 3-8 Master Control Unit.........................................................................................18
Figure 4-1 Flow of Monitoring Unit.................................................................................22
Figure 4-2 Flow of Control Unit.......................................................................................23
Figure 4-3 Flow of Safety Unit.........................................................................................24
Figure 4-4 Implementation of Speed limiting function.....................................................25
Figure 4-5 Security Unit....................................................................................................26
Figure 4-6 AVS Login Screen...........................................................................................27
Figure 4-7 Flow of Master Control Unit...........................................................................28
Figure 5-1 Accelerometer Sensor ADXL 335...................................................................32
Figure 5-2 Holux GR-89 GPS module..............................................................................33
Figure 5-3 GLCD JHD240128..........................................................................................33
Figure 5-4 Sim900D..........................................................................................................34
Figure 5-5 PIC18F452.......................................................................................................34
Figure 5-6 PIC16F877A....................................................................................................35
Figure 5-7 Four-wire Resistive Touch Panel.....................................................................35
C-1 Snapshot of Control + Safety Unit.............................................................................53

Sir Syed University of Engineering & Technology


2

CHAPTER # 1

1. PROJECT INTRODUCTION AND METHODOLOGY

Sir Syed University of Engineering & Technology


3

1.1

OVERVIEW

1.1.1

SIGNIFICANCE OF THE PROJECT

The modern technology in every field is all about making the life more convenient, safe
and secure for human beings, thus living up to this fact our project lies in making the car
way more convenient and user friendly.

Nowadays we are facing issues related to safety and security, where encountering them
needs professional expertise and such systems can lead to a great deal of expenditure.
Since the world is going through a phase of global recession, the system being developed
by us is going to be comparatively cost effective.

1.1.2

DESCRIPTION

The design of ADAPTIVE VEHICLE SYSTEM frees the car user from various tedious
tasks of performing checks on cars basic parameters along with providing intuitive
control system. More over the design features various nourished safeties and securities
simple to operate and easy to use.

The project comprises of four sets of features:

Monitoring
Controlling
Safety
Security

Monitoring

Controlling

Sir Syed University of Engineering & Technology


4

FigureFigure
1-1 AVS
1-1 System
Design Flow
diagram

ADAPTIVE VEHICLE SYSTEM

Safety

1.1.3

Security

BACKGROUND

With the never ending efforts of making the car much efficient & powerful, same efforts
are also made to make it much Intuitive, Safe & Secured.

When using the word Intuitive, it is meat that Easy to use & understand. In this era,
everybody is busy & prefers many things over having to spend time, even if it means to
spend money to save time. There has been a race going on between Car industries, on
who makes the car as much easier & requiring less time to use & understand.

The numbers of car users are increasing at such a high rate each year, along with it,
issues of safety & security concerns are also on the rise. There been various solution of
security issue were & are being launched in the market, but many of them has been failed
either due to the lack in thinking ahead of the criminals or due to the such a high cost of
that solution.

1.2

MOTIVATION

Ideas that are innovative and incentive, challenges student and motivates them towards
the development of skills & knowledge. The knowledge acquired & the skills developed
Sir Syed University of Engineering & Technology
5

with the implementation of those ideas enhance the capabilities of an individual. Students
acquire various skills such as designing, problem-solving, communication, collaboration,
planning, and self- evaluation skills.

There is rapid advancement being made in the automobile industry and we are also
motivated towards in contributing towards such developments, giving an exponential rise
to the automobile industry in Pakistan. We also have in our mind the goal of making a
cost effective system.

Sir Syed University of Engineering & Technology


6

1.3

METHODOLOGY

The methodology of our project will be Spiral Methodology, in which there are multiple
cycles of design, implementation and testing phase. The spiral methodology extends the
waterfall model by introducing prototyping. It is generally chosen over the waterfall
approach for large, expensive, and complicated projects.

1.3.1

DESIGN PHASE

In design phase, we analyzed several aspects of implementing our system in car and
defined an operational strategy of coordination between modules of our system. Circuit
modules were also designed in this phase.

1.4

IMPLEMENTATION PHASE

In this phase, designed circuits were first implemented initially on jigs & development
boards for further improvement and analyzing of the output of circuit/system. So that, if
there is any modification needed in the circuit, can be done easily before finalizing &
making PCBs. Coding for microcontroller was also done based on strategy defined in
design phase.

1.4.1

TESTING PHASE

In testing phase both software (of microcontroller) & hardware were tested & checked
thoroughly for bugs & error in worst-case scenarios. Errors & bugs were detected and
removed.

Sir Syed University of Engineering & Technology


7

1.5

DESIGN FLOW

Figure 1-1-2 Design Flow

1.6

CONCLUSION

The scope and context of AVS was properly outlined. The particular line of action was
particularly defined for our convenience. All possible table work and calculation was
carried out before commencing the project. AVS was divided into three phases design,
testing and implementation respectively. The design flow of AVS was proposed.
Sir Syed University of Engineering & Technology
8

CHAPTER # 2

AVS FEATURES

Sir Syed University of Engineering & Technology


9

2.1

AVS FEATURES

AVS has four sets of features, categorized as:


1) Monitoring Features
2) Controlling Features
3) Safety Features
4) Security Features

2.1.1

MONITORING FEATURES

LCD Display: Showing various Engine Basic Parameters, notifications & Alerts.
Touchpad: Let user easily interact with the system.
Engine Basic Parameters: includes following parameters which will be analyzed

& will be shown on Display for maximized users convenience:


o Radiator Temperature
o Engine Temperature
o Radiator low water level alert
o Battery low water level alert
o Oil change alert
Driving Analysis: Driving of the user will analyzed and rated and displayed
Data-Logging: Cars activity will be constantly recorded on SD-Card.
Status of Control system features
Status Safety features, i.e. indicates alerts
Status of Security features

2.1.2

CONTROLLING FEATURES

Automatic System Start-up: Upon detecting the entry of driving, system will

start-up automatically & start displaying the data/status.


Driver Profiling: Option to allot different setting for users.

Sir Syed University of Engineering & Technology


10

Power Windows Control: Power windows will be interfaced with the control
system, allowing flexible automatic control like, rolling-up the window

automatically on system shutdown.


Power Locks: Power Locks will also be controlled by this system, which will also

bear application for automation for convenience & security purposes.


Power Boot & Fuel Lid: Boot & fuel lid locks will be released electronically.

2.1.3

SAFETY FEATURES
Collision Detector: System will send instant emergency alert to user-defined
contact number, in case collision of car occurs.

Speed Limiter: Car owner will have an additional feature of limiting the speed of
car, ensuring the safety of car (from misshapen or accidents) along with
individuals other than the owner. Upon reaching the limit, owner will get a SMS
of over-speeding alert.
This feature is especially for the Parents who are worried for the safety of their
children.

Over Rev (Engine Revolution) Alert: Driver of the car will be notified upon over
revving the engine or upon the choice of owner, notification SMS will be sent.

Sir Syed University of Engineering & Technology


11

2.1.4

SECURITY FEATURES
Anti-Theft/Dacoit System: Enhanced security features for car with the help of
GSM based communication. Featuring:
o Mobile (GSM SMS mode) communication between car & user
o SMS based various configurable alerts & notifications
o Tracking of Car via GPS (Global Positioning System)

Car/Engine Immobilizer: In case of theft or dacoit, car owner will have option to
completely immobilize the car, with a single SMS.

2.2

CONCLUSION

The features and key elements of AVS have been listed under their respective units of
AVS. Feedback and suggestions regarding AVS features were asked for from the internal
and members of FYP committee. The features have been elaborated in more detail in the
coming chapters.

CHAPTER # 3

Sir Syed University of Engineering & Technology


12

SYSTEM EXPLANATION

Sir Syed University of Engineering & Technology


13

3.1

SYSTEM OVERVIEW

AVS is divided into five units. Each unit is responsible for the operation and handling of
its respective set of features of AVS. The five units are
1)
2)
3)
4)
5)

3.2

Monitoring Unit
Control Unit
Safety Unit
Security Unit
Master Control Unit

OVERALL SYSTEM

Figure 3-3 AVS System Overview


3.3

SYSTEM EXPLANATIONS

Sir Syed University of Engineering & Technology


14

Whole system is powered by the cars 12V battery and as system is divided into units,
where each unit handles corresponding set of features. So, in case of Security Unit, this
unit has an auxiliary power supply, of which source is 3.7V Lithium-Ion Battery. This
makes the security unit independent & more reliable such as for the case, cars battery is
drained due to any reason or if thieve tries to disconnect the battery to shut-off the
system. Removing/disconnecting the cars battery will make the security unit to switch to
its auxiliary power supply & will notify the car owner.

3.3.1

MONITORING UNIT

Monitoring unit acquires parameter like Raditor water level, battery water level, engine
temperature & radiator temperature. Data acquired by the sensors is processed by the
monitoring units microntroller and makes the data ready for the master control unit to
read.

Figure 3-4 Monitoring Unit


Cars built-in thermocouple is used to find the temperature of the the engine & a simple
water level sensor was designed to detect the water level using transisters and copper
wires dipped in the battery & radiators water reservoir.

3.3.2

CONTROL UNIT:

Sir Syed University of Engineering & Technology


15

Control unit is responsible for performing the control (of accessories) operations
requested by user. Master control delivers the control commands to control units
microcontroller to perform specific operation like rolling up/down the window,
lock/unlock door and release the boot/fuel lid lock.

Figure 3-5 Control Unit

Feedback sensors, which are basically limit switches, are used to detect the upper &
lower limits of position of door locks & windows.
Reed switch is used as the limit switch for the windows, so that there is far less chances
of misaligment or damage of switch due to vibrations & shock.

Figure 3-6 Reed Switch

Figure 3-7 Door lock Actuator

Door lock actuators commonly used for electronic locking/unlocking of car door locks
are utilized to release the boot-lid and fuel-lid locks.
3.3.3

SAFETY UNIT:

Sir Syed University of Engineering & Technology


16

Safety unit handles safety operation. Safety units microcontroller measures speed, RPM
of engine, acceleration of the car and does speed limiting operation.

Figure 3-8 Safety Unit

Using accelerometer sensor module, ADXL335, safety unit monitors the acceleration
undergone by the car. This acceleration parameter is utilized to detect collision and
perform driving analysis.
RPM of the engine is measured by counting the pulses from the ignition coil, which gives
high voltages to spark plugs to cause ignition of fuel in engine cylinder.
Speed is measured by the counting the pulses coming out of the encoder which is
mounted on a rotating cable connected with gear box.
Speed limiting function is implemented by switching the power supply to ignition coil
which will controlled according to the speed of the car and the speed limit set by the user.
So whenever the car reaches the speed limit, safety unit will switch the ignition coils
power such that car will not be able to cross the speed limit.

Sir Syed University of Engineering & Technology


17

3.3.4

SECURITY UNIT:

Security unit, most important part of AVS, does handles two primary operations:
1) Security of Car
2) Communication between car and user.
Security unit behaves as a slave device with respect to Master Control Unit but
independent of it. Means, it doesnt matter whether Master Control Unit is operational or
shut down, like due to attempt by theif to unarm/disable the security of car by
disconnecting car battery. Security unit will be operational and keep the car jammed in
such cases and user will still be able to maintain communication with the car.

Figure 3-9 Security Unit


Communiction between car and user is established using GSM mobile communication.
User can simply send predefined commands to get specific task done, like jamming the
car incase of theft. GSM communication allows the AVS to send alerts about the status of
car, location and various other parameters to the user.
GPS module tracks the location of car and keeps updating the location to security units
microcontroller.
Security unit jams/freezes the car by disconnecting critical connection, which would be
very difficult to trace for the theif.

Sir Syed University of Engineering & Technology


18

Auxiliary battery power makes the security unit more reliable and makes sure that it
keeps operating even if in case car battery is disconnected or drained for any reason.
3.3.5

MASTER CONTROL UNIT

Master Control Unit controls the all the units of AVS and maintains coordination. It also
a means of communication between the units, like if Security unit receives command to
get the speed of the car it requests to get car speed status to Master Control Unit which
gets the info from Control unit and then gives back to Security unit.

Figure 3-10 Master Control Unit

Master Control Unit also handles the display, touchpad, flash memory (for data logging)
interface.
Graphic LCD is used for the display of various parameters for the user.
Touchpad is used for the interaction between the system and user as input device.
Flash memory, SD card is used for the data logging of the car.

Sir Syed University of Engineering & Technology


19

3.4

CONCLUSION

The system block diagram of AVS has been demonstrated. The respective units of AVS
have been separately shown. It gives a clearer picture of the entire AVS. The system
operation of AVS is discussed in the next chapter.

CHAPTER # 4

SYSTEM OPERATION

Sir Syed University of Engineering & Technology


20

4.1

OVERALL SYSTEM OPERATION

Mentioned previously, how sets of features of AVS are handled by their respective unit.
Each unit performs the required operations and after the processing puts the relevant data
in to set of registers so that it can easily be read or modified by the master. In AVS,
master control unit gets relevant data from each unit by polling & update each unit with
new status or commands one by one.
4.2

INTER MODULE COMMUNICATION

For the communication between all units I2C (Inter-Integrated Communication) protocol
is selected. Adopting I2C protocol for the inter-modular communication was much
feasible for us to use. However, much better protocol like CAN bus could have been used
for better performance and reliability as it is done now in modern cars highly
sophisticated electronics integrated in the automobiles.
4.2.1

COMPARISON

Table 1 Comparison of communication protocols


UART

SPI

I2C

CAN

Mode

Asynchronous
Full Duplex

Synchronous
Full Duplex

Synchronous
Half Duplex

Synchronous
Half Duplex
Low

Speed

Low

High Up to

Low

10Mbps

100kbps,400kbps,3.4Mbps

40kbps to
1Mbps

Error
No

No

No

Yes

No

No

No

Yes

Detection
Error
Correction

Sir Syed University of Engineering & Technology


21

4.2.2

WHY I2C?

Only two wires needed for communication between as many as 121 devices.
I2C is much simpler in implementation than CAN bus.
No licensing required as it is in CAN bus.
Easier to configure.
Reasonable speed of data communication.

4.3 MONITORING UNIT OPERATION OVERVIEW


In monitoring unit, microcontroller first initializes and then instantly starts to acquire
monitoring parameters from the sensor & detectors and constantly keeps updating the
status. So that master control unit can pick up the status for display or for any other use.

Figure 4-11 Flow of Monitoring Unit

4.4 CONTROL UNIT OPERATION OVERVIEW


Sir Syed University of Engineering & Technology
22

When powered on, this units microcontroller first initializes and updates the status of
windows and door locks, i.e. whether open or closed. Then it keeps checking whether
there is new command issued by the Master control unit to operate any of the requested
accessories. If any command is being issued, then control unit executes the command and
get back to its routine.

Figure 4-12 Flow of Control Unit

4.5 SAFETY UNIT OPERATION OVERVIEW


Sir Syed University of Engineering & Technology
23

Basic operation strategy is same as was in previous units. After initialization


microcontroller calculates the speed and RPM of the car and then checks whether speed
of the car is equal to the speed limit applied, if in case yes, then disconnects ignition
coils primary coil. When cycle is repeated and microcontroller rechecks & compares the
speed and if it is less than speed limit set, then is reconnects the ignition coil. It happens
all so fast that engine doesnt get turned off.

Figure 4-13 Flow of Safety Unit

Sir Syed University of Engineering & Technology


24

Figure 4-14 Implementation of Speed limiting function

4.5.1

BETTER WAY OF IMPLEMENTING SPEED LIMITER

FUNCTION
The speed limiter will perform several times better if it is done by controlling the fuel
throttle of car instead of ignition system. But to do so, throttle will need to be electronic
rather than traditional mechanical one, like ones being implement new cars.
To make electronic throttle, direct mechanical link between accelerator pedal and fuel
valve, i.e. cable will be removed and a potentiometer will need to be installed at the pivot
of accelerator pedal so as to detect position of the pedal. Fuel valve will be controlled be
servo or stepper motor. System will monitor the position of accelerator pedal and control
the fuel valve accordingly, so it gives advantage to easily program the system to not to let
accelerate car more than the speed limit.

Sir Syed University of Engineering & Technology


25

4.6 SECURITY UNIT OPERATION OVERVIEW


Security unit starts with initialization and turns on GSM & initializes GSM and GPS
modules. Then microcontroller of security unit gets the location of the car from GPS and
moves on & checks for new SMS. If new SMS is received, it extracts the command and
executes the corresponding action.

Figure 4-15 Security Unit

Sir Syed University of Engineering & Technology


26

4.7 MASTER CONTROL UNIT OPERATION OVERVIEW


Master Control Unit on start-up, first initializes the Graphic LCD display, displays the
login screen and waits for the user to input the password. Touchpad, which is also
controlled by the master control unit, is used for the user interface, with the help of which
password is entered as well as access to controls etc.

Figure 4-16 AVS Login Screen


If the password is matched then GLCD displays the required parameters and enables the
access to control the accessories. Master control units microcontroller then continues
with getting the status from each of the unit one by one. Whenever this unit requests any
of the unit for the status or command updates, interrupt is generate in the slave unit,
which makes the slave unit to halt all undergoing operations and service interrupt request
and serve Master Unit with the status and commands. After the updating the status data is
logged into the SD-card.
Flow chart the operation of Master control Unit is presented ahead:

Sir Syed University of Engineering & Technology


27

Sir Syed University of Engineering & Technology


28

Start

No
Yes
No
Yes

Yes
No
Yes
No

Execute
Command
Sir Syed University of Engineering
& Technology
No
/Update Status
29

Yes

Execute
Command
/Update Status

Figure 4-17 Flow of Master Control Unit

4.8

CONCLUSION

The system operation of AVS has been discussed. The flow diagram explaining the
operation of each unit has been demonstrated separately. The reasons behind selecting
I2C

as

the

communication

protocol

have

CHAPTER # 5

SYSTEM DESIGN

Sir Syed University of Engineering & Technology


30

been

clearly

discussed.

5.1 PROJECT STRUCTURE:

The project AVS basically involves only electronics and there is no mechanical
system/structure. The electronic structure of this project includes various components,
sensors and modules, which has made possible for us to get AVS function as required.

5.2 SUMMARY OF MAJOR HARDWARE USED:


The major components, sensor & modules used so far in this project are given below

Accelerometer(ADXL335)
GPS Module(GR89)
Graphic LCD(JHD 241028)
GSM Module(SIM900D)
PIC Microcontrollers (PIC18F452 and 16f877A)
4 Wire Resistive TouchPanel

5.2.1

BRIEF HARDWARE DISCRIPTION

Following is the given discription and features of each component used in most
comprehensive way possible. Further information about each component can be acquired
from appendix D.
5.2.1.1

Accelerometer Sensor ADXL335

The ADXL335 is a small, thin, low power, complete 3-axis accel-erometer with signal
conditioned voltage outputs, with 300mV/g sensitivity. The product measures
acceleration with a minimum full-scale range of 3 g. it can measure the static
acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration
resulting from motion, shock, or vibration.

Sir Syed University of Engineering & Technology


31

Figure 5-18 Accelerometer Sensor ADXL 335


Theory of Operation
The sensor is a polysilicon surface-micromachined structure built on top of a silicon
wafer. Polysilicon springs suspend the structure over the surface of the wafer and provide
a resistance against acceleration forces. Deflection of the structure is meas-ured using a
differential capacitor that consists of independent fixed plates and plates attached to the
moving mass. The fixed plates are driven by 180 out-of-phase square waves.
Acceleration deflects the moving mass and unbalances the differential capacitor resulting
in a sensor output whose amplitude is proportional to acceleration. Phase-sensitive
demodulation techniques are then used to determine the magnitude and direction of the
acceleration.

5.2.1.2

GPS Module Holux GR-89

HOLUX GR-89 is a very low power GPS receiver module. It is tracks and gets the
location in longitude and latitude with the help of satellites. It is a 20 channel GPS
receiver which can track up to 12 satellites at a time.
It is used for Real time navigation, tracking and positioning.

Sir Syed University of Engineering & Technology


32

Figure 5-19 Holux GR-89 GPS module

5.2.1.3

GRAPHIC LCD JHD240128

JHD240128 is a monochrome graphic LCD with 240 x 128 pixels in the screen. It is
controlled by Toshibas T6963 GLCD controller, which lets user to interface and display
very easily with a set of commands and methods.

Figure 5-20 GLCD JHD240128

5.2.1.4

GSM Module Sim900D

This is a complete Quad-band GSM/GPRS module in a SMT type and designed with a
very powerful single-chip processor integrating AMR926EJ-S core, allows to benefit
from small dimensions and cost-effective solutions.
It has very low power consumption, makes it ideal for battery powered devices.
Sim900D supports text mode for SMS and is controlled via AT commands.

Sir Syed University of Engineering & Technology


33

Figure 5-21 Sim900D

5.2.1.5

PIC 18F452

PIC18F452 is a high performance series of PIC18Fxx microcontroller, with RISC


Architecture. It is ideal for low power and connectivity applications that benefits from
the availibility several communcation modes. It is also enriched with number of
peripherals which saves lot of hardware, programming & time.

Figure 5-22 PIC18F452


It has 32 kilo-bytes of program Flash memory and 1.5 kilo-bytes of data memory. It also
has 256 bytes of EEPROM memory.
Processing speed is up to 10MIPs.
5.2.1.6

PIC 16F877A

PIC16F877A is a high performance end series of PIC16Fxx microcontroller, with RISC


Architecture. Like PIC18F452, it is also ideal for low power and connectivity

Sir Syed University of Engineering & Technology


34

applications that benefits from the availibility several communcation modes. It is also
enriched with number of peripherals which saves lot of hardware, programming & time.

Figure 5-23 PIC16F877A


It has 8k words of program Flash memory and 368 bytes of data memory. It also has 256
bytes of EEPROM memory.
Processing speed is up to 4MIPs.
5.2.1.7

Four-Wire Resistive Touch panel

Resistive touch panels enables to sense and detect the touch by any object on the screen,
which lets user to select any option just by touching on the screen selecting an option.
Construction
Resistive touch panels are composed of two flexible sheets coated with a resistive
material and separated by an air gap or microdots. There are two different types of
metallic layers. The first one is Matrix, which is a striped electrodes on substrates such as
glass or plastic face each other. The second type of layer is Analogue which consists of
transparent electrodes without any patterning facing each other and Low production
costs. When contact is made to the surface of the touch panel, the two sheets are pressed
together.

Sir Syed University of Engineering & Technology


35

Figure 5-24 Four-wire Resistive Touch Panel


Working
The controller first applies 5V to the back layer. Upon touch, it probes the analog voltage
with the coversheet, reading 2.5V, which represents a left-right position or X axis.
It then flips the process, applying 5V to the coversheet, and probes from the back layer to
calculate an up-down position or Y axis. At any time, only three of the four wires are in
use (5V, ground, and probe).

5.3 SOFTWARES USED

5.3.1

PROTEUS PRO

ISIS is a powerful simulator, with it you can simulate digital circuits, analog circuits and
microprocessorbased circuits . It also has a virtual laboratory that contains an
oscilloscope, voltmeter,function generator etc. Now the updated version with practically
all the necessary components includes microcontrollers. In this version they have grown
beyond the component library also gave an improvement in the program.

ISIS has been created with this in mind. It has evolved over twelve years of research and
development, and has been proven by thousands of users worldwide. The strength of its
architecture allows us to integrate conventional graph based simulation and now with
PROTEUS VSM interactive circuit simulation into the design enviornment. For the
Sir Syed University of Engineering & Technology
36

first time ever it is possible to draw a complete circuit for a microcontroller based system
and then test it interactively , all from within the same piece of software. Meanwhile,
ISIS retains a host of features aimed at the PCB designer, so that the same design can be
exported for production with ARES or other PCB layout software.

Other general features include:

Runs on Windows XP,7 and Vista.


Automatic wire routing and dot placement/removal.
Powerful tools for selecting objects and assigning their properties.
Total support for buses including component pins, inter-sheet terminals module

ports and wires.


Bill of Materials and Electrical Rules Check reports.
Netlist outputs to suit all popular PCB layout tools.
For the power user ,ISIS incorporates a number of features which aid in the
management of large designs. Indeed, a number of our customers have used it to

produce designs containing many thousands of components.


Hierarchical design with support for parameterized component values on sub-

circuits.
Design Global Annotation allowing multiple instances of a sub-circuit to have

different component references.


Automatic Annotaion the ability to number the components automatically.

5.3.2

MIKROC PRO FOR PIC

The MikroC PRO for PIC is a powerful, feature-rich development tool for PIC
microcontrollers. It is designed to provide the programmer with the easiest possible
solution to developing applications for embedded systems, without compromising
performance or control.

Sir Syed University of Engineering & Technology


37

PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used in a
wide variety of applications, and C, prized for its efficiency, is the natural choice for
developing embedded systems. MikroC PRO for PIC provides a successful match
featuring highly advanced IDE, ANSI compliant compiler, broad set of hardware
libraries, comprehensive documentation, and plenty of ready-to-run examples.

FEATURES:

MikroC PRO for PIC allows you to quickly develop and deploy complex

applications:
Write your C source code using the built-in Code Editor (Code and Parameter
Assistants, Code Folding, Syntax Highlighting, Auto Correct, Code Templates,

and more.)
Use included MikroC PRO for PIC libraries to dramatically speed up the
development: data acquisition, memory, displays, conversions, communication

etc.
Monitor your program structure, variables, and functions in the Code Explorer.
Generate commented, human-readable assembly, and standard HEX compatible

with all programmers.


Use the integrated MikroC (In-Circuit Debugger) Real-Time debugging tool to

monitor program execution on the hardware level.


Inspect program flow and debug executable logic with the integrated Software

Simulator.
Generate COFF (Common Object File Format) file for software and hardware

debugging under Microchip's MPLAB software.


Active Comments enable you to make your comments alive and interactive.
Get detailed reports and graphs: RAM and ROM map, code statistics, assembly
listing, calling tree, and more.

Sir Syed University of Engineering & Technology


38

5.4

CONCLUSION

The function and operation of major hardware modules and software tools used in AVS
have been briefly discussed and shown in the report for better understanding and learning
of the tools that contributed a major part in achieving the overall goal of the system.

CHAPTER # 6

6.1

RESULTS & DISCUSSION

RESULT

Sir Syed University of Engineering & Technology


39

We managed to achieve our goals in making the AVS. Whole system was operating as
expected. All the features were tested to be working alright. Sending commands via SMS
were resulting in execution of operation as per programmed. There was a minor error in
the speed measurement & speed limiting function was causing minor jerks, whenever it
got active, i.e. when speed of the car tries to get higher than speed limit set by the user.

If we were to repeat the project from scratch, we would do few things differently. Like,
Implementing better method of speed limitation, using higher resolution of GLCDs,
design of PCBs with extra noise immunity etc.

6.2

6.2.1

PROBLEMS FACED

NON-AVAILIBILITY OF HARDWARE

A common issue, due to which lot of time is wasted in searching for the part, ordering &
waiting for the shipment. This issue leaves one with no choice but to use the only
hardware available in the market.
6.2.2

SYSTEM OPERATION COMPLICATIONS

There were complications in defining and making the strategy for the operation of each
unit. Whole system operation, on software part, was either changed or modified many
times to get the system working as per required that cost a huge amount of time.
6.2.3

NOISE AND INTERFERENCE

A critical issue occurred which also caused lot of time and cost to resolve it. Noises and
interferences generated by the cars ignition system and alternater were causing huge

Sir Syed University of Engineering & Technology


40

Electromagnetic Interfernce (EMI). Due to induction of EMI and EMI inducing on any of
the nearby circuits was cauing generation of high voltages which resulted in

Oscillator hangup
Reseting of micrcontroller
Corruption of code memory of micrcontroller
Corruption of EEPROM of microcontroller
False hardware interrupts generation
Damaging LCD due to high voltage generation

Following methods were used to reduce induction of EMI, which were proved to be very
much effective:

Replacement of spark-plug cables with high resistance cables.


Shielding of spark-plug cable with extra rubber pipes and added covering of

aluminium foil paper.


Replacement of spark-plugs.
Covering the circuit boards with grounded iron sheets.

CHAPTER # 7

APPLICATIONS & FUTURE ENHANCEMENTS

Sir Syed University of Engineering & Technology


41

Sir Syed University of Engineering & Technology


42

7.1

APPLICATIONS

The basic application of the AVS are its features itself. However, AVS is a low cost
solution to mentioned features, which can be implemented in every car with some
required specifications. AVS can also be implemented in cars during manufacturing with
customized, special configurations & enhanced features.

7.2

FUTURE ENHANCEMENTS

Voice commands for controlling devices.


Improvement of Display, RGB & high resolution display.
Improvement of user interface.
Collision avoidance System with object recognization capability.
Cruise Control
Tyre Pressure Monitor
Automatic interior Climate Control
Parking aid Sensors

7.3

CONCLUSION

AVS makes automobile much more convenient, reliable, safer & secure, along with much
intuitive control & access to car. AVS can be enhanced with the addition of further more
features. It would be worth spending money on AVS.
Major problem faced in AVS was of noise produced by the ignition system of car
resulting in malfunctioning of operation of system and even causing damage to hardware.
So it is important to design the system with capability to be safe from noises produced
Sir Syed University of Engineering & Technology
43

with in the car by ignition system and alternator and should ensure reliable operation of
whole system.

Sir Syed University of Engineering & Technology


44

APPENDICE

APPENDIX A

APPENDIX A
TIME ANALYSIS
It took approximately 6 months with average of 3-4hrs/day to finalize the project. With
the design of AVS as being divided into units, so time analysis according to different
phases or working on unit is shown in GANTT chart below.

A-1: Time Analysis

APPENDIX C

APPENDIX B
COST ANALYSIS
The total approximate cost of the project has been Rs. 46500/=
Cost listing of items is given below:
S.No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Items
Graphic LCD T240128
Graphic LCD JHD240128
ADXL335
SIM900D
Holux GR-89
4-Wire Resistive Touch Panel
RF Modules
SD Card 1Gb
Door Lock Actuators
x7
PIC16F877A
x 11
PIC18F452
x8
DS1307
Other ICs
Wires / Cables
Various pins / Connectors
Electric Tapes
x 12
Glue / Adhesives
Relay 12v 22A
x7
Relay 12v 10A
x 12
PCB Copper boards
Vero boards
Ferric Chloride
Photo paper
Soldering wire
Modules soldering labor
Door lock installation labor
High resistance spark plug cables
Spark plugs
Rubber pipe for shielding
Foil paper
USB to Serial cables
x2

Cost (Rs.)
1400
3500
3300
3300
3000
2000
4750
550
1000
2750
2800
120
2000
2900
800
240
300
480
900
1500
400
300
600
600
200
700
900
600
500
150
850

APPENDIX C
31
32
33
34
34
35
36
37
38

Battery 12v 5.4Ahr


Battery 3.7V 1300mAh
x2
Iron sheets for metal box
Acrylic Sheets + cutting
Mobile Credits
Stationeries
Poster printing
Final Year Project report printing
Misc. Electronic Item

750
500
400
500
500
3000
1400
1500
3000

[resistors, capacitors, transistors, diodes,


zeners, LEDs, pushbuttons, switches,
sockets/bases, etc]
Rs.54,040/
Approx. Total

APPENDIX C
SCHEMATICS
Security Module Circuit

APPENDIX C

APPENDIX C

APPENDIX C

APPENDIX C

C-1 Snapshot GSM circuit

APPENDIX C
C-2 Snapshot of GPS circuit

C-3 Snapshot of whole Security module

APPENDIX C

C-25 Snapshot of Control + Safety Unit

APPENDIX C
C-4 Snapshot of GLCD Display + Touchscreen

C-5 Snapshot of Driver circuits

APPENDIX D

APPENDIX D
SOURCE CODE OF MICROCONTROLLER
Security Unit
sbit pwr_key at PORTd.B0;
sbit status_gsm at portd.b1;
sbit rid at portb.b0;
sbit sel_dev at portd.b2;
// = 0, Device = GSM && =1, Device = GPS
sbit lock1 at portb.b1;
sbit lock2 at portb.b2;
sbit lock3 at portb.b3;
sbit lock4 at portb.b4;
const Addy = 0x68;
const char arr [40][18]={"freeze.","ready.","lock o.","lock c.","lock s.",
"engine o.","engine c.","engine s.","window o.",
"window c.","window s.","lights o.","lights c.",
"lights s.","speed s.","loc s.","drive s.",
"user s.","status o.","talk.","unjam.","boot o.","fuellid o."};
const char sms_resp[30][25]={"Done!.","locks open.","locks closed.","engine on.",
"engine off.","window open.","window closed.",
"car speed = .","driving Analysis = .","lights on.",
"lights off.","user = ."};
const char resp [15][15]={"OK\r\n","ERROR\r\n"};
const char at_cmds[20][22]={"AT\r\n","ATE0\r\n","AT+CMGF=1\r\n",
"AT+CMGR=1\r\n", "AT+CMGDA=\"DEL ALL\"\r\n","AT+CMGS=\"","\z"};
const char *gps_cmds0="$PSRF100,1,9600,8,1,0*0D\r\n"; //SET BAUDRATE=9600
const char *gps_cmds1="$PSRF103,00,00,00,01*24\r\n"; //disable GGA msg rate
const char *gps_cmds2="$PSRF103,01,00,00,01*25\r\n"; //disable GLL msg rate
const char *gps_cmds3="$PSRF103,02,00,00,01*26\r\n"; //disable GSA msg rate
const char *gps_cmds4="$PSRF103,03,00,00,01*27\r\n"; //disable GSV msg rate
const char *gps_cmds5="$PSRF103,04,00,00,01*20\r\n"; //disable RMC msg rate
const char *gps_cmds6="$PSRF103,05,00,00,01*21\r\n"; //disable VTG msg rate
const char *gps_gll="$PSRF103,01,01,00,01*24\r\n"; //Query GLL msg
unsigned int compare
unsigned char rx_data
void
tx_atcmd
void
discard_rx
void
init

(unsigned int n_cmds,unsigned int l_cmds);


(void);
(unsigned int n_cmds);
(unsigned int n_chars);
(void);

APPENDIX D
void
buffer_resp
(unsigned int l_cmds);
void
clear_buff_rx
(void);
unsigned int compare_resp
(unsigned int n_cmds,unsigned int l_cmds);
void
check_get_sms_cmd (void);
void
init_gps
(void);
void
get_gps_data
(void);
void
update_status
(void);
void
process_status
(void);
void
send_sms
(void);
void
freeze_car
(unsigned short i);
unsigned char master_pass[4];
unsigned char sender_specific[13];
unsigned char cmd_sender[13];
unsigned char longi_data[]="12345.0000,E";
unsigned char lati_data[]="1234.0000,N";
unsigned short int speed=205;
unsigned short int speed_limit=30;
unsigned short int status1=0x00;
unsigned short int status2=0;
unsigned short int cmd2master1=0;
unsigned short int cmd2master2=0x00;
unsigned short int car_user=0;
unsigned short int cid=0; //Command ID , info ID request by Master in I2C comm.
unsigned char
m_data;
/* RU */
unsigned short int pos=0,l=0,ni=0;
unsigned int
i=0,j=0,k=0;
unsigned short int flag=0;
unsigned short int buff_i2c;
unsigned short int mbi_i2c=0; //multi_bytes_index_ for i2c
unsigned char
rec[20]; // for response buffering
unsigned char
buff_sms[40]; // for sms compilation buffering
unsigned char
buff_short2str[5]; //for speed (n other) short int conversion buffer
unsigned int
e_wr,e_rd;
void main(void){
init();
sel_dev=0; //gsm
if (status_gsm)
{
pwr_key = 1; //->
delay_ms(1000); //-> Powering on GSM module
pwr_key = 0; //->
}
init_gps(); // initializing GPS module
delay_ms(4000); // waiting for GSM to register with network
uart1_init(9600);
tx_atcmd(0); // sending (testing) with "AT"

APPENDIX D
buffer_resp(20); //excluding the <CR><LF> in the beginning
delay_ms(100);
clear_buff_rx();
tx_atcmd(1); // disabling command echo with "ATE0"
discard_rx(12); //discarding the response
flag=compare_resp(15,12); //checking response whether OK received or not?
tx_atcmd(2); // changing GSM to "Text mode"
discard_rx(6); // discarding response
tx_atcmd(4); // delete all messages in GSM Module
discard_rx(6); //discard response
for (ni=0; ni<4; ni++) // load master password from EEPROM , Add=0x00
{
master_pass[ni] = EEPROM_Read(0x00+ni);
delay_ms(21);
}
for (ni=0; ni<13; ni++) // load cmnd sender no. (for restriction to single mobile number)
from EEPROM , Add=0x00
{
sender_specific[ni] = EEPROM_Read(0x06+ni);
delay_ms(21);
}
while(1)
{
portb.b0=!portb.b0; //debugger
get_gps_data();
check_get_sms_cmd();
process_status();
delay_ms(600);
}
} //End of main program
// Interrupt Serivce Routines /////
void interrupt()
{
if (PIR1.SSPIF == 1)
// I2C Interrupt
{ portb.b7=!portb.b7; //debugger
PIR1.SSPIF = 0;
//Receiev request.transmit data to master
if (SSPSTAT.R_W == 1)
{
// Read request from master
if (cid==0)
{ SSPBUF = 0x00;//tx_data;
// Get data to send
cid=0;

APPENDIX D
}
if (cid==45){ SSPBUF = cmd2master1; cid=0; cmd2master1=0;}
if (cid==46){ SSPBUF = cmd2master2; cid=0; cmd2master2=0;}
if (cid==47){ SSPBUF = speed_limit; cid=0; }
if (cid==48)
{
SSPBUF = longi_data[mbi_i2c];
mbi_i2c++;
if (mbi_i2c==12){ mbi_i2c=0; cid=0; }
}
if (cid==49)
{
SSPBUF = lati_data[mbi_i2c];
mbi_i2c++;
if (mbi_i2c==11){ mbi_i2c=0; cid=0; }
}
if (cid==50)
{
SSPBUF = cmd_sender[mbi_i2c];
mbi_i2c++;
if (mbi_i2c==13){ mbi_i2c=0; cid=0; }
}
if (cid==51)
{
SSPBUF = sender_specific[mbi_i2c];
mbi_i2c++;
if (mbi_i2c==13){ mbi_i2c=0; cid=0; }
}
SSPCON1.CKP = 1;
buff_i2c = SSPBUF;
return;

// Release SCL line


// That's it

}
if (SSPSTAT.BF == 0)
{
// all done,
j = SSPBUF;
return;
}

// Nothing in buffer so exit

//receive data from master


if (SSPSTAT.D_A == 1)
{
// Data [not address]
if (cid==0)

APPENDIX D
{
cid=SSPBUF; // if no command has previously been issued by master. then the byte
received is taken as CID ,for info exchange request of specific data
goto FIN_I2C
}
// if CID <64 , then master is requesting slave to send data corresponding to CID
// if CID >64 , then master is requesting slave to receive command/status bytes.
if (cid==65) { status1 = SSPBUF; cid = 0; }
if (cid==66) { status2 = SSPBUF; cid = 0; }
if (cid==67) { speed = SSPBUF; cid = 0; }
if (cid==68)
{
master_pass[mbi_i2c] = SSPBUF;
mbi_i2c++;
if (mbi_i2c==4){ mbi_i2c=0; cid=0; }
}
if (cid==69)
{
sender_specific[mbi_i2c] = SSPBUF;
mbi_i2c++;
if (mbi_i2c==13){ mbi_i2c=0; cid=0; portb.b6=!portb.b6; }
}
FIN_I2C:
j = SSPBUF;
return;

// read buffer to clear flag [address]

}
}
buff_i2c = SSPBUF;
} // Enf of Interrupt Serivce Routine //
APPENDIX E
LIST OF SMS COMMANDS SUPPORTED
Command Syntax: <command><full stop>
O = open / on

C = close / off

S = Get status

List of commands:
1
2
3

freeze.
unjam.
ready.

Car jam, car lock, windows, engine


Un-jam the car
Engine start, lock open

APPENDIX D
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

lock o.
lock c.
lock s.
engine o.
engine c.
engine s.
windows o.
windows c.
windows s.
speed s.
loc s.
drive s.
lights o.
lights c.
lights s.
user s.
status o.
talk.

Lock open
Lock close
Lock status
Engine open
Engine close
Engine status
Windows open
Windows close
Windows status
Speed status
Location status
Driving status
Lights on
Lights close
Lights status
User status
User status
Send message to car, car will call the mobile by which
message have received.
APPENDIX F

DATASHEETS

APPENDIX D
ADXL335

APPENDIX D

APPENDIX D

GRAPHICAL LCD JHD240128

Pin outs of JHD240128

APPENDIX D

APPENDIX D

GPS RECEIVER MODULE HOLUX GR-89

GR-89 Pin Configuration

APPENDIX D
GR-89

APPENDIX D

APPENDIX D

GSM MODULE SIM900D


GSM/GPRS module SIM900D :
Weight: 3.4g
Low power consumption
SIM900D can be compatible with SIM340DZ

GSM/GPRS/EDGE module SIM900D :


SIM900D
SIMCom presents an ultra compact and reliable wireless module-SIM900D. This
is designed with a very powerful single-chip processor integrating AMR926EJ-S
core, allowing you to benefit from small dimensions and cost-effective solutions.
Furthermore, SIM900D can be compatible with SIM340DZ.
Featuring an industry-standard interface, the SIM900D delivers GSM/GPRS
850/900/1800/1900MHz performance for voice, SMS, Data, and Fax in a small
form factor and with low power consumption. With a tiny configuration of 33mm x
33mm x 3 mm, SIM900D can fit almost all the space requirements in your M2M
applications, especially for slim and compact demands of design.
General features
* Quad-Band 850/ 900/ 1800/ 1900
MHz
* GPRS multi-slot class 10/8
* GPRS mobile station class B
* Compliant to GSM phase 2/2+
Class 4 (2 W @850/ 900 MHz)
Class 1 (1 W @ 1800/1900MHz)
* Dimensions: 33*33*3mm
* Weight: 6.2g
* Control via AT commands (GSM
07.07 ,07.05 and
SIMCOM enhanced AT
Commands)
* SIM application toolkit
* Supply voltage range : 3.1 ... 4.8V
* Low power consumption:
1.5mA(sleep mode)
* Operation temperature: -40 C to
+85C

Specifications for Data


* GPRS class 10: max. 85.6 kbps
(downlink)
* PBCCH support
* Coding schemes CS 1, 2, 3, 4
* CSD up to 14.4 kbps
* USSD
* Non transparent mode
* PPP-stack

Specifications for SMS via


GSM/GPRS
* Point-to-point MO and MT
* SMS cell broadcast
* Text and PDU mode

APPENDIX D
Software features
* 0710 MUX protocol
* embedded TCP/UDP protocol
* FTP/HTTP( available at July ,2010)
* FOTA ( available at July ,2010)
* MMS (available at July ,2010)
* Embedded AT (available at
Q3,2010)
Specifications for Voice
* Tricodec
Half rate (HR)
Full rate (FR)
Enhanced Full rate (EFR)
Half rate (HR)
Full rate (FR)

SIM900D Pin outs

Interfaces
* Interface to external SIM 3V/ 1.8V
* analog audio interface
* RTC backup
* SPI interface (option)
* Serial interface
* Embedded SIM (option )
* Antenna pad
* GPIO
* ADC
* Charge interface for Li battery
* PWM
Compatibility
* AT cellular command interface

APPENDIX D
Pic16f877a

APPENDIX D

APPENDIX D

Pin outs of PIC16F877A

APPENDIX D
PIC18F452

APPENDIX D
Pin outs of PIC18F452

REFERENCES

REFERENCES

Articles
[1]

Parallex inc. & Nuts and Volts - Graphical Liquid Crystal Display

[2]

Atmel Application Notes Microcontroller in Harsh Enviroment

[3]

Atmel Application Notes 4 Wire Resistive Touch Screens

[4]

Microchip Application Note I2C Protocol, December 2001

[5]

Scandisk Corp. Secure Digital Cards, Version 1.9. December 2003

[6]

Svyatoslav Paliy, Touch Screen control and Calibration, AN2173, Cypress


Microsystems.

Books

[7]

Milan Verle, PIC Microcontrollers - Programming in C, 1st edition, 2009,


MikroElektronik

[8]

Thomas M. Floyd, Electronic Devices, 7th edition, 2005, Pearson Education


International.

Internet

[9]

Monitoring Car Performance with Computer Technology


http://www.brighthub.com/diy/automotive/articles/79561.aspx

REFERENCES

[10]

Driving & Engine Performance Monitor


http://www.carchip.com/Products/8226.asp

[11]

Car Safety Features to Look Out For


http://www.rd.com/money/9-car-safety-features-to-look-out-for/

[12]

Car Safety Features


http://www.money-zine.com/Financial-Planning/Leasing-or-Buying-aCar/Car-Safety-Features/

[13]

How to Choose Car Security


http://www.crutchfield.com/SyTkbF3U5a3p/learn/learningcenter/car/security.html
Graphical LCD and Touch user interfaces

[14]

http://www.simplify-technologies.de/lcd_modules/index.html
[15]

Resistive Touch Screens


http://gps.about.com/od/glossary/g/resistive-touchscreen.htm

[16]

SD Card Interfacing
http://www.electro-tech-online.com/microcontrollers/29648-sd-cardinterfacing.html

[17]

Sparksfun ADXL335
http://www.sparkfun.com/products/9269

You might also like