Fingur+gsm Based Locker System
Fingur+gsm Based Locker System
Fingur+gsm Based Locker System
INTRODUCTION
INTRODUCTION OF PROJECT:
User home security is the prime concern for every user as it provides
opportunities for them to work freely without worrying about the home security
This project provides security system for the user house . For this it take help of
GSM Technology, each use will have a unique ID code for his door, which he will
needs to show while opening the door the security system will generate a unique
encrypted code for user access and will SMS it to user with the help of GSM module
attached, use will need to enter this code in order to open the door, otherwise the
door will be locked and the access s denied by the system.
Block Diagram
POWER
SUPPLY
LCD DISPLAY
KEYPAD
RS-232
FINGUR
PRINT
MODEM
MICRO
CONTROLLE
R
MOTOR
DRIVER
DOOR
MOTOR
RS-232
GSM
MODULE
GSM
NETWORK
USER
CELLPHO
NE
Description:
Mobile Phone
In this project we have used one cell phones for user on which he will receive a SMS with
unique password.he cell phone will use GSM Network for communication
Microcontroller
This is the most important segment of the project, i.e. the microcontroller 8051 The controller is
responsible for detection and polling of the peripherals status. It is responsible for making. It is
responsible for prioritizing all the devices attached to it. We have used the PHILLIPS 89V51
microcontroller. The a low-power, high-performance CMOS 4-bit microcontroller with 8K bytes
of in-system programmable Flash memory. It has got 32 I/O lines, Watchdog timer, two data
pointers, two 16-bit timer/counters, six-vector two-level interrupt architecture, a full duplex
serial port, on-chip oscillator, and a clock circuitry.
GSM Modem
GSM module is used to establish communication between a computer and aGSM-GPRS system.
Global System for Mobile communication (GSM) is an architecture used for mobile
communication in most of the countries. Global Packet Radio Service (GPRS) is an extension of
GSM that enables higher data transmission rate. GSM module consists of a GSM modem
assembled together with power supply circuit and communication interfaces (like RS-232, USB,
etc) for computer. The MODEM is the soul of such modules.
LCD
We have used 16*2 LCD in order to display the user information.
Door Motor and:
We have used a DC motor for door i
low-power processing on a watts per MIP basis. Finally, to assist the developer, the
ARM core has a built-in JTAG debug port and on-chip embedded ICE that allows
programs to be downloaded and fully debugged in-system.
In order to keep the ARM 7 both simple and cost-effective, the code and data
regions are accessed via a single data bus. Thus while the ARM 7 is capable of
single-cycle execution of all data processing instructions, data transfer instructions
may take several cycles since they will require at least two accesses onto the bus
(one for the instruction one for the data). In order to improve performance, a three
stage pipeline is used that allows multiple instructions to be processed
simultaneously.
The pipeline has three stages; FETCH, DECODE and EXECUTE. The hardware of each
stage is designed to be independent so up to three instructions can be processed
simultaneously. The pipeline is most effective in speeding up sequential code.
However a branch instruction will cause the pipeline to be flushed marring its
performance. As we shall see later the ARM 7 designers had some clever ideas to
solve this problem.
ARM-3-StagePipeline
.
Fig 3 User Mode Register Model
The ARM 7 architecture has a total of six different operating modes, as shown
below. These modes are protected or exception modes which have associated
interrupt sources and their own register sets.
User: This mode is used to run the application code. Once in user mode the CPSR
cannot be written to and modes can only be changed when an exception is
generated.
FIQ: (Fast Interrupt reQuest) This supports high speed interrupt handling. Generally
it is used for a single critical interrupt source in a system
IRQ: (Interrupt ReQuest) This supports all other interrupt sources in a system
Supervisor: A protected mode for running system level code to access hardware
or run OS calls. The ARM 7 enters this mode after reset.
Abort: If an instruction or data is fetched from an invalid memory region, an abort
exception will be generated
Undefined Instruction: If a FETCHED opcode is not an ARM instruction, an undefined
instruction exception will be generated.
The User registers R0-R7 are common to all operating modes. However FIQ mode
has its own R8 R14 that replace the user registers when FIQ is entered. Similarly,
each of the other modes have their own R13 and R14 so that each operating mode
has its own unique Stack pointer and Link register. The CPSR is also common to all
modes. However in each of the exception modes, an additional register - the saved
program status register (SPSR), is added. When the processor changes the current
value of the CPSR stored in the SPSR, this can be restored on exiting the exceptionmode.
14
Power Supply
There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a
suitable DC voltage supply for electronics circuits and other devices. A power supply can by broken down into a
series of blocks, each of which performs a particular function.
A 5V regulated supply
15
Transformer
Instead we use the root mean square voltage (VRMS) which is 0.7 of the peak voltage (Vpeak):
VRMS = 0.7 Vpeak and Vpeak = 1.4 VRMS
These equations also apply to current.
They are only true for sine waves (the most common type of AC) because the 0.7 and 1.4 are different values
for other shapes.
The RMS value is the effective value of a varying voltage or current. It is the equivalent steady DC (constant)
value which gives the same effect.
17
Bridge rectifier
Alternate pairs of diodes conduct, changing over
the connections so the alternating directions of
AC are converted to the one direction of DC.
Smoothing
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a
reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram
shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges
quickly near the peak of the varying DC, and then discharges as it supplies current to the output.
18
Note that smoothing significantly increases the average DC voltage to almost the peak value (1.4 RMS value).
For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V is lost in the bridge rectifier),
with smoothing this increases to almost the peak value giving 1.4 4.6 = 6.4V smooth DC.
Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a small ripple
voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below
gives the required value for the smoothing capacitor. A larger capacitor will give less ripple. The capacitor value
must be doubled when smoothing half-wave DC.
Electrolytic Capacitors
Examples:
Circuit symbol:
Electrolytic capacitors are polarised and they must be connected the correct way round, at least one of their
leads will be marked + or -. They are not damaged by heat when soldering.
There are two designs of electrolytic capacitors; axial where the leads are attached to each end (220F in
picture) and radial where both leads are at the same end (10F in picture). Radial capacitors tend to be a little
smaller and they stand upright on the circuit board.
19
It is easy to find the value of electrolytic capacitors because they are clearly printed with their capacitance and
voltage rating. The voltage rating can be quite low (6V for example) and it should always be checked when
selecting an electrolytic capacitor. If the project parts list does not specify a voltage, choose a capacitor with a
rating which is greater than the project's power supply voltage. 25V is a sensible minimum for most battery
circuits.
Voltage regulator
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are
also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in
dual supplies. Most regulators include some automatic protection from excessive current ('overload protection')
and overheating ('thermal protection').
Many of the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A
regulator shown on the right. They include a hole for attaching a heat sink if necessary.
20
GSM MODEM
GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for
communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber
Identity Module) card just like mobile phones to activate communication with the network. Also
they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for
their identification. A GSM/GPRS MODEM can perform the following operations:
1.
2.
3.
The MODEM needs AT commands, for interacting with processor or controller, which are
communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command. Different AT
commands supported by the MODEM can be sent by the processor/controller/computer to
interact with the GSM and GPRS cellular network.
GSM/GPRS Module
A GSM/GPRS module assembles a GSM/GPRS modem with standard communication
interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer
or a microprocessor / microcontroller based system. The power supply circuit is also built in the
module that can be activated by using a suitable adaptor.
21
GSM
initiative of CEPT
AT Commands
AT commands are used to control MODEMs. AT is the abbreviation for Attention. These
commands come from Hayes commands that were used by the Hayes smart modems. The
Hayes commands started with AT to indicate the attention from the MODEM. The dial up and
wireless MODEMs (devices that involve machine to machine communication) need AT commands
to interact with a computer. These include the Hayes command set as a subset, along with other
extended AT commands.
AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following
information and services:
1.
Information and configuration pertaining to mobile device or MODEM and SIM card.
SMS services.
3.
MMS services.
4.
Fax services.
5.
The Hayes subset commands are called the basic commands and the commands specific to a
GSM network are called extended AT commands.
23
Types of AT Commands:
There are four types of AT commands:
AT commands' syntax
Case Sensitivity The AT commands are generally used in uppercase letters. However some MODEMs and mobile phones allow
both uppercase and small case letters.
Single Command The AT commands include a prefix AT which indicates the beginning of the command to MODEM; and a
carriage return which indicates the end of the command.
24
However string AT itself is not the part of the command. For example in ATD, D is the command name not
ATD.
The extended AT commands have a + in the command name.
For example: AT+CGMI<Carriage return>
Command Line Multiple AT commands can be sent to MODEM in a single command line. The commands in a line are
separated by a semi-colon (;).
Description
25
AT+CSMS
AT+CPMS
AT+CMGF
Message format
AT+CSCA
AT+CSMP
AT+CSDH
AT+CSCB
AT+CSAS
Save settings
AT+CRES
Restore settings
AT+CNMI
AT+CMGL
List messages
AT+CMGR
Read message
AT+CMGS
Send message
AT+CMSS
AT+CMGW
AT+CMGD
Delete message
AT+CPIN="xxxx"
AT+CREG?
AT+CSQ
AT+CSCA="+xxxxx"
AT+CNMI=1,2,0,0,0
When a new SMS is received by the GSM modem, the computer (DTE) will receive the following ..
+CMT : "+61xxxxxxxx" , , "04/08/30,23:20:00+40"
27
AT+CNMI=1,1,0,0,0
When a new SMS is received by the GSM modem, the DTE will receive the following ..
+CMTI: "SM",3
AT+CMGR=3 <Enter>
The modem will then send to the computer details of the received SMS from the specified
memory location ( eg. 3 ) ..
+CMGR: "REC READ","+61xxxxxx",,"04/08/28,22:26:29+40"
This is the new SMS received by the GSM modem
After reading and parsing the new SMS message, the computer (DTE) should send a AT command
to clear the memory location in the GSM modem ..
AT+CMGD=3 <Enter> To clear the SMS receive memory location in the GSM mod
However, we do not have to do this. Instead, we simply need to configure the serial ports operation mode and
baud rate. Once configured, all we have to do is write to an SFR to write a value to the serial port or read the
same SFR to read a value from the serial port. The 8051 will automatically let us know when it has finished
sending the character we wrote and will also let us know whenever it has received a byte so that we can process
it. We do not have to worry about transmission at the bit level--which saves us quite a bit of coding and
processing time.
Setting the Serial Port Mode
The first thing we must do when using the 8051s integrated serial port is, obviously, configure it. This lets us
tell the 8051 how many data bits we want, the baud rate we will be using, and how the baud rate will be
determined.
First, lets present the "Serial Control" (SCON) SFR and define what each bit of the SFR represents:
Bit Name
Bit Addres
Explanation of Function
SM0
9Fh
SM1
9Eh
SM2
9Dh
REN
9Ch
TB8
9Bh
RB8
9Ah
TI
99h
RI
98h
Additionally, it is necessary to define the function of SM0 and SM1 by an additional table:
SM0
SM1
Serial Mode
Explanation
Baud Rate
Oscillator / 12
8-bit UART
9-bit UART
Oscillator / 64 (*)
9-bit UART
(*) Note: The baud rate indicated in this table is doubled if PCON.7 (SMOD) is set.
The SCON SFR allows us to configure the Serial Port. Thus, well go through each bit and review its function.
29
Finally, the RI bit means "Receive Interrupt." It funcions similarly to the "TI" bit, but it indicates that a byte has
been received. That is to say, whenever the 8051 has received a complete byte it will trigger the RI bit to let the
program know that it needs to read the value quickly, before another byte is read.
Setting the Serial Port Baud Rate
Once the Serial Port Mode has been configured, as explained above, the program must configure the serial ports
baud rate. This only applies to Serial Port modes 1 and 3. The Baud Rate is determined based on the oscillators
frequency when in mode 0 and 2. In mode 0, the baud rate is always the oscillator frequency divided by 12. This
means if youre crystal is 11.059Mhz, mode 0 baud rate will always be 921,583 baud. In mode 2 the baud rate is
always the oscillator frequency divided by 64, so a 11.059Mhz crystal speed will yield a baud rate of 172,797.
In modes 1 and 3, the baud rate is determined by how frequently timer 1 overflows. The more frequently timer 1
overflows, the higher the baud rate. There are many ways one can cause timer 1 to overflow at a rate that
determines a baud rate, but the most common method is to put timer 1 in 8-bit auto-reload mode (timer mode 2)
and set a reload value (TH1) that causes Timer 1 to overflow at a frequency appropriate to generate a baud rate.
To determine the value that must be placed in TH1 to generate a given baud rate, we may use the following
equation (assuming PCON.7 is clear).
TH1 = 256 - ((Crystal / 384) / Baud)
If PCON.7 is set then the baud rate is effectively doubled, thus the equation becomes:
TH1 = 256 - ((Crystal / 192) / Baud)
For example, if we have an 11.059Mhz crystal and we want to configure the serial port to 19,200 baud we try
plugging it in the first equation:
TH1 = 256 - ((Crystal / 384) / Baud)
TH1 = 256 - ((11059000 / 384) / 19200 )
TH1 = 256 - ((28,799) / 19200)
TH1 = 256 - 1.5 = 254.5
As you can see, to obtain 19,200 baud on a 11.059Mhz crystal wed have to set TH1 to 254.5. If we set it to 254
we will have achieved 14,400 baud and if we set it to 255 we will have achieved 28,800 baud. Thus were
stuck...
31
But not quite... to achieve 19,200 baud we simply need to set PCON.7 (SMOD). When we do this we double the
baud rate and utilize the second equation mentioned above. Thus we have:
TH1 = 256 - ((Crystal / 192) / Baud)
TH1 = 256 - ((11059000 / 192) / 19200)
TH1 = 256 - ((57699) / 19200)
TH1 = 256 - 3 = 253
Here we are able to calculate a nice, even TH1 value. Therefore, to obtain 19,200 baud with an 11.059MHz
crystal we must:
1. Configure Serial Port mode 1 or 3.
2. Configure Timer 1 to timer mode 2 (8-bit auto-reload).
3. Set TH1 to 253 to reflect the correct frequency for 19,200 baud.
4. Set PCON.7 (SMOD) to double the baud rate.
Writing to the Serial Port
Once the Serial Port has been propertly configured as explained above, the serial port is ready to be used to send
data and receive data. If you thought that configuring the serial port was simple, using the serial port will be a
breeze.
To write a byte to the serial port one must simply write the value to the SBUF (99h) SFR. For example, if you
wanted to send the letter "A" to the serial port, it could be accomplished as easily as:
MOV SBUF,#A
Upon execution of the above instruction the 8051 will begin transmitting the character via the serial port.
Obviously transmission is not instantaneous--it takes a measureable amount of time to transmit. And since the
8051 does not have a serial output buffer we need to be sure that a character is completely transmitted before we
try to transmit the next character.
The 8051 lets us know when it is done transmitting a character by setting the TI bit in SCON. When this bit is
set we know that the last character has been transmitted and that we may send the next character, if any.
Consider the following code segment:
32
33
Features
34
LCD
(Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various
devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation
of
displaying
special
&
even custom
35
characters (unlike
in
seven
so
on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command
and Data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD
Pin Diagram:
in Description:
Pin No
Function
Ground (0V)
Name
Ground
Vcc
36
VEE
Selects command register when low; and data register when high
Register Select
Read/write
Enable
DB0
DB1
DB2
10
11
DB3
DB4
12
DB5
13
DB6
14
DB7
15
Led+
16
Led-
ELAYS:
Relays are used throughout the automobile. Relays which come in assorted sizes, ratings, and
applications, are used as remote control switches. A typical vehicle can have 20 relays or more.
37
RELAY APPLICATIONS:
Relays are remote control electrical switches that are controlled by another switch, such as a horn switch or a
computer as in a power train control module. Relays allow a small current flow circuit to control a higher
current circuit. Several designs of relays are in use today, 3-pin, 4-pin, 5-pin, and 6-pin, single switch or dual
switches.
RELAY OPERATION
All relays operate using the same basic principle. Our example will use a commonly used 4 - pin relay. Relays
have two circuits: A control circuit (shown in GREEN) and a load circuit (shown in RED). The control circuit
has a small control coil while the load circuit has a switch. The coil controls the operation of the switch.
38
39
RELAY OPERATION :
When no voltage is applied to pin 1, there is no current flow through the coil. No current
means no magnetic field is developed, and the switch is open. When voltage is supplied
to pin 1, current flow though the coil creates the magnetic field needed to close the
switch allowing continuity between pins 2 and 4.
40
DC Motor
Geared DC motors can be defined as an extension of DC motor which already had its Insight details
demystified here. A geared DC Motor has a gear assembly attached to the motor. The speed of motor is
counted in terms of rotations of the shaft per minute and is termed as RPM .The gear assembly helps in
increasing the torque and reducing the speed. Using the correct combination of gears in a gear motor, its
speed can be reduced to any desirable figure. This concept where gears reduce the speed of the vehicle but
increase its torque is known as gear reduction. This Insight will explore all the minor and major details that
make the gear head and hence the working of geared DC motor.
External Structure
At the first sight, the external structure of a DC geared motor looks as a straight expansion over the simple DC
ones.
41
The lateral view of the motor shows the outer protrudes of the gear head. A nut is placed near the shaft which
helps in mounting the motor to the other parts of the assembly.
42
Also, an internally threaded hole is there on the shaft to allow attachments or extensions such as wheel to be
attached to the motor
Working of project:
Project Description
43
In this projectwe are concentrating on Fingerprint scanning. This module can operate in 2 modes
they are Master mode and User mode. We will be using Master mode to register the fingerprints
which will be stored in the ROM present on the scanner with a unique id.
When this module is interfaced to the microcontroller, we will be using it in user mode.
In this mode we will be verifying the scanned images with the stored images. When coming to
our application the images of the persons who are authorized to enter into the locker room will
be stored in the module with a unique id. To prove that the persons are authorized to enter that
area they need to scan their images.
This scanner is interfaced to 8051 microcontroller. By using this controller we will be
controlling the scanning process. After the scanning has been completed. Immediately the locker
will be opened. After the security system will generate a unique encrypted code for user access
and will SMS it to user with the help of GSM module attached, this code is purely generated on
complex software algorithm. User will need to enter this code in order to open the door, if the
code matches the encrypted code system will open the door, otherwise the door will be locked
and the access s denied by the system.
Flowchart:
44
START
IS
USER VALID?
GENERATE PASSWORD
FOR USER
IS
CODE VALID?
STOP
Advantages
1. High level of security is obtained by the use of GSM Technology
45
2. Security is ensured even if th unauthorized user tries to open the door with the valid user id,
as the encrypted code will only be sent to valid user cell phone
3. Low cost, easy to use
4. System can be easily modify for new users
Applications
46
BILL OF MATERIAL:
Sr. No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description
P89V51RD2
Transformer 18 V, 0.5A
Heat sink
LM7805
Diode 1N4007
Capacitor 1000 f
Disc Capacitor
IC Base 40 Pin
Relimate Base
Relimate Connector
Pull Up Resistance 10 K
PCB
Reset Switch
IC Base 8 Pin
IC Base 16 Pin
12 V Relay
230 v relay
GSM Modem
Resistance
LM 35 Temp sensor
LDR
FINGUR PRINT MODEM
R305
transistor Bc 547
transistor Bc 557
Heat Sink
26
27
28
29
LCD
DC Motor
LED
Keypad
Quantity
Price
1
1
1
1
4
1
10
1
10
10
4
3
5
3
2
2
1
1
20
1
1
180
120
12
8
8
7
5
18
40
88
8
700
5
16
12
20
35
2000
10
45
22
1
5
5
1
2200
18
18
8
1
5
1
150
50
5
100
TOTAL AMOUNT
6000
47
Bibliography:
REFERENCE BOOKS: The 8051 microcontroller :- Kenneth Ayala
The 8051 microcontroller and Embedded systems :- Muhammad Ali
Mazidi
WEB-SITES: www.datasheetarchieve.com
www.maxim-ic.com
www.alldatasheet.com/
www.nxp.com/-Philips
48