Documente Academic
Documente Profesional
Documente Cultură
It is so sad to hear that the news of road and fire accidents happening rapidly
now a days. Many are losing their beloved. The incidence of accidental deaths has
shown an increasing trend during the period 2003 -2013 with an increase of 51.8% in
the year 2013 as compared to 2002 however 0.2% decreases was observed in 2003
over previous year 2002. The population growth during the period 2003-2013 was
13.6% whereas the increase in the rate of accidental deaths during the same period
was 34.2%.
From the recent survey analysis 72% of the accidents causes because of the
carelessness of the rider or he is drunk. In case of major accidents many people are
not being saved because of the delay of emergency response teams, as they are getting
informed so late. Many are losing their lives lack of medical response in time. For non
occurrence of such kind of delay in information i tried to develop some detection and
prevention system in this project.
The idea behind this project is, to detect the cause of vehicle accidents well in
advance and apply the control acts to rectify them. Mainly the accidents come through
in many ways like fire accidents, collisions, over speed etc. How to overcome this
dangerous and how to control it.
This project is implemented in embedded system my using LPC2148
processor, including with GSM/GPS technology. The detection is maintained by some
sensors used in appropriate places.
The project covers a wide range of fire safety issues in buses. The main focus
is on: risk assessments, performance requirements for interior materials and the study
of fire risks, prevention, detection and extinguishment in engine compartments.
Finally all the actions for proposed new methods and requirements for improved fire
safety on buses are summarized.
TABLE OF CONTENTS
ABSTRACT
TABLE OF CONTENTS
II
ABSTRACT
II
LIST OF FIGURES
IV
LIST OF TABLES
VI
CHAPTER 1
INTRODUCTION
1.1 Introduction:
1.2 Objectives:
CHAPTER 2
ARM BASED ROAD AND FIRE ACCIDENTS DETECTION AND
PREVENTION SYSTEM IN VEHICLES WITH GPS
2.1 Introduction:
10
2.5 Conclusion:
10
CHAPTER 3
COMPONENTS DESCRIPTION
11
11
3.2 IR Sensors:
24
25
27
28
3.6 ADXL335:
30
3.7 EEPROM:
32
33
3.9 L293D:
37
40
ii
44
3.12 APR9600:
47
3.13 DC MOTOR:
51
52
60
CHAPTER 4
SOFTWARE ARCHITECTURE
65
65
4.2 Proload:
65
65
66
4.5 Conclusion:
75
CHAPTER 5
RESULTS & DISCUSSIONS
76
5.1 Introduction:
76
76
77
CHAPTER 6
CONCLUSION& FUTURE SCOPE
78
6.1 Conclusion:
78
REFERENCES
79
BIBLIOGRAPHY
81
APPENDIX-A
GLOSSARY
82
APPENDIX-B
PUBLICATION
88
iii
LIST OF FIGURES
Sl.No
Figure No
Description
Page No
2.1
07
2.2
09
2.3
10
3.1
12
3.2
14
3.3
15
3.4
22
3.5
23
3.6
24
Circuit
10
3.7
Gas Sensors
25
11
3.8
Standard circuit
26
12
3.9
RL signal output
26
13
3.10
28
14
3.11
29
15
3.12
31
16
3.13
31
17
3.14
33
18
3.15
34
18
3.16
36
19
3.17
DC motor diagram
37
20
3.18
38
21
3.19
39
capacitors
22
3.20
43
23
3.21
44
24
3.22
7805 Regulator
46
25
3.23
Pin-out of APR9600
47
26
3.24
50
iv
27
3.25
DC Motor
51
28
3.26
55
29
3.27
57
30
3.28
57
31
3.29
58
32
3.30
Location Search
62
33
3.31
GPS Triangulation
63
34
6.1
76
35
6.2
77
LIST OF TABLES
Sl.No
Table No
01
2.1
Description
Page No
06
India
02
2.2
Sensors list
08
03
3.1
16
04
3.2
36
05
3.3
42
06
3.4
42
07
3.5
43
07
3.6
49
08
3.7
54
vi
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 1
INTRODUCTION
1.1 Introduction:
An embedded system is a combination of both software and hardware utilities used to
perform a dedicated task. Some of the main components used in embedded products are
Microprocessors and Microcontrollers.
In our daily lives, the usage of embedded system and digital information technology
are growing prominently. In fact embedded systems are embedded in our environment to a
great extent. the usage is so grown that even the client using embedded system doesnt have a
feeling that he is using a small computer in ordinary sense. One of the main reasons for that
is the visibility of processor is minimized in the embedded system. An embedded system is a
special purpose system in which the computer is completely encapsulated by or dedicated to
the device or to the system it controls.
The world population of people over the age of 65 is growing rapidly at a rate
of 800,000 per month. A normal person performs daily activities at regular interval of
time. This implies that the person is mentally and physically fit and leading a regular
life. This tells us that the overall well-being of the person is at a certain standard. If
there is decline or change in the regular activity, then the wellness of the person is not
in the normal state. Elderly people desire to lead an independent lifestyle, but at old
age, people become prone to different accidents, so living alone has high risks and is
recurrent. A growing amount of research is reported in recent times on development
of a system to monitor the activities of an elderly person living alone so that help can
be provided before any unforeseen situation happened.
Recent researchers in sensor technology, cellular networks and information
technology promise to improve the well-being of the elders by assisting them in their
daily chores and monitoring their health status. Thus allowing them to lead an
independent life away from healthcare institutions, care takers. With the usage of
sensors they can get medical and other information without human effort. In real life
practical applications such as surveillance, security use camera based embedded
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
1.2 Objectives:
The objective of the project is to avoid Road and fire accidents especially in public
transport vehicles like Volvo buses and also the precautions to be taken for eradication
of such accidents. The main objectives of the project are:
To monitor the health position of driver and also check whether the driver
consumed alcohol or not.
To avoid collision of the vehicle with culverts, bridges etc in their course and
immediately stop the vehicle.
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
T.
Calafate,
Pietro
ManzoniUniversity of
Zaragoza,
Spain
IEEE
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Chapter 1 deals with the introduction part of it. It mainly focuses on the object
of the project and literature survey tells about from where the information is
collected.
Chapter 2 deals with the complete Block Diagram and Operation of the
project.
Chapter 3 deals with the main ICs pin conFigureuration, main devices
introduction, process, pin diagram and detailed description about components
which are used in proposed system.
Chapter 7 deals with the conclusions and future scope of the project.
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 2
Rate
Sl. No.
1
2
3
4
5
6
7
8
9
1
10
11
21
31
41
51
61
7
States / UTs
PUDUCHERRY
CHHATTISGARH
GOA
MAHARASHTRA
MADHYA PRADESH
TAMIL NADU
HIMACHAL PRADESH
DAMAN & DIU
HARYANA
DELHI (UT)
GUJARAT
KARNATAKA
PUNJAB
ANDHRA PRADESH
D & N HAVELI
RAJASTHAN
ODISHA
(more than
32.6)
80.1
58.2
58.1
54.1
48.8
48.2
46.9
46.7
46.2
43.6
41.4
39.7
38.2
34.8
34.6
34.3
33.1
Rate
Sl. No.
1
2
3
4
5
6
7
8
9
1
10
11
21
31
41
51
61
71
8
States / UTs
A & N ISLANDS
ARUNACHAL
PRADESH
MIZORAM
KERALA
WEST BENGAL
SIKKIM
UTTARAKHAND
CHANDIGARH
JHARKHAND
JAMMU & KASHMIR
MEGHALAYA
TRIPURA
ASSAM
UTTAR PRADESH
MANIPUR
BIHAR
LAKSHADWEEP
NAGALAND
(less than
32.6)
3
2.
3
2.
32
23
2.
12
1.
6.
27
6.
28
02
4.
72
2.
31
0.
21
9.
91
9.
7
8.
1
71
5.
41
4.
71
3.
8
9.1 2.
3.9 2
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
From the recent survey analysis 72% of the accidents causes because of the
carelessness of the rider or he is drunk. In case of major accidents many people are
not being saved because of the delay of emergency response teams, as they are getting
informed so late. Many are losing their lives lack of medical response in time. For non
occurrence of such kind of delay in information i tried to develop some detection and
prevention system in this project. This project is implemented in embedded system
my using LPC2148 processor, including with GSM/GPS technology. The detection is
maintained by some sensors used in appropriate places.
The idea behind this project is, to detect the cause of vehicle accidents well in
advance and apply the control acts to rectify them. Mainly the accidents come
throughin many ways like fire accidents, collisions, over speed etc. How to overcome
this dangerous and how to control it.
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
GAS sensor
MQ3
Alcohol sensor
MQ5
MEMS
ADXL35
APR9600
IR sensor
LM358
We know the main cause for the fire accidents is Fuel leakage (Gas or liquid
Fuel). In this project at the fuel tank, a sensor (GAS sensor) is placed which senses
any leakage intimates the same to ARM7.ARM7 gives an alert to passengers by voice
alert, automatically opens the windows and doors, and stops the engine within
fraction of seconds. If fire occurs in the vehicles by any means then the smoke sensor
senses and intimates to ARM7. It alerts the people by voice alert(Using APR sensor) ,
automatically opens the windows and doors, intimate this accident report to nearest
emergency call services using GSM & GPS technology, Spread the GAS to control
the fire simultaneously.
Apart from this, you can add IR sensor for maintaining proper distance
between other vehicles to avoid vehicle collisions, Alcohol sensor to detect whether
driver consumes alcohol while driving. If driver take the alcohol automatically stop
the engine. MEMS sensor for detecting the driver health position. Finally we keep this
information in EEPROM for further investigation.
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
2.5 Conclusion:
The project covers a wide range of fire safety issues in buses. The main focus
is on: risk assessments, performance requirements for interior materials and the study
of fire risks, prevention, detection and extinguishment in engine compartments.
Finally all the actions for proposed new methods and requirements for improved fire
safety on buses are summarized.
10
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 3
COMPONENTS DESCRIPTION
3.1 ARM processor:
ARM stands for Advanced RISC Machines. It is a 32 bit processor core, used
for high end application. It is widely used in Advanced Robotic Applications. The
ARM architecture has been designed to allow very small, yet high-performance
implementations. The architectural simplicity of ARM processors leads to very small
implementations, and small implementations allow devices with very low power
consumption.
The ARM is a Reduced Instruction Set Computer (RISC), as it incorporates
these typical RISC architecture features:
Simple addressing modes, with all load/store addresses being determined from
register contents and instruction fields only
Control over both Arithmetic Logic Unit (ALU) and shifter in every dataprocessing instruction to maximize the use of an ALU and a shifter
Barrel Shifter in data path that maximize the usage of hardware available on the
chip.
11
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
ARM Architecture:
32 bit processor. It also has 16 bit variant i.e. it can be used as 32 bit and as 16
bit processor
12
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
ARM Organization:
Register Bank is connected to ALU via two data paths.
A Bus
B Bus
B bus goes via Barrel Shifter. It preprocesses data from source register by shifting left
or right or even rotating. The Program Counter is that part of Register Bank that
generates address. Registers in register bank are symmetric i.e., they can have both
data and address. Program counter generates address for next function.
Address Incremental block, increments or decrements register value independent of
ALU. There is an Instruction Decode and control block that provides control signals.
(Not in Figure)
Pipeline
Register Bank
13
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Depending upon application R13 and R14 can also be used as GPR. But not
commonly used.
CPSR
SPSR
CPSR
Current program status register, status of current execution is stored .CPSR contains a
Number of flags which report and control the operation of ARM7 CPU.
SPSR
Saved program Status register, includes status of program as well as processor.SPSRis
used to preserve the value of the CPSR when the associated exception occurs.
ARM has 31 general purpose 32 bit register where 16 of these are visible at
any time. Other registers are used to speed up processing of exceptions. There also is
6 32bit wide status registers. Lets see how it looks like. Registers are arranged in
partially overlapping banks with a different register ban of each MCU mode. As I
mentioned at any time 15 general purpose registers (R0 to R14) and one or two status
registers and PC are visible. Basically R0-R12 registers are user register, that doesn't
have special purpose. Registers R13 R15 has special functions. R13 is used as stack
pointer (SP), R14 is used as link register (LR) and R15 is as program counter (PC):
14
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
The N bit is the "negative flag" and indicates that a value is negative.
The Z bit is the "zero flag" and is set when an appropriate instruction produces
a zero result.
The C bit is the "carry flag" but it can also be used to indicate "borrows" (from
subtraction operations) and "extends" (from) and "extends" (from shift
instructions (LINK)).
The V bit is the "overflow flag" which is set if an instruction produces a result
that overflows and hence may go beyond the range of numbers that can be
represented in 2's complement signed format.
The I and F bits which determine whether interrupts (such as requests for
input/output) are enabled or disabled.
The T bit which indicates whether the processor is in "Thumb" mode, where
the processor can execute a subset of the assembly language as 16-bit compact
instructions. As Thumb code packs more instructions into the same amount of
memory, it is an effective solution to applications where physical memory is at
a premium.
The M4 to M0 bits are the mode bits. Application programs normally run in
user mode (where the mode bits are 10000). Whenever an interrupt or similar
event occurs, the processor switches into one of the alternative modes
allowing the software handler greater privileges with regard to memory
manipulation.
ARM7 MCU has six operation modes and each mode has its own register
conFigureuration. For instance FIQ interrupt mode has duplicated R7 R12 registers,
Dept. of ECE, B V C Engineering College, Odalarevu
15
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
program doesn't have to preserve registers in to stack. And of course R13 R15
registers are duplicated in each following mode. Other registers (R0 to R7) are unbanked what means they are physically same and accessible in all modes.
ARM7 is a load-and-store architecture, where before processing any
instruction the data has to be moved from memory to set of registers after execution
data is stored back into memory.
16
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
But shorter than 32 bit data types are supported only by data transfer functions but
when internally processed they are extended to 32 bit size. ARM7 core doesnt
support floating point data types they can only be interpreted by software.
ARM memory organization:
ARM7 is capable to store words in two ways depending on weather significant
byte is stored. If word MSB is stored at highest byte then operation is called littleendian if MSB is stored at lowest position, then it is called big-endian.
17
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Usually it is easier to work with little-endian for people as they expect to be LSB at
lowest position. Endian is selected in compiler settings.
ARM conditional instructions:
Comparing to other RISC microcontrollers almost all ARM7 core instructions
are conditionally executed. As conditional branches are standard instructions ARM
instructions were extended by adding 4 bit in the top of 32 bit instruction field:
18
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Conditional instructions are is one factor that keeps smooth program flow through
pipeline. As we know when usual branch occur the pipeline is flushed and start
refilling from beginning.
ARM7 instruction groups:
ARM7 instructions split in six main categories:
Branching;
Data processing;
Data transfer;
Block transfer;
Multiply;
Software interrupts.
19
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Also a Thumb instruction doesnt have full access to all registers. Thumb instructions
can only access low registers(R0-R7). And only few instructions can access high
registers(R8-R12).
Thumb decoding:
Thumb instructions have to be decoded-decompressed to equivalent ARM
instructions while executed. This is handled in instruction pipeline. Pipeline has
additional de-compressor logic in series to instruction decoder, which firstly
decompress Thumb instruction and then decode. This usually results in decode
latency.
LPC2148 Features:
16/32-bit ARMTDMI-S microcontroller in a tiny LQFP64 package.
8 to 40 kB of on-chip static RAM and 32 to 512 kB of on-chip flash program
Memory.128 bit wide interface/accelerator enables high speed 60 MHz
operation.
In-System/In-Application Programming (ISP/IAP) via on-chip boot-loader
software. Single flash sector or full chip erase in 400 ms and programming of
256 bytes in 1ms.
Embedded ICE RT and Embedded Trace interfaces offer real-time
debugging with the on-chip Real Monitor software and high speed tracing of
instruction execution.
USB 2.0 Full Speed compliant Device Controller with 2 KB of endpoint
RAM. In addition, the LPC2148 provides 8 KB of on-chip RAM accessible to
USB by DMA.
Dept. of ECE, B V C Engineering College, Odalarevu
20
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
21
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Single power supply chip with Power-On Reset (POR) and BOD circuits:
22
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
The solution proposed doesn't contain any special components, like photo-diodes, phototransistors, or IR receiver ICs, only a couple if IR leds, an Op amp, a transistor and a couple
of resistors. In need, as the title says, a standard IR led is used for the purpose of detection.
Due to that fact, the circuit is extremely simple, and any novice electronics hobbyist can
easily understand and build it.
The main sensors used in this Project:
1. IR Sensor
2. Gas Sensor
23
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
3. Alcohol Sensor
4. Temperature Sensor
5. Accelerometer
3.2 IR Sensors:
Principle of Working
An Infrared (IR) sensor is used to detect obstacles in front of the robot or to
differentiate between colors depending on the configurationof the sensor.
IR Transmitter
Circuit
IR Receiver Circuit
24
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Specifications:
Advantages:
Voltage output
High sensitivity
Long stability
Good selectivity
25
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Standard circuit:
As shown in Figure 3.19, standard measuring circuit of MQ-7 sensitive
components consists of 2 parts. One is heating circuit having time control function
(the high voltage and the low voltage work circularly). The second is the signal output
circuit; it can accurately respond changes of surface resistance of the sensor. Electric
parameter measurement circuit is shown as Figure.
Operating Principle:
The surface resistance of the sensor Rs is obtained through effected voltage
signal output of the load resistance RL which series-wound. The relationship between
them is described:
Rs\RL = (Vc-VRL) / VL
Figure.3.20 shows alterable situation of RL signal output measured by using Figure
circuit output signal when the sensor is shifted from clean air to carbon monoxide
(CO) , output signal measurement is made within one or two complete heating period
(2.5 minute from high voltage to low voltage ).
Sensitive layer of MQ-7 CO sensitive components is made of SnO2 with stability, So,
it has excellent long term stability. Its service life can reach 5 years under using
condition.
26
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Features:
* High sensitivity to LPG, natural gas , town gas
* Small sensitivity to alcohol, smoke.
* Fast response.
* Stable and long life
* Simple drive circuit
Application:
They are used in gas leakage detecting equipments in family and industry, are
suitable for detecting of LPG, natural gas , town gas, avoid the noise of alcohol and
cooking fumes and cigarette smoke.
Application:
*
27
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Configuration:
28
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
temperature coefficient (PTC) are available, but NTC Thermister is more common.
The negative-temperature coefficient means that the resistance increases with the
increase in temperature.
The NTC Thermister are manufactured by sintering which is a process in
which powdered materials are fused together by the application of heat semiconductor
ceramic materials prepared from mixtures of metallic oxides of cobalt, nickel,
manganese etc. These materials have high negative temperature coefficient. The PTC
Thermister are made from doped barium titanate semi conducting material. This
material has a very large change in resistance for a small change in temperature. In
this project NTC Thermister is used.
Thermister are manufactured in the form of beads, probes, disc, washers and
rods. The beads are made in diameter ranging from 0.15mm to 2.5mm. These are
useful where temperature sensing must be done in very limited spaces. Sealing
Thermister beads in glass rods up to 25mm in diameter forms the probes. These are
more rugged than beads and work well in liquids. Figureure 3.16 shows the
schematic symbol of a Thermister.
Thermister Applications
Thermister are extensively used in industrial, commercial, medical and household
applications. Some of the important applications of Thermister are:
1. Temperature measurement and control.
2. Liquid level measurement.
3. Temperature compensation in electronic circuits.
4. Flow rate measurement
Dept. of ECE, B V C Engineering College, Odalarevu
29
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
3.6 ADXL335:
Features:
3-axissensing
small,lowprofilepackage
4mm4mm1.45mmlfcsplowpower:350a(typical)
single-supplyoperation:1.8vto3.6v 10,000gshocksurvival
Applications:
Image stabilization
General description:
The ADXL335 is a small, thin, low power, complete 3axis accelerometer with signal
conditioned voltage outputs. The product measures acceleration with a minimum full-scale
range of 3g. It can measure the static acceleration of gravity in tilt-sensing applications, as
well as dynamic acceleration resulting from motion, shock ,or vibration. The user selects the
bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the XOUT, YOUT,
and ZOUT pins.Bandwidths can be selected to suit the application, with arrange of 0.5Hz to
1600Hz for the X and Y axis, and arrange of 0.5Hz to 550Hz for the Z axis.
30
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Pin Descriptions
Theory of operation:
TheADXL335 is a complete 3axis acceleration measurement system. The
ADXL335 has a measurement range of 3g Minimum.
It contains a polysilicon surface micro machine sensor and signal conditioning
circuitry to implement open-loop acceleration measurement architecture. The output
signals are analog voltages that are proportional to acceleration. The accelerometer can
measure the static acceleration of gravity in tilt sensing applications as well as
dynamic acceleration resulting from motion, shock, orvibration.The sensor is a
polysilicon surface micro machined structure built onto polysilicon wafer. Polysilicon
springs suspend the structure over the surface of the wafer and provide a resistance
Dept. of ECE, B V C Engineering College, Odalarevu
31
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Performance:
Rather than using additional temperature compensation circuitry, innovative
design techniques ensure that high performance is built into the ADXL335.
3.7 EEPROM:
EEPROM (electrically erasable programmable read-only memory) is usermodifiable read-only memory (ROM) that can be erased and reprogrammed (written
to) repeatedly through the application of higher than normal electrical voltage.
Unlike EPROM chips, EEPROMs do not need to be removed from the computer to be
modified. However, an EEPROM chip has to be erased and reprogrammed in its
entirety, not selectively. It also has a limited life - that is, the number of times it can
be reprogrammed is limited to tens or hundreds of thousands of times. In an
EEPROM that is frequently reprogrammed while the computer is in use, the life of the
EEPROM can be an important design consideration.
32
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
A special form of EEPROM is flash memory, which uses normal PC voltages for
erasure and reprogramming
Other components:
3.8 MAX 232:
INTRODUCTION:
A standard serial interface for PC, RS232C, requires negative logic, i.e., logic
1 is -3V to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and
RxD pins of the microcontroller thus need a converter chip. A MAX232 chip has long
been using in many microcontrollers boards. It is a dual RS232 receiver / transmitter
that meets all RS232 specifications while using only +5V power supply. It has two
onboard charge pump voltage converters which generate +10V to -10V power
supplies from a single 5V supply. It has four level translators, two of which are
RS232 transmitters that convert TTL/CMOS input levels into +9V RS232 outputs.
The other two level translators are RS232 receivers that convert RS232 input to 5V.
Typical MAX232 circuit is shown below.
Features:
33
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Designed to be Interchangeable
TIA/EIA-232-F
Battery-Powered Systems
Circuit Connections:
A standard serial interfacing for PC, RS232C, requires negative logic, i.e.,
logic '1' is -3V to -12V and logic '0' is +3V to +12V. To convert TTL logic, say, TxD
and RxD pins of the uC chips thus need a converter chip. A MAX232 chip has long
been using in many uC
The MAX232 from maxim was the first IC which in one package contains the
necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage
levels to TTL logic. It became popular, because it just needs one voltage (+5V) and
generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally.
This greatly simplified the design of circuitry. Circuitry designers no longer need to
Dept. of ECE, B V C Engineering College, Odalarevu
34
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
design and build a power supply with three voltages (e.g. -12V, +5V, and +12V), but
could just provide one +5V power supply, e.g. with the help of a simple 78x05 voltage
converter.
The MAX232 has a successor, the MAX232A. The ICs are almost identical,
however, the MAX232A is much more often used (and easier to get) than the original
MAX232, and the MAX232A only needs external capacitors 1/10th the capacity of
what the original MAX232 needs.
It should be noted that the MAX232(A) is just a driver/receiver. It does not
generate the necessary RS-232 sequence of marks and spaces with the righttiming, it
does not decode the RS-232 signal, it does not provide a serial/parallel conversion. All
it does is to convert signal voltage levels. Generating serial data with the right timing
and decoding serial data has to be done by additional circuitry, e.g. by a 16550 UART
or one of these small micro controllers (e.g. Atmel AVR, Microchip PIC) getting more
and more popular.
The MAX232 and MAX232A were once rather expensive ICs, but today they
are cheap. It has also helped that many companies now produce clones (ie. Sipex).
These clones sometimes need different external circuitry, e.g. the capacities of the
external capacitors vary. It is recommended to check the data sheet of the particular
manufacturer of an IC instead of relying on Maxim's original data sheet.
The original manufacturer (and now some clone manufacturers, too) offers a
large series of similar ICs, with different numbers of receivers and drivers, voltages,
built-in or external capacitors, etc. E.g. The MAX232 and MAX232A need external
capacitors for the internal voltage pump, while the MAX233 has these capacitors
built-in. The MAX233 is also between three and ten times more expensive in
electronic shops than the MAX232A because of its internal capacitors. It is also more
difficult to get the MAX233 than the garden variety MAX232.
35
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Signal
RTS
CTS
CTS
RTS
TX
RX
TX
RX
GND
Signal
RTS
CTS
CTS
RTS
TX
RX
TX
RX
GND
Voltage
RS-232
RS-232
TTL
TTL
TTL
TTL
RS-232
RS-232
0
Voltage
RS-232
RS-232
TTL
TTL
TTL
TTL
RS-232
RS-232
0
DB9 Pin
8
7
n/a
n/a
n/a
n/a
3
2
5
DB9 Pin
8
7
n/a
n/a
n/a
n/a
3
2
5
In addition one can directly wire DTR (DB9 pin 4) to DSR (DB9 pin 6)
without going through any circuitry. This gives automatic (brain dead) DSR
Dept. of ECE, B V C Engineering College, Odalarevu
36
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
3.9 L293D:
Introduction:
H-what? An H-Bridge is nothing but an electronic circuit. Using such a circuit,
you can supply current in two directions. Thats it. The L293D is an H-Bridge with two
possible outputs. Meaning, you can connect two things to it and you can control the
direction of current flow in both. Lets say you have a DC motor, as in the diagram
below:
37
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
If you close both S1 and S2, youll short circuit the entire thing. Same goes
with S3 and S4. Such a condition, in technical terms, is called a shoot through. So we
wont consider shoot throughs.
Now, if you close switches S1 and S4, current flows through the motor from
left to right. If you close S3 and S2, current flows from right to left. In these two
conditions, the direction of rotation is different.
This is exactly whats needed in most robotics projects using differential drive
wheels. But having physical switches would be very inconvenient. Youd need more
motors to close and open switches. And to control those motors youd need even more
switches. Ah well. You probably get the point.
So what the researchers made was an electronically controlled switch: a
transistor. And people used those transistors and made circuits similar to the one
shown above. The only difference was that instead of physical switches, they had
electronic switches.
The Pin Configuration Of L293d:
How It Works?
Now that you know what each pin does, explaining how to make the chip
work will be easy. Lets say you put a logical 1 into INPUT1. Then the chip will
simply put Vs volts into OUTPUT1. Similarly, if you put a logical 0 into INPUT1, the
chip will ground OUTPUT1.Same thing with others. Putting a logical 1 into INPUTx
will put Vs volts in OUTPUTx. And putting a 0 grounds the corresponding pin. One
Dept. of ECE, B V C Engineering College, Odalarevu
38
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
word of caution though. You can use a maximum of 0.5A of current over each
OUTPUTx pin. Use a bit more and you risk fusing the chip.L293D gives you the
possibility to
Basic Implementation:
This is the most basic implementation of the chip.As you can see, a 5V
Voltage Regulator is between the battery and pins 1, 9, 16.Pin 8 gets power before the
VReg, if your motor needs for example 6V you should put 6V directly in this pin, all
the other pins should not get more than 5V.This is the correct Implementation (with
the capacitors), and note that pin 8 is feeded by unregulated voltage. This means that
if your motors need more than 5V, you should power this pin with that amount of
voltage, and the rest of the circuit with 5V.
Features Of L293D:
Featuring Unit rode L293 and L293D Products Now From Texas Instruments
Thermal Shutdown
39
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
High-Noise-Immunity Inputs
40
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
is needed to read the display. By using backlighting, reading is possible in the dark.
The LCDs have long life and a wide operating temperature range. Changing the
display size or the layout size is relatively simple which makes the LCDs more
customers friendly.
The LCDs used exclusively in watches, calculators and measuring instruments
are the simple seven-segment displays, having a limited amount of numeric data. The
recent advances in technology have resulted in better legibility, more information
displaying capability and a wider temperature range. These have resulted in the LCDs
being extensively used in telecommunications and entertainment electronics. The
LCDs have even started replacing the cathode ray tubes (CRTs) used for the display
of text and graphics, and also in small TV applications.
LCD operation
In recent years the LCD is finding widespread use replacing LEDs (seven-segment
LEDs or other multi segment LEDs).This is due to 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 few characters
3. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of
the task of refreshing the LCD. In the contrast, the LED must be refreshed by the
CPU to keep displaying the data.
4. Ease of programming for characters and graphics.
LCD pin description
The LCD discussed in this section has 14 pins. The function of each pin is given in
table 3.6
41
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Pin
Symbol
I/O
1
2
3
4
Vss
Vcc
VEE
RS
---I
R/W
6
7
8
9
10
11
12
13
14
E
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
Description
Ground
+5V power supply
Power supply to control contrast
RS=0 to select command register
RS=1 to select data register
R/W=0 for write
R/W=1 for read
Enable
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
The 8-bit data bus
Code (hex)
1
2
4
6
5
7
8
A
C
E
F
10
14
18
1C
80
C0
38
42
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Uses:
The LCDs used exclusively in watches, calculators and measuring instruments
are the simple seven-segment displays, having a limited amount of numeric data. The
recent advances in technology have resulted in better legibility, more information
displaying capability and a wider temperature range. These have resulted in the LCDs
being extensively used in telecommunications and entertainment electronics. The
LCDs have even started replacing the cathode ray tubes (CRTs) used for the display
of text and graphics, and also in small TV applications.
LCD Interfacing Block Diagram:
Hardware connections:
CONTROLER PINS
LCD PINS
(P1.0)
(P1.1)
(P1.2)
4
5
6
RS (Control Pin)
RW (Control pin )
EN (Control pin)
Port 0
7 to 14
Data Port
40
20
15 & 2
16 & 1
Vcc
Gnd
43
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
LCD Interfacing
Sending commands and data to LCDs with a time delay:
To send any command from table 2 to the LCD, make pin RS=0.
For data, make RS=1.Then sends a high to-low pulse to the E pin to enable the
internal latch of the LCD.
44
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
45
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Regulator Unit:
Regulator regulates the output voltage to be always constant. The output
voltage is maintained irrespective of the fluctuations in the input AC voltage. As and
then the AC voltage changes, the DC voltage also changes. Thus to avoid this
Regulators are used. Also when the internal resistance of the power supply is greater
than 30 ohms, the outputgets affected. Thus this can be successfully reduced here.
The regulators are mainly classified for low voltage and for high voltage. Further they
can also be classified as:
i) Positive regulator: 1---> input pin 2---> ground pin3---> output pin
It regulates the positive voltage.
ii) Negative regulator: 1---> ground pin2---> input pin3---> output pin
It regulates the negative voltage.
OUTPUT FILTER:
The Filter circuit is often fixed after the Regulator circuit. Capacitor is most
often used as filter. The principle of the capacitor is to charge and discharge. It
charges during the positive half cycle of the AC voltage and discharges during the
negative half cycle. So it allows only AC voltage and does not allow the DC voltage.
This filter is fixed after the Regulator circuit to filter any of the possibly found ripples
in the output received finally. Here we used 0.1F capacitor. The output at this stage
is 5V and is given to the Microcontroller.
46
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
3.12 APR9600:
APR9600 is a low-cost high performance sound record/replay IC
incorporating flash analogue storage technique. Recorded sound is retained even after
power supply is removed from the module. The replayed sound exhibits high quality
with a low noise level. Sampling rate for a 60 second recording period is 4.2 kHz that
gives a sound record/replay bandwidth of 20Hz to 2.1 kHz. However, by changing an
oscillation resistor, a sampling rate as high as 8.0 kHz can be achieved. This shortens
the total length of sound recording to 32 seconds. Total sound recording time can be
varied from 32
Seconds to 60 seconds by changing the value of a single resistor. The IC can
operate in one of two modes: serial mode and parallel mode. In serial access mode,
sound can be recorded in 256 sections. In parallel access mode, sound can be recorded
in 2, 4 or 8 sections. The IC can be controlled simply using push button keys. It is also
possible to control the IC using external digital circuitry such as micro-controllers and
computers.
The APR9600 has a 28 pin DIP package. Supply voltage is between 4.5V to
6.5V. DuringRecording and replaying, current consumption is 25mA. In idle
mode,the current drops to1 mA.
Pin-out of APR9600:
47
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
48
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
MODE
MSEL2
/M8_OPTION
Random Access
duration messages
fixed
Random Access
duration messages
fixed
Random
Access
2fixed
duration messages
Tape mode, Auto rewind
operation
Tape mode, Normal operation
trigger
49
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
APR9600 module:
The circuit diagram of the module is shown in Figure. The module consists of
an APR9600 chip, an electrets microphone, support components, a mode selection
switch (-RE, MSEL1, MSEL2 and M8) and 9 keys (-M1 to M8 and CE). The
oscillation resistor is chosen so that the total recording period is 60 seconds with a
sampling rate of 4.2 kHz. Users can change the value of the ROSC to obtain other
sampling frequencies. It should be noted that if the sampling rate is increased, the
length of recording time is decreased. Table 3 gives the details. An 8-16 Ohm speaker
is to be used with the module. Users can select different modes using the mode
selection switch. The module is measured 80mm55mm.
Connection points (0-8, C and B) can connect to other switches or external
digital circuits. In this cased, on-board keys M1 to M8 and CE are by-passed.
50
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Application tips
Use a good quality 8 Ohm speaker with a cavity such as speakers for computer
sound systems. Do not use a bare speaker which gives you degraded sound.
For better sound replay quality, speak with a distance to the on-board
microphone and speak clearly. Also keep the background noise as low as
possible.
For even better sound replay quality, use microphone input or Audio Line In
input. If Audio Line In is used, the amplitude of input signal should be < 100
mV p-p.
3.13 DC MOTOR:
A DC motor relies on the facts that like magnet poles repels and unlike
magnetic poles attract each other.
coil
of
wire
with
current
running
through
it
generates
an electromagnetic field aligned with the center of the coil. By switching the current
on or off in a coil its magnetic field can be switched on or off or by switching the
direction of the current in the coil the direction of the generated magnetic field can be
switched 180. A simple DC motor typically has a stationary set of magnets in
the stator and an armature with a series of two or more windings of wire wrapped in
insulated stack slots around iron pole pieces (called stack teeth) with the ends of the
wires terminating on a commutator. The armature includes the mounting bearings that
keep it in the center of the motor and the power shaft of the motor and the
commutator connections. The winding in the armature continues to loop all the way
Dept. of ECE, B V C Engineering College, Odalarevu
51
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
around the armature and uses either single or parallel conductors (wires), and can
circle several times around the stack teeth. 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.
The commutator allows each armature coil to be activated in turn. The current
in the coil is typically supplied via two brushes that make moving contact with the
commutator. Now, some brushless DC motors have electronics that switch the DC
current to each coil on and off and have no brushes to wear out or create sparks.
The technologies adopted in this project is
1. GSM
2. GPS
52
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
GSM supports voice calls and data transfer speeds of up to 9.6 kbit/s, together
with the transmission of SMS (Short Message Service).
GSM operates in the 900MHz and 1.8GHz bands in Europe and the 1.9GHz
and 850MHz bands in the US. The 850MHz band is also used for GSM and 3G in
Australia, Canada and many South American countries. By having harmonized
spectrum across most of the globe, GSMs international roaming capability allows
users to access the same services when travelling abroad as at home. This gives
consumers seamless and same number connectivity in more than 218 countries.
Terrestrial GSM networks now cover more than 80% of the worlds population. GSM
satellite roaming has also extended service access to areas where terrestrial coverage
is not available
Basics of Working And Specifications Of GSM:
The GSM architecture is nothing but a network of computers. The system has
to partition available frequency and assign only that part of the frequency spectrum to
any base transreceiver station and also has to reuse the scarce frequency as often as
possible.
53
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
GSM uses TDMA and FDMA together. Graphically this can be shown below
Some of the technical specifications of GSM are listed below
Multiple Access Method
Uplink frequencies (MHz)
Downlink frequencies (MHz)
Duplexing
Channel spacing, kHz
Modulation
Portable TX power, maximum / average (mW)
Power control, handset and BSS
Speech coding and rate (kbps)
Speech Channels per RF channel:
Channel rate (kbps)
Channel coding
Frame duration (ms)
TDMA / FDMA
933-960
(basic
GSM)
890-915
(basic
GSM)
FDD
200
GMSK
1000 / 125
Yes
RPE-LTP / 13
8
270.833
Rate
1/2
convolutional
4.615
GSM was originally defined for the 900 Mhz range but after some time even
the 1800 MHZ range was used for cellular technology. The 1800 MHz range has its
architecture and specifications almost same to that of the 900 Mhz GSM technology
but building the Mobile exchanges is easier and the high frequency Synergy effects
add to the advantages of the 1800 MHZ range.
Architecture And Building Blocks:
GSM is mainly built on 3 building blocks. (Ref Figure. 2)
GSM Radio Network This is concerned with the signaling of the system.
Hand-overs occur in the radio network. Each BTS is allocated a set of
frequency channels.
GSM Mobile switching Network This network is concerned with the storage
of data required for routing and service provision.
54
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Figure 3.26: Figure 3.26: The basic blocks of the whole GSM system
Land
Network(PLMN)
Mobile System (MS)
55
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
BaseStationController(BSC)
Transcoding Rate & Adaption Unit This is instrumental in compressing the Data
that is passed on to the network, is a part of
(TRAU)
the BSS.
Mobile Services Switching Center The BSC is connected to the MSC. The MSC
routes the incoming and outgoing calls and
(MSC)
Home
Visitor Location Register (VLR) This contains part of data so that the HLR is
not overloaded with inquiries. If a subscriber
moves out of VLR area the HLR requests
removal of data related to that user from the
VLR.
Equipment Identity Register (EIR) The IMEI no. is allocated by the manufacturer
and is stored on the network in the EIR. A
stolen phone can be made completely useless
by the network/s if the IMEI no is known.
56
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
The voice signal is sampled at 8000 bits/sec and is quantized to get a 13 bit
resolution corresponding to a bit rate of 104 Kbits/sec. This signal is given to a speech
coder (codec) that compresses this speech into a source-coded speech signal of 260 bit
blocks at a bit rate of 13 Kbit/sec. The codec achieves a compression ratio of 1:8. The
coder also has a Voice activity detector (VAD) and comfort noise synthesizer. The
VAD decides whether the current speech frame contains speech or pause, this is turn
is used to decide whether to turn on or off the transmitter under the control of the
Discontinuous Transmission (DTX). This transmission takes advantage of the fact
that during a phone conversation both the parties rarely speak at the same time. Thus
Dept. of ECE, B V C Engineering College, Odalarevu
57
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
the DTX helps in reducing the power consumption and prolonging battery life. The
missing speech frames are replaced by synthetic background noise generated by the
comfort noise synthesize in a Silence Descriptor (SID) frame. Suppose a loss off
speech frame occurs due to noisy transmission and it cannot be corrected by the
channel coding protection mechanism then the decoder flags such frames with a bad
frame indicator (BFI) In such a case the speech frame is discarded and using a
technique called error concealment which calculates the next frame based on the
previous frame.
TWO MAIN INTERFACES
The two main interfaces are the AIR and the ABIS interface. The Figureure
shows the signaling between them.
AIR INTERFACE signaling between MS and BTS
ABIS INTERFACE signaling between BTS and BSC
58
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Commands always start with AT (which means ATtention) and finish with a <CR>
character.
Information responses and result codes
Responses start and end with <CR><LF>, except for the ATV0 DCE response
format) and the ATQ1 (result code suppression) commands.
If command syntax is incorrect, an ERROR string is returned.
If command syntax is correct but with some incorrect parameters, the +CME ERROR:
<Err> or +CMS ERROR: <SmsErr> strings are returned with different error codes.
If the command line has been performed successfully, an OK string is returned.
In some cases, such as AT+CPIN? or (unsolicited) incoming events, the product
does not
Return the OK string as a response.
Read message +CMGR
Description:
This command allows the application to read stored messages. The messages are read
from the
Memory selected by +CPMS command.
Command syntax: AT+CMGR=<index>
List message +CMGL
Description:
This command allows the application to read stored messages, by indicating the type
of the Message to read. The messages are read from the memory selected by the
+CPMS command.
Syntax: Command syntax: AT+CMGL=<stat>
Send message +CMGS
Description:
The <address> field is the address of the terminal to which the message is sent. To
send the
Message, simply type, <ctrl-Z> character (ASCII 26). The text can contain all
existing
Characters except <ctrl-Z> and <ESC> (ASCII 27). This command can be aborted
using the
<ESC> character when entering text. In PDU mode, only hexadecimal characters are
used
Dept. of ECE, B V C Engineering College, Odalarevu
59
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
(09,AF).
Syntax:
Command syntax in text mode:
AT+CMGS= <da>[ ,<toda> ] <CR>
text is entered <ctrl-Z / ESC >
The message reference, <mr>, which is returned to the application, is allocated by the
product.
This number begins with 0 and is incremented by one for each outgoing message
(successful
and failure cases); it is cyclic on one byte (0 follows 255).
Note: This number is not a storage number. Outgoing messages are not stored.
GPS satellites broadcast signals from space that are picked up and identified by GPS
receivers. Each GPS receiver then provides three-dimensional location (latitude,
longitude, and altitude) plus the time.
SPACE SEGMENT
24+ satellites
20,200 km altitude
55 degrees inclination
60
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
61
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
62
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
A GPS receiver's job is to locate four or more of these satellites, Figureure out
the distance to each, and use this information to deduce its own location. This
operation is based on a simple mathematical principle called trilateration. Trilateration
in three-dimensional space can be a little tricky, so start with an explanation of simple
two-dimensional trilateration.
Commands in GPS:
NMEA record
Description
GGA
GLL
GSA
GSV
RMC
VTG
63
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Example:
$GPGGA,053740.000,2503.6319,N,12136.0099,E,1,
08,1.1,63.8, M,15.2,M,,0000*64
Name
Example
Message ID
$GPGGA
UTC Time
053740.00
hhmmss.sss
Latitude
0
2503.6319
ddmm.mmmm
N/S indicator
N=north or S=south
Longitude
12136.009
dddmm.mmmm
E/W Indicator
9
E
E=east or W=west
Position
Units
Description
Fix 1
Indicator Used
Satellites
08
Range 0 to 12
HDOP
1.1
MSL Altitude
63.8
mters
Units
mters
Geoid Separation
15.2
mters
Units
mters
second
*64
End of message termination
64
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 4
SOFTWARE ARCHITECTURE
4.1 KEIL Compiler:
Keil compiler is software used where the machine language code is written
and compiled. After compilation, the machine source code is converted into hex code
which is to be dumped into the microcontroller for further processing. Keil compiler
also supports C language code.
4.2 Proload:
Proload is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and
this is done by the Proload. Proload is a programmer which itself contains a
microcontroller in it other than the one which is to be programmed. This
microcontroller has a program in it written in such a way that it accepts the hex file
from the keil compiler and dumps this hex file into the microcontroller which is to be
programmed. As the Proload programmer kit requires power supply to be operated,
this power supply is given from the power supply circuit designed above. It should be
noted that this programmer kit contains a power supply section in the board itself but
in order to switch on that power supply, a source is required. Thus this is
accomplished from the power supply board with an output of 12volts.
65
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
A project manager.
A make facility.
Tool conFigureuration.
Editor.
A powerful debugger.
To help you get started, several example programs (located in the \C51\Examples,
\C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided.
HELLO is a simple program that prints the string "Hello World" using the
Serial Interface.
TRAFFIC is a traffic light controller with the RTX Tiny operating system.
Additional example programs not listed here are provided for each device
architecture.
To create a new project in Vision2, you must:
Select Project - Select Device and select an 8051, 251, or C16x/ST10 device
from the Device Database.
Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and
add the source files to the project.
Select Project - Options and set the tool options. Note when you select the
target device from the Device Database all special options are set
automatically. You typically only need to conFigureure the memory map of
66
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
your target hardware. Default memory model settings are optimal for most
applications.
Use the Step toolbar buttons to single-step through your program. You may
enter G, main in the Output Window to execute to the main C function.
Open the Serial Window using the Serial #1 button on the toolbar. Debug
your program using standard options like Step, Go, Break, and so on.
Step 1: Give a double click on uvision 4 icon on the desk top ,it will generate a
window as shown below.
Step 2: To create new project go to project select new micro vision project .
67
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 3: select a drive where you would like to create your project.
Step 4: Create a new folder and name it with your project name.
Step 5: Open that project folder and give a name of your project executable file and
save it.
68
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 6: After saving it will show some window there you select your microcontroller
company i.e NXP from Phillips.
Step 8:After selecting chip click on OK then it will display some window asking to
add STARTUP file. Select YES .
69
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 9: A target is created and startup file is added to your project target and is shown
below.
Step 10: To write your project code select a new file from FILE menu bar.
Step 11: It will display some text editor , to save that file select SAVE option from
FILE menu bar.
70
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 12: By giving a file name with extension .C for c files and save it.
Step 13: Write the code of your project and save it.
Step 14: To add our c file to target give a right click on Source Group ,choose ADD
files to Group option.
71
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 15:It will display some window there select the file you have to add and click on
ADD option.
Step 16: The file will be added to our target and it shows in the project window.
Step 17: Now give a right click on target in the project window and select Options
for Target.
72
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 18: It will shoe some window ,in that go to output option and choose Create Hex
file option by selecting that box.
Step 19: In the same window go to Linker option and choose Use Memory Layout
from Target Dialog by selecting the box,and click OK.
Step 20: Now to Compile your project go to Project select Build Target option or
press F7.
73
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 21: In the build OUT PUT window you can see the errors and warnings if there
in your code. And here Your project Hex file will be created.
Step 1: Communications
Set COM Port :COM1
Baud Rate
Device
Interface
: 19200
: LPC2148
:None(ISP)
Oscillator Freq(MHz):12
74
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Step 2: Erase
Select the box Erase all Flash + Code Rd Prot
Step 3: Hex File
Click on browse to load the serial. hex file from the folder serial driver.
Step 4: Options
Select the box Verify after programming.
Power up the microcontroller board using USB/power cable, connect serial
cable between PC and microcontrollers UART0 db9 connector. To make the board
into programming mode. Hold down Boot switch (ISP) and Reset, then release Reset
first and finally Boot switch.
Step 5: Start
Click the Start button
4.5 Conclusion:
In The above study focused on the details of the softwares keilmicro vision
compiler and flash magic and Terminal in this project for developing the source code
and for virtual simulation.
75
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 5
5.1 Introduction:
Nowadays, as the reports of accidents are growing rapidly, the usage of sensor
technology in vehicles avoid road accidents, fire accidents from happening and also
provide an extra cover of safety to the people who are travelling. My project leads to
avoid such accidents and motivate the use of sensors in real life. This project helps in
eradication of accidents and may let the people reach their destination safely. This
project implement in embedded systems by using LPC2148 Processor, including with
GSM & GPS technology. The detection maintained by some sensors used in some
places, Prevention is controlled by adopting some devices.
76
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
GAS DETECTION
FIRE DETECTION
ALCOHOL DETECTION
MEMS DETECTION
IR DETECTION
77
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
CHAPTER 6
78
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
REFERENCES
[1]. S.P.
Bhumkar1,
V.V.
Deotare2,
R.V.Babar3
published
ACCIDENT
October 2012.
[5]
[6]
was
79
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
[7]
[8]
[9]
80
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
BIBLIOGRAPHY
Websites
1. http://www.wireless sensor networks.com
2. http://www.serialporttool.com
3. http://www.microcontroller.com
4. http://www.keil.com
5. http://www.quickembed.com
6. Text Book ARM System on-Chip Architecture by Steve Furber Pearson
second Edition.
7. http://www.wikipedia.com
8. http://www.pearson.co.in
9. http://www.scribd.com
81
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
APPENDIX-A
GLOSSARY
LPC 2148
The LPC2141/42/44/46/48 microcontrollers are based on a 16-bit/32-bit
ARM7TDMI-SCPU with real-time emulation and embedded trace support, that
combine microcontroller with embedded high speed flash memory ranging from 32
kB to 512 kB. A 128-bit wide memory interface and unique accelerator architecture
enable 32-bit code execution atthe maximum clock rate. For critical code size
applications, the alternative 16-bit Thumb mode reduces code by more than 30 %
with minimal performance penalty. Due to their tiny size and low power
consumption, LPC2141/42/44/46/48 are ideal for applications where miniaturization
is a key requirement, such as access control and point-of-sale. Serial communications
interfaces ranging from a USB 2.0 Full-speed device ,multiple UARTs, SPI, SSP to
I2C-bus and on-chip SRAM of 8 kB up to 40 kB, make these devices very well
suited for communication gateways and protocol converters, soft modems, voice
recognition and low end imaging, providing both large buffer size and high
processing power. Various 32-bit timers, single or dual 10-bit ADC(s), 10-bit DAC,
PWM channels and 45 fast GPIO lines with up to nine edge or level sensitive
external interrupt pins make these microcontrollers suitable for industrial control and
medical systems.
Ordering information
82
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Pin Description
83
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
84
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Static Characteristics
85
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
Dynamic Characteristics
Timing
86
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
ST232
PIN CONFIGUREURATION
PIN DESCRIPTION
PlN N
SYMBOL
1
2
C1 +
V+
C1-
C2 +
5
6
C2V-
T2
R2IN
R2
OUT
10
11
T2
IN
12
R1
13
R1IN
14
15
T1
16
OUT
T1IN
OUT
OUT
GND
CC
87
ARM Based Road And Fire Accidents Detection And Prevention System In Vehicles With GPS
APPENDIX-B
PUBLICATION
Miss. N.Venkata Posi Lakshmi, Prof. T.V.Janardhana Rao, Mr. V.Anuragh,
entitled Arm Based Road and Fire Accidents Detection and Prevention System In
Vehicles with GPS published in International Journal Of Informative & Futuristic
Research(IJIFR) ISSN (Online): 2347-1697 Volume 2, Issue 3, November 2014 , 15th
Edition, Page No: 732-738
88