CHAPTER 1 · Technology consists of ARM 7 (LPC2148), Finger vein scanner, RS232, power supply, GSM...
Transcript of CHAPTER 1 · Technology consists of ARM 7 (LPC2148), Finger vein scanner, RS232, power supply, GSM...
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW OF THE PROJECT
In this project, we propose a real-time embedded finger-vein
recognition system for authentication of Vehicle. The system is implemented
on embedded platform and equipped with novel finger-vein recognition
algorithm. Here using finger vein scanner is captured the vein images (mat lab
program)In the PC section we have database were the authentication the
matching is done. In the receiver section the ARM 7 (LPC2148) is used as the
1
control unit which contains the authorized images. RS232 will transmit the
scanned image to the ARM processor in which the images are compared. If the
image is matched with the authorized images in the ARM processor then an
OTP is received at the given mobile number. By using the OTP in the keypad
we can have the access to the vehicle. If the image is not matched then the
buzzer beeps and a message will be received that an unauthorized person is
trying to access your vehicle.
1.2 BLOCK DIAGRAM
2
FIGURE 1.1 BLOCK DIAGRAM OF THE PROPOSED METHOD
1.2 DESCRIPTION
Embedded Automative Engine Locking System Using GSM
Technology consists of ARM 7 (LPC2148), Finger vein scanner, RS232,
power supply, GSM module, buzzer, keypad, 2x16 LCD display, motor (or)
vehicle. Finger vein recognition is done by using the finger vein scanner and
it is scanned with the images stored in the ARM controller. GSM module is
used to send messages to the user. Keypad is used to type the OTP that is
received to the user. Buzzer is used to alert if an unrecognized user uses the
vehicle. Here motor is used to monitor the response.
3
CHAPTER 2
PROPOSED METHODOLOGY
2.1 FLOW CHART
4
FIGURE 2.1 FLOW CHART
5
CHAPTER 3
HARDWARE AND SOFTWARE DESCRIPTION
The proposed system requires the following components,
3.1 HARDWARE DESCRIPTION
1. ARM 7 (LPC2148) PROCESSOR
2. BUZZER
3. DC MOTOR
4. POWER SUPPLY UNIT
6
5. LCD DISPLAY (2*16 DISPLAY)
6. KEYPAD (3*1 KEYPAD)
7. RELAY
8. GSM MODULE
9. RS 232 CABLE
10. MAX232 IC
3.2 SOFTWARE DESCRIPTON
KEIL COMPILER
3.1.1 ARM 7 (LPC2148) PROCESSOR
7
FIGURE 3.1 LPC 2148 BOARD
Features
16/32-bit ARM7TDMI-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 1 ms.
Embedded ICE RT and Embedded Trace interfaces offer
real-time debugging with the on-chip RealMonitor software and
high speed tracing of instruction execution.
8
One or two (LPC2141/2 vs. LPC2144/6/8) 10-bit A/D
converters provide a total of 6/14 analog inputs, with conversion
times as low as 2.44 μs per channel.
Single 10-bit D/A converter provides variable analog
output.
Two 32-bit timers/external event counters (with four capture
and four compare channels each), PWM unit (six outputs) and
watchdog.
Low power real-time clock with independent power and
dedicated 32 kHz clock input.
Multiple serial interfaces including two UARTs (16C550),
two Fast I2C-bus (400 kbit/s), SPI and SSP with buffering and
variable data length capabilities.
Vectored interrupt controller with configurable priorities and
vector addresses.
Up to 45 of 5 V tolerant fast general purpose I/O pins in a
tiny LQFP64 package.
Up to nine edge or level sensitive external interrupt pins
available.
60 MHz maximum CPU clock available from
programmable on-chip PLL with settling time of 100 μs.
The ARM7TDMI-S is a general function purpose 32-bit data register
processor, which provides great efficiency and very small voltage consumption.
The ARM design is based on Reduced Instruction Set Computer (RISC)
method, and the opcode set and relevant decode procedure are much easier than
those of micro code Complex Instruction Set systems. This simplicity results
yielded in a big instruction throughput and impressive real-time interrupt reply
9
from a low and economical processor core. Pipeline enhanced methods are
deployed so that all parts of the carry out and storage systems can function
recursively. Typically, while single instruction is being executed, their follower
is being decoded, and a third instruction is being given to memory. The
ARM7TDMI-S processor also employs a specific architectural plan known as
THUMB, which makes it specifically suited to high-bulk applications with
memory limitations, or applications where software density is a problem. The
key theme behind THUMB is that of a great super-reduced assembly code set.
Essentially, the ARM7TDMI-S supports two instruction sets: The ARM7TDMI-
S processor also employs a specific architectural plan known as THUMB,
which makes it specifically suited to high-bulk applications with memory
limitations, or applications where software density is an problem. The key
theme behind THUMB is that of a great super-reduced assembly code set.
Essentially, the ARM7TDMI-S supports two instruction sets:
The standard 32-bit ARM instruction set.
A 16-bit THUMB instruction set.
The THUMB set’s 16-bit instruction length allows it to towards twice the
density of defined ARM program while regaining most of the controller
performance advantage over a common 16-bit processor using 16-bit function
registers. This is feasible because THUMB program executes on the similar 32-
bit register set as ARM program. THUMB program is able to give up to 65% of
the software size of pre-processor, and 160% of the performance of an
equivalent ARM processor related to a 16-bit storage system. The ARM7TDMI-
S controller is described in brief in the ARM7TDMI-S Datasheet that can be
found on official ARM website. This is feasible because THUMB program
executes on the similar 32-bit register set as ARM program. THUMB program
is able to give up to 65% of the software size of preprocessor, and 160% of the
10
performance of an equivalent ARM processor related to a 16-bit storage system.
The THUMB set’s 16-bit instruction length allows it to towards twice the
density of defined ARM program while regaining most of the controller
performance advantage over a common 16-bit processor using 16-bit function
registers. This is feasible because THUMB program executes on the similar 32-
bit register set as ARM program.
3.1.1 PIN DIAGRAM
FIGURE 3.2 PIN DIAGRAM OF ARM PROCESSOR
The pin configuration block allows particular pins of the microcontroller
to have more than one purpose. Control registers navigates the multiplexers to
allow joining between the pin and the on chip accessories. Peripherals should be
11
connected to the specific designated pins before to being powered up, and prior
to any related interrupt(s) being enabled. Selection of a specific function on a
port I/O completely excludes all other true purpose else present on the same I/O.
The only partial exception from the above protocol of exclusion is the case of
inputs to the A/D module. Regardless of the purpose that is selected for the port
I/O that also hosts the A/D I/P, this A/D input can be noted at any time and
difference of the potential values on this pin will be recollected in the A/D
monitoring registers. The only partial exception from the above protocol of
exclusion is the case of inputs to the A/D module. Regardless of the purpose
that is selected for the port I/O that also hosts the A/D I/P, this A/D input can be
noted at any time and difference of the potential values on this pin will be
recollected in the A/D monitoring registers.
Peripherals should be connected to the specific designated pins before to being
powered up, and prior to any related interrupt(s) being enabled. Selection of a
specific function on a port I/O completely excludes all other true purpose else
present on the same I/O. The only partial exception from the above protocol of
exclusion is the case of inputs to the A/D module. Not concern of the purpose
that is specific for the port I/O that also hosts the A/D I/P, this A/D input can be
noted at any time and difference of the potential values on this pin will be
recollected in the A/D modules.
However, true analog values (s) can be gathered if and only if the function of an
analog input is selected. Only in this situation proper interface circuit is in
powered state in between the physical pin and the A/D module
3.1.2 BUZZER
12
A buzzer or beeper is an audio alerting signalling device, which may
be mechanical, electromechanical, or piezoelectric.
FIGURE 3.3 BUZZER
The most fashioned uses of buzzers and beepers include alarm devices,
timers and confirmation of user input such as a mouse click or keystroke. Alarm
unit is an operation and maintenance (O&M) monitoring system informs the
bad working state of (a particular part of) the product under monitoring.
3.1.3 DC MOTOR
A DC Motor is made by attaching a gear assembly to an ordinary DC motor.
This will increase the torque by decreasing the speed of motor. The speed of
motor is counted in terms of RPM, rotations of shaft per minute. The speed can
be reduced to any desired RPM by using correct combination of gears. This
motor is geared down to 100RPM and will provide torque about 1.2kgcm.
13
FIG 3.4 DC MOTOR
Specifications:
Supply Voltage : 12V
Speed : 100RPM
Torque : 1.2kgcm
Max. No Load Current : 60mA
Max. Load Current : 250mA
Shaft Diameter : 6mm:
3.1.4 POWER SUPPLY UNIT
14
CIRCUIT DIAGRAM
FIGURE 3.5 POWER SUPPLY
WORKING PRINCIPLE
The AC voltage, typically 220V rms, is connected to a transformer, which
steps that ac voltage down to the level of the desired DC output. A diode
rectifier then provides a full-wave rectified voltage that is initially filtered by a
simple capacitor filter to produce a dc voltage. This resulting dc voltage usually
has some ripple or ac voltage variation.
A regulator circuit removes the ripples and also remains the same dc value even
if the input dc voltage varies, or the load connected to the output dc voltage
changes.
BLOCK DIAGRAM
FIGURE 3.6 BLOCK DIAGRAM OF POWER SUPPLY
TRANSFORMER
The potential transformer will step down the power supply voltage (0-230V)
to (0-6V) level. Then the secondary of the potential transformer will be
connected to the precision rectifier, which is constructed with the help of op–
amp. The advantages of using precision rectifier are it will give peak voltage
output as DC; rest of the circuits will give only RMS output.
BRIDGE RECTIFIER
15
When four diodes are connected as shown in figure, the circuit is called as
bridge rectifier. The input to the circuit is applied to the diagonally opposite
corners of the network, and the output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive
potential, at point A and a negative potential at point B. the positive potential at
point A will forward bias D3 and reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At
this time D3 and D1 are forward biased and will allow current flow to pass
through them; D4 and D2 are reverse biased and will block current flow.
The path for current flow is from point B through D1, up through RL,
through D3, through the secondary of the transformer back to point B. this path
is indicated by the solid arrows. Waveforms (1) and (2) can be observed across
D1 and D3.
One-half cycle later the polarity across the secondary of the transformer
reverse, forward biasing 2 and D4 and reverse biasing D1 and D3. Current flow
will now be from point A through D4, up through RL, through D2, through the
secondary of T1, and back to point A. This path is indicated by the broken
arrows. Waveforms (3) and (4) can be observed across D2 and D4. The current
flow through RL is always in the same direction. In flowing through RL this
current develops a voltage corresponding to that shown waveform (5). Since
current flows through the load (RL) during both half cycles of the applied
voltage, this bridge rectifier is a full-wave rectifier.
One advantage of a bridge rectifier over a conventional full-wave rectifier is
that with a given transformer the bridge rectifier produces a voltage output that
is nearly twice that of the conventional full-wave circuit.
This may be shown by assigning values to some of the components
shown in views A and B. Assume that the same transformer is used in both
16
circuits. The peak voltage developed between points X and y is 1000 volts in
both circuits. In the conventional full-wave circuit shown—in view A, the peak
voltage from the centre tap to either X or Y is 500 volts.
Since only one diode can conduct at any instant, the maximum voltage that
can be rectified at any instant is 500 volts.
The maximum voltage that appears across the load resistor is nearly-but
never exceeds-500 v0lts, as result of the small voltage drop across the diode. In
the bridge rectifier shown in view B, the maximum voltage that can be rectified
is the full secondary voltage, which is 1000 volts. Therefore, the peak output
voltage across the load resistor is nearly 1000 volts. With both circuits using the
same transformer, the bridge rectifier circuit produces a higher output voltage
than the conventional full-wave rectifier circuit.
IC VOLTAGE REGULATORS
Voltage regulators comprise a class of widely used ICs. Regulator IC units
contain the circuitry for reference source, comparator amplifier, control device,
and overload protection all in a single IC. IC units provide regulation of either a
fixed positive voltage, a fixed negative voltage, or an adjustably set voltage. The
regulators can be selected for operation with load currents from hundreds of
milli amperes to tens of amperes, corresponding to power ratings from milli
watts to tens of watts.
A fixed three-terminal voltage regulator has an unregulated dc input
voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo,
from a second terminal, with the third terminal connected to ground.
The series 78 regulators provide fixed positive regulated voltages from 5
to 24 volts. Similarly, the series 79 regulators provide fixed negative regulated
voltages from 5 to 24 volts.
17
3.1.5 LCD DISPLAY
FIGURE 3.7 LCD DISPLAY
A liquid crystal display (LCD) is an electro-optical amplitude modulator
known as a thin, flat display peripheral composed of any number of color or
monochrome pixels sequenced in front of a light source or reflector. It is mostly
18
used in battery-powered electronic devices because it uses very low amounts of
electric power.
Each dot of an LCD typically made of a layer of molecules structured
between transparent electrodes, and two polarizing filters, the axes of exchange
of which are (in many of the cases) perpendicular to one other. With no liquid
crystal between the polarizing filters, light passing through the first layer would
be prevented by the second (crossed) polarizer.
The outer layer of the electrodes that are in contact with the liquid crystal
material are treated so as to align the liquid crystal molecules in a particular
direction. This treatment typically consists of a thin polymer layer that is
unidirectional rubbed using, for example, a cloth. The direction of the liquid
crystal alignment is then defined by the direction of rubbing. Electrodes are
made of a transparent conductor called Indium Tin Oxide (ITO). Before
applying an electric field, the orientation of the liquid crystal molecules is
determined by the alignment at the surfaces. In a twisted nematic device, the
surface alignment directions at the two electrodes are perpendicular to each
other, and so the molecules arrange themselves in a helical structure, or twist.
Because the liquid crystal material is birefringent, light passing through one
polarizing filter is rotated by the liquid crystal helix as it passes through the
liquid crystal layer, allowing it to pass through the second polarized filter. Half
of the incident light is absorbed by the first polarizing filter, but otherwise the
entire assembly is reasonably transparent.
When a voltage is applied across the electrodes, a torque acts to align the
liquid crystal molecules parallel to the electric field, distorting the helical
structure (this is resisted by elastic forces since the molecules are constrained at
the surfaces). This reduces the rotation of the polarization of the incident light,
and the device appears grey. If the applied voltage is large enough, the liquid
crystal molecules in the center of the layer are almost completely untwisted and
the polarization of the incident light is not rotated as it passes through the liquid
19
crystal layer. This light will then be mainly polarized perpendicular to the
second filter, and thus be blocked and the pixel will appear black. By controlling
the voltage applied across the liquid crystal layer in each pixel, light can be
allowed to pass through in varying amounts thus constituting different levels of
gray.
The optical effect of a twisted nematic device in the voltage-on state is far less
dependent on variations in the device thickness than that in the voltage-off state.
Because of this, these devices are usually operated between crossed polarizers
such that they appear bright with no voltage (the eye is much more sensitive to
variations in the dark state than the bright state). These devices can also be
operated between parallel polarizers, in which case the bright and dark states are
reversed. The voltage-off dark state in this configuration appears blotchy,
however, because of small variations of thickness across the device.
LCD pin descriptions:
The LCD discussed in this section has 14 pins. The function of each pin is
given in the table below.
VCC, VSS, and VEE:
While VCC and VSS provide +5V and ground, respectively, VEE is used for
controlling LCD contrast.
RS, Register Select:
There are two very important registers inside the LCD. The RS pin is used
for their selection as follows. If RS=0, the instruction command code register is
selected, allowing the user to send a command such as clear display, cursor at
home, etc. If RS=1 the data register is selected, allowing the user to send data to
be displayed on the LCD.
R/W, Read/Write:
R/W input allows the user to write information to the LCD or read
information from it. R/W=1 when reading; R/W=0 when writing.
E, Enable:
20
The enable pin is used by the LCD to latch information presented to its
data pins. When data is supplied to data pins, a high-to-low pulse must be
applied to this pin in order for the LCD to latch in the data present at the data
pins. This pulse must be a minimum of 450ns wide.
D0-D7:
The 8-bit data pins, D0-D7, are used to send information to the LCD or
read the contents of the LCD’s internal registers.
To display letters and numbers, we send ASCII codes for the letters A-Z,
a-z, and numbers 0-9 to these pins while making RS=1.
There are also instruction command codes that can be sent to the LCD to
clear the display or force the cursor to the home position or blink the cursor.
Table lists the instruction command codes.
We also use RS=0 to check the busy flag bit to see if the LCD is ready to
receive information. The busy flag is D7 and can be read when R/W=1 and
RS=0, as follows: if R/W=1, RS=0. When D7=1 (busy flag=1), the LCD is busy
taking care of internal operations and will not accept any new information.
Note: It is recommended to check the busy flag before writing any data to the
LCD.
PIN DISCRIPTION :
Pin
No
Name Function USE
1 Vss Ground 2 Vdd +ve Supply 5v Volts Regulated DC3 Vee Contrast This is used to set the contrast14 RS Register Set Register select signal 0:Instruction
register (when writing) Busy flag &
address counter (When reading)
1:Data register (when writing &
reading)5 R/W Read / Write Read/write select signal “0” for
21
writing , “1” for reading6 E Enable Operation (data read/write) enable
signal7 D0 Data Bit 08 D1 Data Bit 19 D2 Data Bit 210 D3 Data Bit 311 D4 Data Bit 412 D5 Data Bit 513 D6 Data Bit 614 D7 Data Bit 715 A +4.2 for Back light Positive supply for back light if
available16
KPower supply Back
light ( 0V)
TABLE 3.1 LCD PIN DETAILS
In some LCD's you might not find the 15 and 16 pin so don’t worry.
Here is how you must wire them up.
3.1.6 RELAY
A relay is an electromagnetic switch Worked by a relatively
small electric current that can made on or off a much larger electric current. The
heart of a switch is an electromagnet (a coil of wire that becomes a
temporary magnet when electricity flows through it). You can think of a this
switch as a kind of electric lever: switch it on with a tiny current and it switches
on ("leverages") some other appliance using a much bigger current.
22
FIGURE 3.8 RELAY
WORKING
When power flows through the given circuit, it operates the
electromagnet (brown), generating a magnetic field (blue) that get move
towards a contact (red) and energizes the second part of circuit. When the power
is shut down to the switch, a spring pulls the contact back up to its original
position, switching the second circuit off again.
23
This is a for instance case of a "normally open" (NO) electromagnetic
relay: the pins in the second part of circuit are not given by default, and switch
on only when a current passes through the coil of magnet field. Other
electromagnetic switching relays are "normally closed" (NC; the pins are
connected so a current passes through them by default) and switch off only
when the coil of magnet field gets energized, pulling or pushing the leads apart.
Normally open relays are the most common.
Here's another animation providing how a magnetic relay relates two
circuits as one. It's basically the same thing drawn in a slightly another way. On
the left side, there's an input circuit voltage supplied by a relay switch or a
sensor of some kind. When this circuit is powered up, it provides current to an
electromagnet that makes a metal switch closed and activates the second, output
circuit (on the right side). The closely required small current in the input circuit
thus energizes the larger current in the output circuit:
1. The input circuit (black loop) is switched off and no current flows
through it until something (either a sensor or a switch closing) turns it on.
The output circuit (blue loop) is also switched off.
2. When a small current flows in the input circuit, it activates the
electromagnet (shown here as a red coil), which produces a magnetic
field all around it.
24
3. The energized electromagnet pulls the metal bar in the output circuit
toward it, closing the switch and allowing a much bigger current to flow
through the output circuit.
4. The output circuit operates a high-current appliance such as a lamp or an
electric motor.
3.1.7 GSM MODULE
FIGURE 3.9 GSM MODULE
25
A GSM modem is a specialized type of modem which accepts a SIM card, and
operates over a subscription to a mobile operator, just like a mobile phone.
From the mobile operator perspective, a GSM modem looks just like a mobile
phone.
When a GSM modem is connected to a computer, this allows the computer to
use the GSM modem to communicate over the mobile network. While these
GSM modems are most frequently used to provide mobile internet connectivity,
many of them can also be used for sending and receiving SMS and MMS
messages.
A GSM modem can be a dedicated modem device with a serial, USB or
Bluetooth connection, or it can be a mobile phone that provides GSM modem
capabilities.
For the purpose of this document, the term GSM modem is used as a generic
term to refer to any modem that supports one or more of the protocols in the
GSM evolutionary family, including the 2.5G technologies GPRS and EDGE,
as well as the 3G technologies WCDMA, UMTS, HSDPA and HSUPA.
A GSM modem exposes an interface that allows applications such as NowSMS
to send and receive messages over the modem interface. The mobile operator
charges for this message sending and receiving as if it was performed directly
on a mobile phone. To perform these tasks, a GSM modem must support an
“extended AT command set” for sending/receiving SMS messages, as defined in
the ETSI GSM 07.05 and and 3GPP TS 27.005 specifications.
GSM modems can be a quick and efficient way to get started with SMS,
because a special subscription to an SMS service provider is not required. In
most parts of the world, GSM modems are a cost effective solution for receiving
SMS messages, because the sender is paying for the message delivery.
A GSM modem can be a dedicated modem device with a serial, USB or
Bluetooth connection, such as the Falcom Samba 75. (Other manufacturers of
dedicated GSM modem devices include Wavecom, Multitech and iTegno.
26
We’ve also reviewed a number of modems on our technical support blog.) To
begin, insert a GSM SIM card into the modem and connect it to an available
USB port on your computer.
A GSM modem could also be a standard GSM mobile phone with the
appropriate cable and software driver to connect to a serial port or USB port on
your computer. Any phone that supports the “extended AT command set” for
sending/receiving SMS messages, as defined in ETSI GSM 07.05 and/or 3GPP
TS 27.005, can be supported by the Now SMS & MMS Gateway. Note that not
all mobile phones support this modem interface.
Due to some compatibility issues that can exist with mobile phones, using a
dedicated GSM modem is usually preferable to a GSM mobile phone. This is
more of an issue with MMS messaging, where if you wish to be able to receive
inbound MMS messages with the gateway, the modem interface on most GSM
phones will only allow you to send MMS messages. This is because the mobile
phone automatically processes received MMS message notifications without
forwarding them via the modem interface.
It should also be noted that not all phones support the modem interface for
sending and receiving SMS messages. In particular, most smart phones,
including Blackberries, iPhone, and Windows Mobile devices, do not support
this GSM modem interface for sending and receiving SMS messages at all at
all. Additionally, Nokia phones that use the S60 (Series 60) interface, which is
Symbian based, only support sending SMS messages via the modem interface,
and do not support receiving SMS via the modem interface.
3.1.8 RS 232 CABLE
RS-232 is a standard communication protocol for linking computer and its
peripheral devices to allow serial data exchange. In simple terms RS232 defines
the voltage for the path used for data exchange between the devices. It specifies
common voltage and signal level, common pin wire configuration and
27
minimum, amount of control signals. As mentioned above this standard was
designed with specification for electromechanically teletypewriter and modem
system and did not define elements such as character encoding, framing of
characters, error detection protocols etc that are essential features when data
transfer takes place between a computer and a printer. Without which it could
not be adopted to transfer data between a computer and a printer. To overcome
this problem a single integrated circuit called as UART known as universal
asynchronous receiver/transmitter is used in conjunction with RS232.
FIGURE 3.10 RS 232
RS232 logic and voltage levels
Data circuits Control circuits Voltage
0 (space) Asserted +3 to +15 V
1 (mark) Disserted -15 to -3 V
This is how the entire arrangement works.
28
It is clear from this figure that UART, line drivers and RS232 are three separate
parts in the system each having its own characteristic features. UART and line
drivers are the parts in RS232 to enhance quality of system during serial data
exchange.
A standard definition was given by EIA to define RS232 as “an interface
between Data terminal equipment and Data communication equipment”. A
typical RS232 system is shown below. DTE-A DTE stands for data terminal
equipment is an end instrument that convert user information into signals or
reconverts the receive signal. It is a functional unit of station that serves as data
source or data sink and provides for communication control function according
to the link protocol. A male connector is used in DTE and has pin out
configuration.
3.1.9 MAX232 IC
The MAX232 is an IC, first developed in 1987 by Maxim Integrated
Products, that transforms signals from an RS-232 serial port to signals related
for use in TTL compatible digital logic circuits. The MAX232 is a dual
driver/receiver and typically converts the RX, TX, CTS and RTS signals.
The drivers gives RS-232 voltage level outputs (approx. ± 7.5 V) from a single
+ 5 V supply via on-chip charge pumps and external capacitors. This makes it
important for implementing RS-232 in devices that otherwise do not need any
supply outside the 0 V to + 5 V range, as voltage supply design does not need to
be made more complicated just for driving the RS-232 in this case.
The receivers lowers RS-232 inputs (which may be as high as ± 25 V), to
standard 5 V TTL levels. These receivers have a typical threshold of 1.8V, and a
typical hysteresis of 0.5 V.
It is support full to understand what occurs to the voltage levels. When a
MAX232 IC gets a TTL level to convert, it changes TTL logic 0 to between
+3.3 and +15.5 V, and changes TTL logic 1 to between -3.3 to -15.5 V, and vice
29
versa for converting from RS232 to TTL. This can be confusing when you
realize that the RS232 bit transmission voltages at a certain logic state are
opposite from the RS232 control line supply at the same logic state. To clarify
the matter, see the table below. For more information, see RS-232 voltage
levels.
RS232 line type and logic level RS232
voltage
TTL voltage to/from
MAX232
Data transmission (Rx/Tx) logic 0 +3 V to
+15 V
0 V
Data transmission (Rx/Tx) logic 1 -3 V to
-15 V
5 V
Control signals (RTS/CTS/DTR/DSR)
logic 0
-3 V to
-15 V
5 V
Control signals (RTS/CTS/DTR/DSR)
logic 1
+3 V to
+15 V
0 V
Max232 is needed while interface GPS, GSM, WIFI, EMIC, RFID and many
more for logic operation conversion purpose.
30
3.2 SOFTWARE DESCRIPTION
3.2.1 KEIL COMPILER
Keil Software publishes one of the most complete development tool suites for
8051 software, which is used throughout industry. For development of C code,
their Developer's Kit product includes their C51 compiler, as well as an
integrated 8051 simulator for debugging. A demonstration version of this
product is available on their website, but it includes several limitations
The C programming language was designed for computers, though, and
not embedded systems. It does not support direct access to registers, nor does it
allow for the reading and setting of single bits, two very important requirements
for 8051 software. In addition, most software developers are accustomed to
writing programs that will by executed by an operating system, which provides
system calls the program may use to access the hardware. However, much code
for the 8051 is written for direct use on the processor, without an operating
system. To support this, the Keil compiler has added several extensions to the C
language to replace what might have normally been implemented in a system
call, such as the connecting of interrupt handlers.
The purpose of this manual is to further explain the limitations of the Keil
compiler, the modifications it has made to the C language, and how to account
for these in developing software for the 8051 microcontroller.
31
CHAPTER 4
PROGRAMS
4.1 PROGRAMS LOADED IN ARM PROCESSOR
4.1.1 CONTROLLER PROGRAM
#include <LPC214X.H>
#include <stdio.h>
#include <string.h>
#include "UART_ARM.H"
32
#include "ADC_ARM.H"
#include "Utility.h"
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define BUZZ 6
#define VIB1 13
#define VIB2 15
#define SW1 16
#define SW2 17
#define SW3 18
#define RELAY1 28
#define RELAY2 29
#define RELAY3 30
#define NUL 0
unsigned char check_op=0,FLAG = TRUE,
ASCII_TEMP1[5],ASCII_TEMP2[5],ASCII_TEMP3[5],ASCII_TEMP4[5],y[6
0],SEND = 0,mis_match = 0,
33
unsigned long ADC_VAL0,
ADC_VAL1,
ADC_VAL2,
ADC_VAL3,
ADC_VAL4;
//-----------------------------------//
//***********Fn Declaration *********//
//-----------------------------------//
void GPIO_INIT(void);
void UART_INIT(void);
void delay(unsigned int);
void DelayMs(unsigned int n);
//-----------------------//
//*****GPIO INIT Fn *****//
//-----------------------//
void GPIO_INIT(void)
{
IODIR1 |= (0xF << RELAY1);
}
//-----------------------//
//*****UART INIT Fn *****//
//-----------------------//
void UART_INIT(void)
34
{
UART0_INIT (9600);
//Initialize UART0 to 9600 Baud Rate @ 30MHz
UART1_INIT (9600);
//Initialize UART0 to 38400 Baud Rate @ 30MHz
//UART0 Intrpt Intialization
UART1_INTRPT();
U1IER = 1;
}
//-----------------------------//
//***********Delay Fn *********//
//-----------------------------//
void DELAY_MS(unsigned int n)
{
int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<0x100;j++)
{;}
}
}
//----------------------------------
// Delay Routine
//----------------------------------
void delay(unsigned int n)
{
35
int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<0x2700;j++)
{;}
}
}
void DelayMs(unsigned int n)
{
int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<0x100;j++)
{;}
}
}
void lcd_initialize(void);
void lcd_cmd(unsigned char);
void lcd_data(unsigned char);
const unsigned char cmd[4] = {0x38,0x0c,0x06,0x01}; //lcd commands
unsigned char T[10];
void lcd_initialize(void)
{
int i;
for(i=0;i<4;i++)
{
36
IOCLR0 = 0x00FF0000;
lcd_cmd(cmd[i]);
delay(3);
}
}
void lcd_cmd(unsigned char data)
{
IOCLR0 = 0x00FF0000;
IOSET0 = data << 16;
IOCLR1 |= 0x100000; //RS
IOCLR1 |= 0x200000; //RW
IOSET1 |= 0x400000; //EN
delay(3);
IOCLR1 |= 0x400000; //EN
}
void lcd_data(unsigned char data)
{
IOCLR0 = 0x00FF0000;
IOSET0 = data << 16;
IOSET1 |= 0x100000; //RS
IOCLR1 |= 0x200000; //RW
IOSET1 |= 0x400000; //EN
delay(3);
IOCLR1 |= 0x400000; //EN
}
37
void printLCD (unsigned char *p, unsigned char pos)
{
unsigned int n;
lcd_cmd (pos);
n=0;
while (*(p+n) != '\0')
{
lcd_data (*(p+n));
n++;
}
}
//--------------------------//
//***********Fn Main********//
//--------------------------//
int main (void)
{
PINSEL0 = 0;
PINSEL1 = 0;
PINSEL2 &= 0x0000000C;
VPBDIV = 0x02;
GPIO_INIT();
UART_INIT();
IODIR0 |= 0xff << 16;
IODIR1 |= 0xf << 20;
IODIR0 |= 1 << BUZZ;
38
IOCLR0 |= 1 << BUZZ;
IODIR1 &= ~(1 << SW1);
IODIR1 &= ~(1 << SW2);
IODIR1 &= ~(1 << SW3);
IOSET1 |= 1 << SW1;
IOSET1 |= 1 << SW2;
IOSET1 |= 1 << SW3;
IODIR0 |= 0 << VIB1;
IODIR0 |= 0 << VIB2;
lcd_initialize();
printLCD(" AUTOMOBILE ",0x80);
printLCD(" ENGINE LOCK ",0xC0);
delay(25); delay(25);
lcd_cmd(0x01);
memset(y,0,60);
while (1)
{
if(SEND == 1)
{
printLCD(" OTP SENDING... ",0x80);
delay(30);
UART0_PUTS("AT+CMGS=\"+919994562867\"\r"); //
9994562867 9994562867
delay(30);
UART0_PUTS(" YOUR OTP IS 123 ");
delay(30);
UART0_PUTC(0x1A);
delay(250);
39
printLCD(" OTP SENT... ",0x80);
delay(500); //delay(500);
SEND = 0;
printLCD(" OTP type ",0x80);
}
if(!(IOPIN1 & (1 << SW3)))
{
delay(500);
IOSET1 = 1 << RELAY1;
printLCD(" ",0x80);
printLCD(" PASS MATCH ",0x80);
while(!(IOPIN1 & (1 << SW3)));
}
if(!(IOPIN1 & (1 << SW2)))
{
delay(500);
printLCD(" TYPE AGAIN ",0x80);
while(!(IOPIN1 & (1 << SW2)));
}
if(mis_match == 1)
{
printLCD(" THEFT! THEFT! ",0x80);
IOSET0 = 1 << BUZZ;
printLCD(" MISS MATCH ",0x80);
delay(30);
UART0_PUTS("AT+CMGS=\"+919994562867\"\r"); //
9994562867 9994562867
40
delay(30);
UART0_PUTS(" THEFT ");
delay(30);
UART0_PUTC(0x1A);
delay(350);
mis_match = 0;
IOCLR0 = 1 << BUZZ;
}
}
}
void UART0_ISR (void)__irq
{
char Msg;
if(((Msg = U0IIR) & 0x01) == 0) //Check
Flag Status of Recieve Interrupt
{
}
VICVectAddr = 6;
}
void UART1_ISR (void)__irq
{
char ch;
ch = U1RBR;
41
if (ch == 'A')
{
SEND= 1;
}
if (ch == 'B')
{
mis_match = 1;
}
VICVectAddr = 7;
}
4.1.2 FINGER VEIN RECOGNITION PROGRAM USING
MATLAB
clc;
close all;
clear all;
[file path] = uigetfile('*.*');
a5 = imread(file);
a = imresize(a5,[256 256]);
figure('Name','Input Image' );
imshow(a);
42
a1 = a(52:186,72:177);
[r c] = size(a1);
a2 = imresize(a1,1/4);
a2 = imresize(a2,[r c]);
figure('Name','Resize Image');
imshow(a2);
a3 = histeq(a2);
figure('Name','Histogram Equalization');
imshow(a3);
a4 = imresize(a3,[128 128]);
%%%%Wavelet decomposition
Ls = liftwave('db1','Int2Int');
[ll lh hl hh] = lwt2(double(a4),Ls); %%%%%Lifting wavelet decomposition
figure('Name','Lifting Wavelet Decomposition');
feature1 = mean(mean(ll));
a5 = im2bw(a4);
imshow(a5);
t = [];
for i = 1:30
k = num2str(i);
k1 = strcat(k,'.jpg');
a = imread(k1);
a = imresize(a,[256 256]);
43
a1 = a(52:186,72:177);
[r c] = size(a1);
a2 = imresize(a1,1/4);
a2 = imresize(a2,[r c]);
a3 = histeq(a2);
a4 = imresize(a3,[128 128]);
Ls = liftwave('db1','Int2Int');
[ll lh hl hh] =lwt2(double(a4),Ls);
feature2 = mean(mean(ll));
feature = feature1 - feature2;
t = [t feature];
end
[k123 ind] = min(t);
if t(1)==0
helpdlg('Authorised Person');
s = 'A';
s1=serial('COM1','BaudRate',9600);
fopen(s1);
fwrite(s1,s);
% fclose(s1);
44
fclose (instrfind);
delete(s1);
else
helpdlg('Un Authorised Person');
s = 'B';
s1=serial('COM1','BaudRate',9600);
fopen(s1);
fwrite(s1,s);
fclose(s1);
delete(s1);
end
disp(t);
45
CHAPTER 5
APPLICATIONS
Applications of the proposed model are as follows
Used in both cars and bikes
Used for the security of vehicles by using finger vein
recognition
46
CHAPTER 6
6.CONCLUSION
47
The method of design is unique and it has features like low cost, compact
and reliable theft control system for an automobile. It is a threat to
vehicle thieves and it cannot be accessed by an unknown person since it
is based on finger-vein recognition and GSM technology.
48
CHAPTER 7
7. REFERENCE
Karthikeyan.a “ Fingerprint Based Ignition System” Published in
Karthikeyan.a, Sowndharya.j /International Journal Of Computational
Engineering Research / ISSN: 2250–3005
Prashantkumar R.(2013) “Two Wheeler Vehicle Security System” Published
in International Journal of Engineering Sciences & Emerging Technologies,
Dec. 2013. ISSN: 2231 – 6604 Volume 6, Issue 3, pp: 324-334 ©IJESET
http://auto.howstuffworks.com/ignitionsystem.htm, “How Automobile
Ignition Systems Work “
http://www.biometricinfo.org/fingerprintrecognition.htm,“Biometrics
Information Resource”
http://www.crimtrac.gov.au/fingerprintanalysis.htm, “Fingerprint Analysis –
The Basics”
49
50