FINGERPRINT based ATM security System

Published on March 2017 | Categories: Documents | Downloads: 87 | Comments: 0 | Views: 479
of 67
Download PDF   Embed   Report

Comments

Content

INTRODUCTION

1.1 OBJECTIVE The main aim of this project to provide secure banking system, by taking fingerprints as authorized identity at ATM/banks. The purpose of the project is to provide a secured and reliable environment to the customers for their banking transactions by providing a unique identity to every user using the FINGER PRINT identification technology. The main objective of this system is to develop an embedded system, which is used for ATM security applications. In these system, Bankers will collect the customer finger prints while opening the accounts then customer will only access ATM machine. The working of these ATM machine is when customer place finger on the finger print module it displays the name of the customer on the LCD connected to the micro controller. If the user does not have a account activated by a fingerprint initially it does not allow the user to do transactions. Nowadays, using the ATM (Automatic Teller Machine) which provides customers with the convenient banknote trading is very common. However, the financial crime case rises repeatedly in recent years; a lot of criminals tamper with the ATM terminal and steal user's credit card and password by illegal means. Once user's bank card is lost and the password is stolen, the criminal will draw all cash in the shortest time, which will bring enormous financial losses to customer. How to carry on the valid identity to the customer becomes the focus in current financial circle. Traditional ATM systems authenticate generally by using the credit card and the password, the method has some defects. Using credit card and password cannot verify the client's identity exactly. In recent years, the algorithm that the fingerprint recognition continuously updated, which has offered new verification means for us, the original password authentication method combined with the biometric identification technology verify the clients' identity better and achieve the purpose that use of ATM machines improve the safety effectively. This project can be extended to be operated with password i.e., sending a unique password to the customer‘s mobile every time
1

the customer places a finger to do transactions, then the customer must enter the code and proceed further .

1.2 BACK GROUND OF BIOMETRICS This invention relates to the field of biometrics. ATM makes the human life very comfort. In olden days suppose I want to draw the money I have to go to the bank, and have to wait until I get my turn. But using these existing ATMs there is no time waste. In the existing system we are dealing with a card and we have an individual password to protect our money. But anybody can know our password and steal our card. So there is no security to our money. In order to overcome that problem here is the FINGER PRINT BASED ATM SECURITY SYSTEM. Here card system doesn‘t exist. First of all we have to give our finger print to the data base. Whenever we want money we have to go to the ATM machine and should give our finger print. If it matches with the data base it displays our name, means it is another security to our system. Then only further transaction will be done. If the date base is not matched no further transaction will be done. So there is no need to worry about our money. Nobody can steal our money.

1.3ADVANTAGES:  More secured as it is operated through fingerprint  Can be operated through picture as password  Cost effective

1.4APPLICATIONS:   Cell phones. Computers.

 Robots.  Interfacing to two pc‘s

2

BLOCK DIAGRAM 2.1 DESCRIPTION: The block diagram shown in the Fig 2.1 consists of ARM7, Finger print Module, power supply, RS232, EEPROM, Touch Pad, and LCD. Nowadays, using the ATM (Automatic Teller Machine) which provide customers with the convenient banknote trading is very common.

Fig 2.1 Finger Print based ATM security System
3

However, the financial crime case rises repeatedly in recent years; a lot of criminals tamper with the ATM terminal and steal user's credit card and password by illegal means. Once user's bank card is lost and the password is stolen, the criminal will draw all cash in the shortest time, which will bring enormous financial losses to customer. How to carry on the valid identity to the customer becomes the focus in current financial circle. Traditional ATM systems authenticate generally by using the credit card and the password, the method has some defects. Using credit card and password cannot verify the client's identity exactly. In recent years, the algorithm that the fingerprint recognition continuously updated, which has offered new verification means for us, the original password authentication method combined with the biometric identification technology verify the clients' identity better and achieve the purpose that use of ATM machines improve the safety effectively.

The embedded ATM client authentication system is based on fingerprint recognition which is designed after analyzed existed ATM system. The S3C2440 chip is used as the core of this embedded system which is associated with the technologies of fingerprint recognition and current high speed network communication. The primary functions are shown as follows: • Fingerprint recognition: The masters' fingerprint information was used as the standards of identification. It must certify the feature of the human fingerprint before using ATM system as shown in Fig. 2.2. • Remote authentication: System can compare current client's fingerprint information with remote fingerprint data server. • Telephone alarming: Once an exception happens, such as log in as the fake identity, the system will start the phone alarm to inform client and bank staff as soon as possible.

4

Fig 2.2 Block diagram of Biometric system.

• Message alarming: the message can be send to the relevant staff‘s mobile phone without any noise, in order to carry on emergency processing. • Police network connection: The system can call the police via the police network. • Two discriminate analysis methods: Besides the fingerprint recognition, the mode of password Recognition can be also used for the system.

5

CIRCUIT DIAGRAM

3.1 DESCRIPTION OF THE CIRCUIT The Circuit Diagram is shown in Fig 3.1.Here we are using serial finger print scanner. It has RS232 for serial communication. It has 4 outputs. 1.12V Power supply, 2. Reception of data, 3. Transmission of data, 4. Ground. We are using MAX232 for Voltage and Current balance. Scanner 2 outputs Transmission and Reception of data are given as inputs to its 13, 14 pins respectively. Output is taken from 12, 11 pins. These are given to 10,11 pins of Micro controller AT89S52 which has 40 pins.18,19 pins of it are given to crystal oscillator 11.05Mhz.20 pin is Ground,40 pin is Power supply of 5V. Coming to 16*2 LCD it has 16 pins. 1.16 pin is connected to Ground, 2.15 pin are Power supply. 3.3 pin is for adjustment of brightness of screen. When new user is using he has to press this push switch in order to enter into this mode. First the user should register his finger print. He gets a message as REGISTERED for his registration. All finger prints are stored n the µC. Old user should use this switch. Now he should keep his finger on scanner for verification process.

6

If finger is matched he is the AUTHORISED person. Then he is asked for password if it is also correct then he has to enter the money. If it is not matched he gets a message as UNAUTHORISED person. Further transactions will not be done.

7

HARDWARE COMPONENTS

4.1 POWER SUPPLY UNIT: Circuit Diagram

Fig 4.1Power Supply

Power supply unit consists of following units i) Step down transformer ii) Rectifier unit iii) Input filter iv) Regulator unit v) Output filter

4.1.1 STEPDOWN TRANSFORMER: The Step down Transformer is used to step down the main supply voltage from 230V AC to lower value. This 230 AC voltage cannot be used directly, thus it is stepped down. The Transformer consists of primary and secondary coils. To reduce or step down the voltage, the transformer is designed to contain less number of turns in its secondary core. The output

8

from the secondary coil is also AC waveform. Thus the conversion from AC to DC is essential. This conversion is achieved by using the Rectifier Circuit/Unit. The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP by a factor equal to the ratio of the number of turns of wire in their respective windings:

4.1.1.1 Basic Principle The transformer is based on two principles: firstly, that an electric current can produce a magnetic field (electromagnetism) and secondly that a changing magnetic field within a coil of wire induces a voltage across the ends of the coil (electromagnetic induction). By changing the current in the primary coil, it changes the strength of its magnetic field; since the changing magnetic field extends into the secondary coil, a voltage is induced across the secondary. A simplified transformer design is shown below. A current passing through the primary coil creates a magnetic field. The primary and secondary coils are wrapped around a core of very high magnetic permeability, such as iron; this ensures that most of the magnetic field lines produced by the primary current are within the iron and pass through the secondary coil as well as the primary coil. 4.1.1.2 Induction law The voltage induced across the secondary coil may be calculated from Faraday's law of induction, which states that:

Where VS is the instantaneous voltage, NS is the number of turns in the secondary coil and Φ equals the magnetic flux through one turn of the coil. If the turns of the coil are
9

oriented perpendicular to the magnetic field lines, the flux is the product of the magnetic field strength B and the area A through which it cuts. The area is constant, being equal to the cross-sectional area of the transformer core, whereas the magnetic field varies with time according to the excitation of the primary. Since the same magnetic flux passes through both the primary and secondary coils in an ideal transformer, the instantaneous voltage across the primary winding equals

Taking the ratio of the two equations for VS and VP gives the basic equation for stepping up or stepping down the voltage

4.1.1.3 Ideal Power Equation If the secondary coil is attached to a load that allows current to flow, electrical power is transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly efficient; all the incoming energy is transformed from the primary circuit to the magnetic field and into the secondary circuit. If this condition is met, the incoming electric power must equal the outgoing power. Pincoming = IPVP = Poutgoing = ISVS Giving the ideal transformer equation

10

Fig 4.2 Transformer

Pin-coming = IPVP = Pout-going = ISVS Giving the ideal transformer equation

If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped down) (IS < IP) by the same factor. Transformers are efficient so this formula is a reasonable approximation. If the voltage is increased (stepped up) (VS > VP), then the current is decreased (stepped down) (IS < IP) by the same factor. Transformers are efficient so this formula is a reasonable approximation. The impedance in one circuit is transformed by the square of the turns ratio. For example, if an impedance ZS is attached across the terminals of the secondary coil, it appears to the primary circuit to have an impedance of
11

This relationship is reciprocal, so that the impedance ZP of the primary circuit appears to the secondary to be

4.1.2. Rectifier Unit: The Rectifier circuit is used to convert the AC voltage into its corresponding DC voltage. The most important and simple device used in Rectifier circuit is the diode. The simple function of the diode is to conduct when forward biased and not to conduct in reverse bias. Now we are using three types of rectifiers. They are

1. Half-wave rectifier 2. Full-wave rectifier 3. Bridge rectifier

Half-wave rectifier In half wave rectification, either the positive or negative half of the AC wave is passed, while the other half is blocked. Because only one half of the input waveform reaches the output, it is very inefficient if used for power transfer. Half-wave rectification can be achieved with a single diode in a one phase supply, or with three diodes in a three-phase supply. Full-wave rectifier A full-wave rectifier converts the whole of the input waveform to one of constant polarity (positive or negative) at its output. Full-wave rectification converts both polarities of the input waveform to DC (direct current), and is more efficient.

12

Bridge rectifier A bridge rectifier makes use of four diodes in a bridge arrangement to achieve fullwave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.

Fig 4.3 Bridge Rectifier A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge configuration that provides the same polarity of output voltage for either polarity of input voltage. When used in its most common application, for conversion of alternating current (AC) input into direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC input, resulting in lower cost and weight as compared to a center-tapped transformer design.

13

Fig.4.4. Rectifier Waveforms

14

4.1.3 Input Filter: Capacitors are used as filter. The ripples from the DC voltage are removed and pure DC voltage is obtained. And also these capacitors are used to reduce the harmonics of the input voltage. The primary action performed by capacitor is charging and discharging. It charges in positive half cycle of the AC voltage and it will discharge in negative half cycle. So it allows only AC voltage and does not allow the DC voltage. This filter is fixed before the regulator. Thus the output is free from ripples. There are two types of filters. They are 1. Low pass filter 2. High pass filter Low pass filter:

Fig.4.5. Low pass Filter One simple electrical circuit that will serve as a low-pass filter consists of a resistor in series with a load, and a capacitor in parallel with the load. The capacitor exhibits reactance, and blocks low-frequency signals, causing them to go through the load instead. At higher frequencies the reactance drops, and the capacitor effectively functions as a short circuit. The combination of resistance and capacitance gives you the time constant of the filter τ = RC (represented by the Greek letter tau). The break frequency, also called the turnover frequency or cutoff frequency (in hertz), is determined by the time constant: or equivalently (in radians per second):

15

High pass filter:

Fig.4.6 High pass filter

The above circuit diagram illustrates a simple 'RC' high-pass filter. we should find that the circuit passes 'high' frequencies fairly well, but attenuates 'low' frequencies. Hence it is useful as a filter to block any unwanted low frequency components of a complex signal whilst passing higher frequencies. Circuits like this are used quite a lot in electronics as a 'D.C. Block' - i.e. to pass a.c. signals but prevent any D.C. voltages from getting through. 4.1.4 Regulator Unit:

Fig.4.7 7805 Regulator

16

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 output gets 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 pin 3) Output pin It regulates the positive voltage. ii) Negative regulator 1) Ground pin 2) Input pin 3) Output pin It regulates the negative voltage.

Fig.4.8 Block diagram of regulator

17

4.1.5 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.1µF capacitor. The output at this stage is 5V and is given to the Microcontroller. The output voltage overshoots when the load is removed or a short clears. When the load is removing from a switching mode power supply with a LC low-pass output filter, the only thing the control loop can do is stop the switching action so no more energy is taken from the source. The energy that is stored in the output filter inductor is dumped into the output capacitor causing a voltage overshoot.

4.2 MAX232: The MAX232 family of line drivers/receivers is intended for all EIA/TIA-232E communications interfaces. MAX232 is a level converter which converts the voltage levels coming from one side, compatible to another side. So it helps in communication between microcontroller and GSM and also between GSM and PC, performing RS232 communication.

Fig 4.9.Pin diagram of MAX 232

18

Pin No. 1 2 3 4 5 6 7

Function

Name Capacitor 1 + Capacitor 3 +

Capacitor connection pins

Capacitor 1 Capacitor 2 + Capacitor 2 Capacitor 4 -

Output pin; outputs the serially transmitted data at RS232 logic T2 Out level; connected to receiver pin of PC serial port

8

Input pin; receives serially transmitted data at RS 232 logic R2 In level; connected to transmitter pin of PC serial port

9

Output pin; outputs the serially transmitted data at TTL logic R2 Out level; connected to receiver pin of controller.

10 1112

Input pins; receive the serial data at TTL logic level; connected T2 In to serial transmitter pin of controller. T1 In

Output pin; outputs the serially transmitted data at TTL logic R1 Out level; connected to receiver pin of controller.

13

Input pin; receives serially transmitted data at RS 232 logic R1 In level; connected to transmitter pin of PC serial port

14

Output pin; outputs the serially transmitted data at RS232 logic T1 Out level; connected to receiver pin of PC serial port

15 16

Ground (0V) Supply voltage; 5V (4.5V – 5.5V)

Ground Vcc

Table 4.1 PIN Description of MAX232 4.2.1 Features   Operates With Single 5-V Power Supply BiCMOS Process Technology
19

     

Two Drivers and Two Receivers.±30-V Input Levels Low Supply Current. 8 mA Typical Meets or Exceeds TIA/EIA-232-F and ITU Designed to be Interchangeable With Maxim MAX232 Applications o TIA/EIA-232-F o Battery-Powered Systems o Terminals o Modems o Computers

  

ESD Protection Exceeds 2000 V Per MIL-STD-883, Method 3015 Package Options Include Plastic

4.2.2 Logic Signal Voltage Serial RS-232 (V.24) communication works with voltages (between -15V ... -3V are used to transmit a binary '1' and +3V ... +15V to transmit a binary '0') which are not compatible with today's computer logic voltages. On the other hand, classic TTL computer logic operates between 0V ... +5V (roughly 0V ... +0.8V referred to as low for binary '0', +2V ... +5V for high binary '1' ). Modern low-power logic operates in the range of 0V ... +3.3V or even lower. So, the maximum RS-232 signal levels are far too high for today's computer logic electronics, and the negative RS-232 voltage can't be grokked at all by the computer logic. Therefore, to receive serial data from an RS-232 interface the voltage has to be reduced, and the 0 and 1 voltage levels inverted. In the other direction (sending data from some logic over RS-232) the low logic voltage has to be "bumped up", and a negative voltage has to be generated, too.

20

RS-232

TTL

Logic

-----------------------------------------------15V ... -3V <-> +2V ... +5V <-> 1

+3V ... +15V <-> 0V ... +0.8V <-> 0 All this can be done with conventional analog electronics, e.g. a particular power supply and a couple of transistors or the once popular 1488 (transmitter) and 1489 (receiver) ICs. However, since more than a decade it has become standard in amateur electronics to do the necessary signal level conversion with an integrated circuit (IC) from the MAX232 family (typically a MAX232A or some clone). In fact, it is hard to find some RS-232 circuitry in amateur electronics without a MAX232A or some clone. Some of the features are,

 Operate from Single +5V Power Supply  Low-Power Receive Mode in Shutdown (MAX223/MAX242)  Meet All EIA/TIA-232E and V.28 Specifications  Multiple Drivers and Receivers  3-State Driver and Receiver Outputs  Open-Line Detection (MAX243)

Fig. 4.10 Interface of RS 232 to MAX 232
21

RS232 Line Type & Logic Level Data Transmission (Rx/Tx) Logic 0 Data Transmission (Rx/Tx) Logic 1

RS232 Voltage +3 V to +15 V -3 V to -15 V

TTL

Voltage

to/from MAX232 0V 5V 5V 0V

Control Signals (RTS/CTS/DTR/DSR) Logic 0 -3 V to -15 V Control Signals (RTS/CTS/DTR/DSR) Logic 1 +3 V to +15 V

Table4.2: List of voltage levels in and out using MAX232

VOLTAGE LEVELS It is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0 to between +3 and +15 V, and changes TTL Logic 1 to between -3 to -15 V, and vice versa for converting from RS232 to TTL. This can be confusing when you realize that the RS232 Data Transmission voltages at a certain logic state are opposite from the RS232 Control Line voltages at the same logic state. To clarify the matter, see the table below. For more information see RS-232 Voltage Levels.

4.3 Finger Print Module: Fingerprint Sensor Module adopt the optic fingerprint sensor which consists of high-performance DSP and Flash. This is able to conduct fingerprint image processing, template generation, template matching, fingerprint searching, template storage, etc. Compared with similar products from other suppliers, 

Wide Application Range of Fingerprints with Different Quality Self-adaptive parameter adjustment mechanism is used in the course of fingerprint enrollment..This ensures good image quality for even dry or wet fingers, thus it has wider application range.

22



Competitive Price The cost of module is greatly reduced by using self-developed optic fingerprint enrollment device.



Immense Improved Algorithm Finger Print algorithm is specially written according to optic imaging theory. The algorithm is good for de-shaped or low-quality fingers due to its excellent correction and tolerance features.



Flexible Application User can easily set Finger Print Module to different working modes depending on complexity of application systems. User can conduct secondary development with high efficiency and reliability.



Low Power Consumption Sleep/awake control interface makes Finger Print suitable for occasions that require low power consumption.



Different Security Levels User can set different security level according to different application environment.

4.3.1 Concepts in Fingerprint System: Fingerprint Feature Fingerprint algorithmic means capturing features from fingerprint image, it represents the fingerprint information. The saving, matching and capturing of fingerprint templates are all manipulated through fingerprint features. Comparing 2 fingerprint templates, return info: matching or not matching. 


1:NSearching Search the matching fingerprint from numbers of fingerprint features. Return info: No matching features or having matching features and returning the matching feature‘s ID simultaneity.
23

General Description: Biometric systems are recently used in various authentication systems. They are increasingly used not only in environments that require high level of security but also in many other places because they are convenient and economical. Among various biometric systems, the fingerprint recognition system takes up most of the market because it is easy to use as well as economical and capable of developing various types of applications. NITGEN, a global leader in the fingerprint recognition industry, provides various fingerprint authentication solutions such as PC security, knowledge management, vaulting service, access control, electronic approval, and financial payment. NITGEN actively responds to customer needs through continuous research, development and quality management.


FIM5360 is a stand-alone Fingerprint Identification Device with many excellent features. It provides benefits such as high identification performance, low power consumption and UART serial interfaces with the various commands for easy integration into a wide range of applications. It is a durable and compact device with fingerprint identification module containing NITGEN fingerprint sensor inside. optics-based

   

1 ID multi-Templates mode Up to 2,000 Templates More than 30,000 logs Using New sensor OPP06

Changeable users verification security level 


Selectable UART communication Level (RS233 or LVCMOS) Selectable rotation angle range (+/- 45 ˚ or +/- 180 ˚ )
    

Support Auto-Identify mode Support ISO197974-2 and ANSI 378 format Support Device Master password Provide custom data area Compatible template format with NITGEN eNBio API

24

Operation: Reset


FIM5360 provides external low-active reset signal port. By setting the reset port low state, FIM5360 could be initialized. The reset port is internally pullused to VCC.

Communication


FIM5360 has RS232C UART serial communication port. This port support 6 baud rate modes such as 9600, 14400, 19200, 38400, 57600, and 115200 bps.



FIM5360 follows NITGEN Serial Communication protocol. For more detail information refer to the document ―FIM ComProtocol.pdf‖.



UART data consists of 1 start bit, 8 data bit, no parity bit and 1 stop bit.

Custom Data Area FIM5360 provides 64 Kbytes flash memory. Using this memory, host can save private data for specific usage. The caution is needed for the responsibility for reading, writing and erasing because user data area is given to the host.

4.3.2 Basic Tasks:

1. Finger print scanning 2. Image processing 3. Storage 4. Registration 5. Finger Print Matching Finger Print Scanner Fingerprint scanners are security systems of biometrics. They are now used in police stations, security industries and most recently, on computers. Every person has marks on his or hers fingers. They cannot be removed or changed. These marks have a pattern and this pattern is called the fingerprint. Every fingerprint is special, and different from any other in

25

the world. Because there are countless combinations, fingerprints have become an ideal means of identification. The three basic patterns of fingerprint ridges are the arch, loop, and whorl. An arch is a pattern where the ridges enter from one side of the finger, rise in the center forming an arc, and then exit the other side of the finger. The loop is a pattern where the ridges enter from one side of a finger, form a curve, and tend to exit from the same side they enter. In the whorl pattern, ridges form circularly around a central point on the finger. Scientists have found that family members often share the same general fingerprint patterns, leading to the belief that these patterns are inherited.

The arch pattern

The loop pattern Fig.4.11.Fingerprint Patterns

The whorl pattern

4.3.3 Types of Scanners
A fingerprint scanner system has two basic jobs -- it needs to get an image of your finger, and it needs to determine whether the pattern of ridges and valleys in this image matches the pattern of ridges and valleys in pre-scanned images.

26

Fig 4.12: ATM Fingerprint Scanner There are a number of different ways to get an image of somebody's finger. The most common methods today are optical scanning and capacitance scanning. Both types come up with the same sort of image, but they go about it in completely different ways.

4.3.3.1 Optical Scanner
The heart of an optical scanner is a charge coupled device (CCD), the same light sensor system used in digital cameras and camcorders. A CCD is simply an array of lightsensitive diodes called photosites, which generate an electrical signal in response to light photons. Each photosite records a pixel, a tiny dot representing the light that hit that spot. Collectively, the light and dark pixels form an image of the scanned scene (a finger, for example). Typically, an analog-to-digital converter in the scanner system processes the analog electrical signal to generate a digital representation of this image. The scanning process starts when you place your finger on a glass plate, and a CCD camera takes a picture. The scanner has its own light source, typically an array of light-emitting diodes, to illuminate the ridges of the finger. The CCD system actually generates an inverted image of the finger, with darker areas representing more reflected light (the ridges of the finger) and lighter areas representing less reflected light (the valleys between the ridges). Before comparing the print to stored data, the scanner processor makes sure the CCD has captured a clear image. It checks the average pixel darkness, or the overall values in a small sample, and rejects the scan if the overall image is too dark or too light. If the image is
27

rejected, the scanner adjusts the exposure time to let in more or less light, and then tries the scan again.

Fig.4.13: Optical Fingerprint Scanner If the darkness level is adequate, the scanner system goes on to check the image definition (how sharp the fingerprint scan is). The processor looks at several straight lines moving horizontally and vertically across the image. If the fingerprint image has good definition, a line running perpendicular to the ridges will be made up of alternating sections of very dark pixels and very light pixels. If the processor finds that the image is crisp and properly exposed, it proceeds to comparing the captured fingerprint with fingerprints on file.

4.3.3.2 Capacitance Scanner
Like optical scanners, capacitive fingerprint scanners generate an image of the ridges and valleys that make up a fingerprint. But instead of sensing the print using light, the capacitors use electrical current. The diagram below shows a simple capacitive sensor. The sensor is made up of one or more semiconductor chips containing an array of tiny cells. Each cell includes two
28

conductor plates, covered with an insulating layer. The cells are tiny -- smaller than the width of one ridge on a finger.

Fig 4.14: Capacitive Fingerprint Scanner The sensor is connected to an integrator, an electrical circuit built around an inverting operational amplifier. The inverting amplifier is a complex semiconductor device, made up of a number of transistors, resistors and capacitors. The details of its operation would fill an entire article by itself, but here we can get a general sense of what it does in a capacitance scanner. Like any amplifier, an inverting amplifier alters one current based on fluctuations in another current. Specifically, the inverting amplifier alters a supply voltage. The alteration is based on the relative voltage of two inputs, called the inverting terminal and the non-inverting terminal. In this case, the non-inverting terminal is connected to ground, and the inverting terminal is connected to a reference voltage supply and a feedback loop. The feedback loop, which is also connected to the amplifier output, includes the two conductor plates.

29

As you may have recognized, the two conductor plates form a basic capacitor, an electrical component that can store up charge. The surface of the finger acts as a third capacitor plate, separated by the insulating layers in the cell structure and, in the case of the fingerprint valleys, a pocket of air. Varying the distance between the capacitor plates (by moving the finger closer or farther away from the conducting plates) changes the total capacitance (ability to store charge) of the capacitor. Because of this quality, the capacitor in a cell under a ridge will have a greater capacitance than the capacitor in a cell under a valley. To scan the finger, the processor first closes the reset switch for each cell, which shorts each amplifier's input and output to "balance" the integrator circuit. When the switch is opened again, and the processor applies a fixed charge to the integrator circuit, the capacitors charge up. The capacitance of the feedback loop's capacitor affects the voltage at the amplifier's input, which affects the amplifier's output. Since the distance to the finger alters capacitance, a finger ridge will result in a different voltage output than a finger valley. The scanner processor reads this voltage output and determines whether it is characteristic of a ridge or a valley. By reading every cell in the sensor array, the processor can put together an overall picture of the fingerprint, similar to the image captured by an optical scanner. The main advantage of a capacitive scanner is that it requires a real fingerprint-type shape, rather than the pattern of light and dark that makes up the visual impression of a fingerprint. This makes the system harder to trick. Additionally, since they use a semiconductor chip rather than a CCD unit, capacitive scanners tend to be more compact that optical devices. Capacitance sensors utilize the principles associated with capacitance in order to form fingerprint images. In this method of imaging, the sensor array pixels each act as one plate of a parallel-plate capacitor, the dermal layer (which is electrically conductive) acts as the other plate, and the non-conductive epidermal layer acts as a dielectric.

30

Passive capacitance A passive capacitance sensor uses the principle outlined above to form an image of the fingerprint patterns on the dermal layer of skin. Each sensor pixel is used to measure the capacitance at that point of the array. The capacitance varies between the ridges and valleys of the fingerprint due to the fact that the volume between the dermal layer and sensing element in valleys contains an air gap. The dielectric constant of the epidermis and the area of the sensing element are known values. The measured capacitance values are then used to distinguish between fingerprint ridges and valleys. Active capacitance Active capacitance sensors use a charging cycle to apply a voltage to the skin before measurement takes place. The application of voltage charges the effective capacitor. The electric field between the finger and sensor follows the pattern of the ridges in the dermal skin layer. On the discharge cycle, the voltage across the dermal layer and sensing element is compared against a reference voltage in order to calculate the capacitance. The distance values are then calculated mathematically, and used to form an image of the fingerprint. Active capacitance sensors measure the ridge patterns of the dermal layer like the ultrasonic method. Again, this eliminates the need for clean, undamaged epidermal skin and a clean sensing surface.

Difference between optical fingerprint reader and capacitator based fingerprint reader Fingerprint scanning is one of the most prevalent forms of biometric security. A user scans his finger over the sensor; an image is captured and compared to the pre-scanned images in the database. If a match is found, the user is granted access. Fingerprint scanners are widely being deployed as access control systems. Factors such as dry skin, worn surface of the finger, poor contact between the finger and the sensor, bright ambient light, scratches, moisture or dirt on the sensor can result in a bad image and hamper the efficiency of the biometric fingerprint reader.

31

A biometric fingerprint reader can operate on a number of different techniques to capture a fingerprint image, like optical sensing, capacitive sensing or multi-spectral imaging. If the operational circumstances are not optimal, the resulting image can be of poor quality, thus hindering proper authentication. An optical sensor based reader uses light to read and acquire fingerprint images. Optical sensors can be affected by a number of real life factors such as stray light, surface contamination or even prior fingerprint impressions present on the sensor surface. Hence it is essential to clean the fingerprint reader glass on a regular basis for optimal performance. Many optical sensors can detect a real fingerprint from a fake fingerprint using ‗Spoof detection‘ or ‗live finger detection‘. Capacitive sensors use electric current to sense a fingerprint and capture the image. As sensors apply a small voltage to the finger, a real fingerprint is required rather than a visual impression of it. This technique makes the fingerprint reader more reliable as it becomes harder to fake enrolment. Another benefit of capacitive sensing fingerprint readers is that they are more compact and thus easy. A fingerprint reader provides high level of security. One of the most reliable modes of authentication; fingerprint reading is used for a variety of security purposes around the world. From investigation bureaus to IT departments, fingerprint reading acts as a reliable access control system universally. 4.4 LCD (LIQUID CRYSTAL DISPLAY) LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven segment LEDs or other multi segment LEDs) because of the following reasons: 1. The declining prices of LCDs. 2. The ability to display numbers, characters and graphics. This is in contrast to LEDs, which are limited to numbers and a few characters. 3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep displaying the data. 4. Ease of programming for characters and graphics.

32

These components are ―specialized‖ for being used with the microcontrollers, which means that they cannot be activated by standard IC circuits. They are used for writing different messages on a miniature LCD.

Fig 4.15 LCD

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

4.2 Pins Functions:

Fig 4.2 Pin Functions
33

There are pins along one side of the small printed board used for connection to the microcontroller. There are total of 14 pins marked with numbers (16 in case the background light is built in). Their function is described in the table below:

TABLE 4.3 LCD PIN DESCRIPTION

4.4.1 LCD Screen: LCD screen consists of two lines with 16 characters each. Each character consists of 5x7 dot matrix. Contrast on display depends on the power supply voltage and whether messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have built in backlight (blue or green diodes). When used during operating, a resistor for current limitation should be used (like with any LE diode).

34

Fig: 4.3 Pin Diagram of LCD 4.4.2 LCD Basic Commands All data transferred to LCD through outputs D0-D7 will be interpreted as commands or as data, which depends on logic state on pin RS: RS = 1 - Bits D0 - D7 are addresses of characters that should be displayed. Built in processor addresses built in ―map of characters‖ and displays corresponding symbols. Displaying position is determined by DDRAM address. This address is either previously defined or the address of previously transferred character is automatically incremented. RS = 0 - Bits D0 - D7 are commands which determine display mode. List of commands which LCD recognizes are given in the table below:

35

Table 4.4 LCD Commands A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a column of liquid crystal molecules suspended between two transparent electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to each other. Without the liquid crystals between them, light passing through one would be blocked by the other. The liquid crystal twists the polarization of light entering one filter to allow it to pass through the other.
36

A program must interact with the outside world using input and output devices that communicate directly with a human being. One of the most common devices attached to an controller is an LCD display. Some of the most common LCDs connected to the controllers are 16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively. Many microcontroller devices use 'smart LCD' displays to output visual information. LCD displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it is even possible to produce a readout using the 5X7 dots plus cursor of the display. They have a standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display requires a +5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it only requires the supply lines plus 6 extra lines (RS RW D7 D6 D5 D4). When the LCD display is not enabled, data lines are tri-state and they do not interfere with the operation of the microcontroller. 4.4.3 SHAPES AND SIZES:

available. Line len

4.2.1(a) SHAPES AND SIZES OF LCD Even limited to character based modules, there is still a wide variety of shapes and
37

Shapes and S

sizes available. Line lengths of 8, 16,20,24,32 and 40 characters are all standard, in one, two and four line versions. Several different LC technologies exists. “supertwist” types, for example, offer Improved contrast and viewing angle over the older ―twisted nemati‖ types. Some modules are available with back lighting, so that they can be viewed in dimly-lit conditions. The back lighting may be either “electro-luminescent”, requiring a high voltage inverter circuit, or simple LED illumination. 4.4.4 Electrical block diagram:

FIG 4.2.2(a) ELECTRICAL BLOCK DIAGRAM OF LCD 4.4.5 Power supply for LCD driving:

FIG 4.2.3(a): POWER SUPPLY FOR LCD DRIVING 4.4.6 Pin Description: Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections).

38

FIGURE4.2.4 (a) PIN DIAGRAM OF 1X16 LINES LCD

CONTROL LINES EN: Line is called "Enable." This control line is used to tell the LCD that you are sending it data. To send data to the LCD, your program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again. RS: Line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen you would set RS high. RW: Line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands, so RW will almost always be low.Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7. Logic status on control lines:  E - 0 Access to LCD disabled
39

    

1 Access to LCD enabled R/W - 0 Writing data to LCD 1 Reading data from LCD RS - 0 Instructions 1 Character

Writing data to the LCD      Set R/W bit to low Set RS bit to logic 0 or 1 (instruction or character) to data lines (if it is writing) Set E line to high Set E line to low

Read data from data lines (if it is reading) on LCD      Set R/W bit to high Set RS bit to logic 0 or 1 (instruction or character) Set data to data lines (if it is writing) Set E line to high Set E line to low

Entering Text: First, a little tip: it is manually a lot easier to enter characters and commands in hexadecimal rather than binary (although, of course, you will need to translate commands from binary couple of sub-miniature hexadecimal rotary switches is a simple matter, although a little bit into hex so that you know which bits you are setting). Replacing the switch pack with a re-wiring is necessary. The switches must be the type where on = 0, so that when they are turned to the zero position, all four outputs are shorted to the common pin, and in position ―F‖, all four outputs are open circuit. All the available characters that are built into the module are shown in Table 3. Studying the table, you will see that codes associated with the characters are quoted in binary
40

and hexadecimal, most significant bits (―left-hand‖ four bits) across the top, and least significant bits (―right-hand‖ four bits) down the left. Most of the characters conform to the ASCII standard, although the Japanese and Greek characters (and a few other things) are obvious exceptions. Since these intelligent modules were designed in the ―Land of the Rising Sun,‖ it seems only fair that their Katakana phonetic symbols should also be incorporated. The more extensive Kanji character set, which the Japanese share with the Chinese, consisting of several thousand different characters, is not included. Using the switches, of whatever type, and referring to Table 3, enter a few characters onto the display, both letters and numbers. The RS switch (S10) must be ―up‖ (logic 1) when sending the characters, and switch E (S9) must be pressed for each of them. Thus the operational order is: set RS high, enter character, trigger E, leave RS high, enter another character, trigger E, and so on.

Fig 4.13. LCD Timing wave form. 4.4.7 Interfacing LCD to microcontroller A typical LCD write operation takes place as shown in the following timing waveform: The interface is either a 4-bit or 8-bit parallel bus that allows fast reading/writing of data to and from the LCD. This waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If 4-bit mode is used, two nibbles of data (First high four bits and then low four
41

bits with an E Clock pulse with each nibble) are sent to complete a full eight-bit transfer. The E Clock is used to initiate the data transfer within the LCD.8-bit mode is best used when speed is required in an application and at least ten I/O pins are available. 4-bit mode requires a minimum of six bits. In 4-bit mode, only the top 4 data bits (DB4-7) are used. The R/S pin is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the pin is high, then the byte at the current LCD Cursor Position can be read or written.

Microcontroller

E R/WW RS

communication s bus

AT89S52

DB7–DB0

8

LCD control

FIG.4.2.5 INTERFACING OF MICROCONTROLLER WITH LCD

4.5 MICROCONTROLLER
MICROCONTROLLER: Microprocessors and microcontrollers are widely used in embedded systems products. Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. The Intel 8051 is Harvard architecture, single chip microcontroller (μC) which was developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early1990s, but today it has largely been superseded by a vast range of enhanced devices with 8051-compatible processor cores that are manufactured by more than 20 independent a
42

manufacturer including Atmel, Infineon Technologies and Maxim Integrated Products.8051 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8051is available in different memory types such as UV-EPROM, Flash and NV-RAM. The present project is implemented on Keil µvision. In order to program the device, Proload tool has been used to burn the program onto the microcontroller. The features, pin description of the microcontroller and the software tools used are discussed in the following section.

4.5.1 FEATURES OF Microcontroller:           8K Bytes of Re-programmable Flash Memory. Internal RAM 256x8 bytes. 2.7V to 6V Operating Range. Fully Static Operation: 0 Hz to 24 MHz. Two-level Program Memory Lock. 32 Programmable I/O Lines. Three 16-bit Timer/Counters. Six Interrupt Sources. Programmable Serial UART Channel. Low-power Idle and Power-down Modes.

Description: The 8051 is a low-voltage, high-performance CMOS 8-bit microcontroller with 8Kbytes of Flash programmable memory. The device is manufactured using Atmel‘s highdensity nonvolatile memory technology and is compatible with the industry-standard MCS51instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the AtmelAT89S52 is a powerful microcomputer, which provides a highly flexible and costeffective solution to many embedded control applications.

In addition, the AT89SXX is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops
43

the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

4.5.2 8051 DESCRIPTION:

The 8051 microcontroller unit is a fast, single-chip, and is a derivative of the 80C51 microcontroller family. It is a fully functional 8-bit embedded controller that executes all ASM51 instructions and has the same instruction set as the 80C51. The 8051 accesses instructions from two kinds of program memory, serves software and hardware interrupt, and provide serial communications interface and timer systems. The 8051 micro controller unit is a high-performance, synthesizable 80C51 function specifically designed for reusability. It can operate at frequencies up to 14 MHz in FLEX® devices. The 8051 consist of the following modules: Functional core—8051 mega function Program memory—Internal_Program_Memory Data memory—Internal_Data_Memory Open-drain I/O pins—OPNDRN The 8051 is an 8-bit microprocessor originally designed in the 1980's by Intel that has gained great popularity since its introduction. Its standard form includes several standard onchip peripherals, including timers, counters, and UART's, plus 4kbytes of on-chip program memory and 128 bytes (note: bytes, not Kbytes) of data memory, making single-chip implementations possible. Its hundreds of derivatives, manufactured by several different companies (like Philips) include even more on-chip peripherals, such as analog-digital converters, pulse-width modulators, I2C bus interfaces, etc. Costing only a few dollars per IC, the 8051 is estimated to be used in a large percentage (maybe 1/2?) all embedded system products. The 8051 memory architecture includes 128 bytes of data memory that are accessible directly by its instructions. A 32-byte segment of this 128-byte memory block is bit addressable by a subset of the 8051 instructions, namely the bit- instructions. External memory of up to 64 Kbytes is accessible by a special "MOVX" instruction. Up to 4 Kbytes
44

of program instructions can be stored in the internal memory of the 8051, or the 8051 can be configured to use up to 64 Kbytes of external program memory. The majority of the 8051's instructions are executed within 12 clock cycles. A typical 8051 contains CPU with Boolean processor, 5 or 6 interrupts, 16-bit timer/counters, programmable full-duplex serial port, 32 I/O lines (four 8-bit ports), RAM and ROM. The 8051 architecture is a tad bizarre, but then so are the architectures of most micro controllers due to their specialization. One vexing problem with the 8051 is its very non-orthogonal instruction set - especially the restrictions on accessing the different address spaces. However, after some time programming the chip, you can get used to it - maybe even appreciate. 8051 has four I/O port (P0, P1, P2, and P3), ored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. One strong point of the 8051 is the way it handles interrupts. Most interrupt routines are very short, and generally can fit into the 8-byte area. Of course if your interrupt routine is longer, you can still jump to the appropriate routine from within the 8 byte interrupt region. The 8051 instruction set is optimized for the one-bit operations so often desired in real-world, real-time control applications. The Boolean processor provides direct support for bit manipulation. This leads to more efficient programs that need to deal with binary input and output conditions inherent in digital-control problems. Bit addressing can be used for test pin monitoring or program control flags

45

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

AT89C51 P1.0 VCC P1.1 P0.0/AD0 P1.2 P0.1/AD1 P1.3 P0.2/AD2 P1.4 P0.3/AD3 P1.5 P0.4/AD4 P1.6 P0.5/AD5 P1.7 P0.6/AD6 RST P0.7/AD7 P3.0/RXD EA/VPP P3.1/TXD ALE/PROG P3.2/INT0 PSEN P3.3/INT1 P2.7/A15 P3.4/T0 P2.6/A14 P3.5/T1 P2.5/A13 P3.6/WR P2.4/A12 P3.7/RD P2.3/A11 XTAL2 P2.2/A10 XTAL1 P2.1/A9 GND P2.0/A8

40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21

FIGURE 4.1.1 AT89C51 PIN DIAGRAM

4.5.2.1 8051 OSCILLATOR AND CLOCK: The heart of the 8051 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 And XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 8051 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHz.

46

FIGURE 4.1.2 OSCILLATOR AND TIMING CIRCUIT 4.5.2.2 TYPES OF MEMORY: The 8051 have three general types of memory. They are on-chip memory, external Code memory and external Ram. On-Chip memory refers to physically existing memory on the micro controller itself. External code memory is the code memory that resides off chip. This is often in the form of an external EPROM. External RAM is the Ram that resides off chip. This often is in the form of standard static RAM or flash RAM. Code memory: Code memory is the memory that holds the actual 8051 programs that is to be run. This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 4K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA. Internal ram: The 8051 have a bank of 128 bytes of internal RAM. The internal RAM is found onchip. So it is the fastest Ram available. And also it is most flexible in terms of reading and writing. Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 128 bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers. Internal RAM also contains 128 bits, which are addressed from 20h
47

to 2Fh. These bits are bit addressed i.e. each individual bit of a byte can be addressed by the user. They are numbered 00h to 7Fh. The user may make use of these variables with commands such as SETB and CLR. 4.5.2.3 SPECIAL FUNCTION REGISTERED MEMORY: Special function registers are the areas of memory that control specific functionality of the 8051 micro controller. Accumulator (0E0h): As its name suggests, it is used to accumulate the results of large no of instructions. It can hold 8 bit values. B register (0F0h): The B register is very similar to accumulator. It may hold 8-bit value. The b register

is only used by MUL AB and DIV AB instructions. In MUL AB the higher byte of the product gets stored in B register. In div AB the quotient gets stored in B with the remainder in A. Stack pointer (81h): The stack pointer holds 8-bit value. This is used to indicate where the next value to be removed from the stack should be taken from. When a value is to be pushed onto the stack, the 8051 first store the value of SP and then store the value at the resulting memory location. When a value is to be popped from the stack, the 8051 returns the value from the memory location indicated by SP and then decrements the value of SP. Data pointer: The SFRs DPL and DPH work together work together to represent a 16-bit value called the data pointer. The data pointer is used in operations regarding external RAM and some instructions code memory. It is a 16-bit SFR and also an addressable SFR. Program counter: The program counter is a 16 bit register, which contains the 2 byte address, which tells the 8051 where the next instruction to execute to be found in memory. When the 8051 is initialized PC starts at 0000h. And is incremented each time an instruction is executes. It is not addressable SFR.

48

PCON (power control, 87h): The power control SFR is used to control the 8051‘s power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of ―sleep mode‖ which consumes much low power.

PCON REGISTER TCON (timer control, 88h): The timer control SFR is used to configure and modify the way in which the 8051‘s two timers operate. This SFR controls whether each of the two timers is running or

stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in TCON SFR. These bits are used to configure the way in which the interrupt occurs. external interrupt flags are activated, which are set when an external

TCON REGISTER TMOD (timer mode, 89h): The timer mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, or 13 bit timer, 8-bit auto reload timer, or two separate timers. Additionally you may configure the timers to only count when an external pin is activated or to count ―events‖ that are indicated on an external pin.

TMOD REGISTER

49

To (timer 0 low/high, address 8A/8C h): These two SFRs taken together represent timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. T1 (timer 1 low/high, address 8B/ 8D h): These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up.. P0 (port 0, address 90h, bit addressable): This is port 0 latch. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P0.0, bit 7 is pin p0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. P1 (port 1, address 90h, bit addressable): This is port latch1. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level P2 (port 2, address 0A0h, bit addressable): This is a port latch2. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. P3 (port 3, address B0h, bit addressable): This is a port latch3. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level IE (interrupt enable, 0A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where the MSB bit is
50

used to enable or disable all the interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit.

IE REGISTER IP (Interrupt Priority, 0B8h): The interrupt priority SFR is used to specify the relative priority of each interrupt. On 8051, an interrupt may be either low or high priority. An interrupt may interrupt interrupts. For e.g., if we configure all interrupts as low priority other than serial interrupt. The serial interrupt always interrupts the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority.

IP REGISTER PSW (program status word, 0D0h): The program Status Word is used to store a number of important bits that are set and cleared by 8051 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the parity flag and the overflow flag. Additionally, it also contains the register bank select flags, which are used to select, which of the ―R‖ register banks currently in use.

PSW REGISTER SBUF (Serial Buffer, 99h): SBUF is used to hold data in serial communication. It is physically two registers. One is writing only and is used to hold data to be transmitted out of 8051 via TXD. The other is read only and holds received data from external sources via RXD. Both mutually exclusive registers use address 99h.

51

4.5.2.4 I/O PORTS: One major feature of a microcontroller is the versatility built into the input/output (I/O) circuits that connect the 8051 to the outside world. The main constraint that limits numerous functions is the number of pins available in the 8051 circuit. The DIP had 40 pins and the success of the design depends on the flexibility incorporated into use of these pins. For this reason, 24 of the pins may each used for one of the two entirely different functions which depend, first, on what is physically connected to it and, then, on what software programs are used to ―program‖ the pins. PORT 0 Port 0 pins may serve as inputs, outputs, or, when used together, as a bi directional low-order address and data bus for external memory. To configure a pin as input, 1 must be written into the corresponding port 0 latch by the program. When used for interfacing with the external memory, the lower byte of address is first sent via PORT0, latched using Address latch enable (ALE) pulse and then the bus is turned around to become the data bus for external memory. PORT 1 Port 1 is exclusively used for input/output operations. PORT 1 pins have no dual function. When a pin is to be configured as input, 1 is to be written into the corresponding Port 1 latch. PORT 2: Port 2 may be used as an input/output port. It may also be used to supply a high – order address byte in conjunction with Port 0 low-order byte to address external memory. Port 2 pins are momentarily changed by the address control signals when supplying the high byte a 16-bit address. Port 2 latches remain stable when external memory is addressed, as they do not have to be turned around (set to 1) for data input as in the case for Port 0. PORT 3: Port 3 may be used to input /output port. The input and output functions can be programmed under the control of the P3 latches or under the control of various special function registers. Unlike Port 0 and Port 2, which can have external addressing functions and change all eight-port b se, each pin of port 3 maybe individually programmed to be used as I/O or as one of the alternate functions. The Port 3 alternate uses are:
52

Pin (SFR) P3.0-RXD (SBUF) P3.1-TXD (SBUF) P3.2-INTO 0 (TCON.1) P3.3 - INTO 1 (TCON.3) P3.4 - T0 (TMOD) P3.5 – T1 (TMOD)

Alternate Use Serial data input Serial data output External interrupt 0 External interrupt 1 External Timer 0 input External timer 1 input

P3.6 - WR

External memory write pulse

P3.7 - RD

External memory read pulse

Table 4.5: PORT 3 Alternate use in 8051 4.5.2.5 INTERRUPTS: Interrupts are hardware signals that are used to determine conditions that exist in external and internal circuits. Any interrupt can cause the 8051 to perform a hardware call to an interrupt –handling subroutine that is located at a predetermined absolute address in the program memory. Five interrupts are provided in the 8051. Three of these are generated automatically by the internal operations: Timer flag 0, Timer Flag 1, and the serial port interrupt (RI or TI) Two interrupts are triggered by external signals provided by the circuitry that is connected to the pins INTO 0 and INTO1. The interrupts maybe enable or disabled, given priority or otherwise controlled by altering the bits in the Interrupt Enabled (IE) register, Interrupt Priority (IP) register, and the Timer Control (TCON) register. . These interrupts are mask able i.e. they can be disabled. Reset is a non maskable interrupt which has the highest priority. It is generated when a high is applied to the reset pin. Upon reset, the registers are loaded with the default values.

53

Each interrupt source causes the program to do store the address in PC onto the stack and causes a hardware call to one of the dedicated addresses in the program memory. The appropriate memory locations for each for each interrupt are as follows:

Interrupt RESET

Address 0000

IE0 (External interrupt 0) 0003 TF0 (Timer 0 interrupt) 000B

IE1 (External interrupt 1) 0013 TF1 (Timer 1 interrupt) SERIAL 001B 0023

Table 4.6 INTERRUPTS EA disable all interrupts. If EA=0, now interrupt is acknowledged. If EA=1, each interrupt source is individually enabled or disabled by setting its enable a lap bit. ---ET2 ES ET1 EX1 ET0 EX0 Not implemented, reserved for future use. Enables or disables timer 2 overflow or capturer interrupt. Enables or disables the serial port interrupt. Enables or disables timer 1 overflow interrupt. Enables or disables timer external interrupt 1. Enables or disables timer 0 overflow interrupt. Enables or disables timer external interrupt 0.

4.5.3 ASYNCHRONOUS SERIAL COMMUNICATION AND DATA FRAMING: The data coming in the receiving end of the data line in a serial data transfer is all 0‘s and 1‘s; it is difficult to make sense of the data unless the sender and receiver agree on a set of rules, a protocol, on how the data is packed, how many bits constitute the character, and when the data begins and ends. Start and Stop bits
54

Asynchronous serial data communication is widely used for character orientation transmissions. In the asynchronous method, each character is placed between start and stop bits. This is called the framing. In data framing for asynchronous communications, the data, such as ASCII characters, are packed in between a start and stop bits. The start bit is always one-bit but the stop bit can be one or two bits. The start bit is always a 0 and the stop bit is 1. Parity Bit In some systems in order to maintain data integrity, the parity bit of the character byte is included in the data frame. This means that for each character we have a single parity bit in addition to start and stop bits. The parity bit is odd or even. In case of odd parity bit the number of data bits of a book of including the parity bit, is even. Data Transfer rate The rate of data transfer in serial data communication is stated in bps or it can be called as baud rate. Baud rate is defined as the number of signal changes per second. As far as the conductor wire is concerned, the baud rates as bps are the same.

Figure 4.1.7. (a) DATA FRAMING

FIGURE 4.1.7(b) DATA TRANSFER BETWEEN 89C51 AND SYSTEM 4.5.3.1 REGISTERS USED FOR COMMUNICATION: SBUF Register: SBUF is an 8 bit register used solely for serial communication in the 8051. For byte of data to be transfers via TxD line, it must be placed in SBUF register. SBUF also holds the byte of data when it is received by the 8051‘s RxD line.
55

The moment a byte is written into SBUF, it is framed with the start and stop bits and transferred serially via TxD line. Similarly when bits are received serially via RxD, the 8051 defames it by eliminating a byte out of the received, and then placing it in the SBUF. SCON (Serial control register): Bit addressable Address location 98H

SCON REGISTER REN- Set or cleared by software to enable or disable reception. TB8- Not widely used RB8- Not widely used TI- Transmits interrupt flag. Set by hardware at the beginning of the stop bit in mode 1. It must be cleared by software RIReceived interrupts flag. Set by hardware halfway through the stop bit mode 1. It must

be cleared by software. SM0 0 0 0 1 SM1 Serial mode 0 Synchronous mode 8-bit data, 1 start bit, 1 stop bit, variable baud rate 1 0 9-bit data, 1 start bit, 1 stop bit, fixed baud rate 1 1 9-bit data, 1 start bit, 1 stop bit, variable baud rate Table 4.7 UART MODES

56

4.5.4 Advantages of using a Microcontroller over Microprocessor A designer will use a Microcontroller to       Gather input from various sensors Process this input into a set of actions Use the output mechanisms on the Microcontroller to do something useful RAM and ROM are inbuilt in the MC. Cheap compared to MP. Multi machine control is possible simultaneously. 8051 (ATMEL), PIC (Microchip), Motorola (Motorola), ARM Processor.

Examples

4.5.5. Applications:     Cell phones. Computers. Robots. Interfacing to two PCS.

57

5.1 Software Tools
 Keil-C

5.1.1 Introduction to Embedded „C‟: Ex: Hitec – c, Keil – c HI-TECH Software makes industrial-strength software development tools and C compilers that help software developers write compact, efficient embedded processor code. For over two decades HI-TECH Software has delivered the industry's most reliable embedded software development tools and compilers for writing efficient and compact code to run on the most popular embedded processors. Used by tens of thousands of customers including General Motors, Whirlpool, Qualcomm, John Deere and many others, HI-TECH's reliable development tools and C compilers, combined with world-class support have helped serious embedded software programmers to create hundreds of breakthrough new solutions. Whichever embedded processor family you are targeting with your software, whether it is the ARM, PICC or 8051 series, HI-TECH tools and C compilers can help you write better code and bring it to market faster. 5.1.2. Embedded „C‟ Compiler         ANSI C - full featured and portable Reliable - mature, field-proven technology Multiple C optimization levels Full linker, with overlaying of local variables to minimize RAM usage Comprehensive C library with all source code provided Includes support for 24-bit and 32-bit IEEE floating point and 32-bit long data types Mixed C and assembler programming Compatible - integrates into the MPLAB IDE, MPLAB ICD and most 3rd-party development tools  Runs on multiple platforms: Windows, Linux, UNIX, Mac OS X, Solaris
58

Embedded Development Environment This environment allows you to manage all of your PIC projects. You can compile, assemble and link your embedded application with a single step. Optionally, the compiler may be run directly from the command line, allowing you to compile, assemble and link using one command. This enables the compiler to be integrated into third party development environments, such as Microchip's MPLAB IDE. 5.2. Embedded System Tools 5.2.1. Assembler An assembler is a computer program for translating assembly language — essentially, a mnemonic representation of machine language — into object code. A cross assembler (see cross compiler) produces code for one type of processor, but runs on another. The computational step where an assembler is run is known as assembly time. Translating assembly instruction mnemonics into op codes, assemblers provide the ability to use symbolic names for memory locations (saving tedious calculations and manually updating addresses when a program is slightly modified), and macro facilities for performing textual substitution — typically used to encode common short sequences of instructions to run inline instead of in a subroutine. Assemblers are far simpler to write than compilers for high-level languages. Assembly Language has Several Benefits: Speed: Assembly language programs are generally the fastest programs around. Space: Assembly language programs are often the smallest Capability: You can do things in assembly which are difficult or impossible in high level languages. Knowledge: Your knowledge of assembly language will help you write better programs, even when using High level languages. An example of an assembler we use in our project is RAD 51.

59

5.2.2 Simulator Simulator is a machine that simulates an environment for the purpose of training or research. We use a UMPS simulator for this purpose in our project. 5.2.3 Compiler A compiler is a program that reads a program in one language, the source language and translates into an equivalent program in another language, the target language. The translation process should also report the presence of errors in the source program. Source Program → → Target Program

Compiler



Error Messages

There are two parts of compilation. The analysis part breaks up the source program into constant piece and creates an intermediate representation of the source program. The synthesis part constructs the desired target program from the intermediate representation. Similarly, intermediate code generator takes a tree as an input produced by semantic analyzer and produces intermediate code. 5.3. User Interfaces User interfaces for embedded systems vary widely, and thus deserve some special comment. User interface is the ultimate aim for an embedded module as to the user to check the output with complete convenience. One standard interface, widely used in embedded systems, uses two buttons (the absolute minimum) to control a menu system (just to be clear, one button should be "next menu entry" the other button should be "select this menu entry").

60

Another basic trick is to minimize and simplify the type of output. Designs sometimes use a status light for each interface plug, or failure condition, to tell what failed. A cheap variation is to have two light bars with a printed matrix of errors that they select- the user can glue on the labels for the language that he speaks. For example, most small computer printers use lights labeled with stick-on labels that can be printed in any language. In some markets, these are delivered with several sets of labels, so customers can pick the most comfortable language. In many organizations, one person approves the user interface. Often this is a customer, the major distributor or someone directly responsible for selling the system. 5.4 Platform There are many different CPU architectures used in embedded designs such as ARM, MIPS, Coldfire/68k, PowerPC, X86, PIC, 8051, Atmel AVR, H8, SH, V850, FR-V, M32R etc. This in contrast to the desktop computer market, which as of this writing (2003) is limited to just a few competing architectures, mainly the Intel/AMD x86, and the Apple/Motorola/IBM PowerPC, used in the Apple Macintosh. With the growing acceptance of Java in this field, there is a tendency to even further eliminate the dependency on specific CPU/hardware (and OS) requirements. Standard PC/104 is a typical base for small, lowvolume embedded and ruggedized system design. These often use DOS, Linux or an embedded real-time operating system such as QNX or Inferno. A common configuration for very-high-volume embedded systems is the system on a chip, an application-specific integrated circuit, for which the CPU was purchased as intellectual property to add to the IC's design. A related common scheme is to use a fieldprogrammable gate array, and program it with all the logic, including the CPU. Most modern FPGAs are designed for this purpose. 5.5 Tools Like typical computer programmers, embedded system designers use compilers, assemblers, and debuggers to develop embedded system software. However, they also use a few tools that are unfamiliar to most programmers.
61

Software tools can come from several sources:   Software companies that specialize in the embedded market. Ported from the GNU software development tools. Sometimes, development tools for a personal computer can be used if the embedded processor is a close relative to a common PC processor. Embedded system designers also use a few software tools rarely used by typical computer programmers. One common tool is an "in-circuit emulator" (ICE) or, in more modern designs, an embedded debugger. This debugging tool is the fundamental trick used to develop embedded code. It replaces or plugs into the microprocessor, and provides facilities to quickly load and debug experimental code in the system. A small pod usually provides the special electronics to plug into the system. Often a personal computer with special software attaches to the pod to provide the debugging interface. Another common tool is a utility program (often home-grown) to add a checksum or CRC to a program, so it can check its program data before executing it. An embedded programmer that develops software for digital signal processing often has a math workbench such as MATHCAD or Mathematics to simulate the mathematics. Less common are utility programs to turn data files into code, so one can include any kind of data in a program. A few projects use Synchronous programming languages for extra reliability or digital signal processing. 5.5.1 Debugging The LPC2141/42/44/46/48 support emulation and debugging via a JTAG serial port. A trace port allows tracing program execution. Debugging and trace functions are multiplexed only with GPIOs on Port 1. This means that all communication, timer and interface peripherals residing on Port 0 are available during the development and debugging phase as they are when the application is run in the embedded system itself.

62

5.5.2 Embedded ICE Standard ARM Embedded ICE logic provides on-chip debug support. The debugging of the target system requires a host computer running the debugger software and an Embedded ICE protocol convertor. Embedded ICE protocol convertor converts the remote debug protocol commands to the JTAG data needed to access the ARM core. The ARM core has a Debug Communication Channel (DCC) function built-in. The DCC allows a program running on the target to communicate with the host debugger or another separate host without stopping the program flow or even entering the debug state. The DCC is accessed as a co-processor 14 by the program running on the ARM7TDMI-S core. The DCC allows the JTAG port to be used for sending and receiving data without affecting the normal program flow. The DCC data and control registers are mapped in to addresses in the Embedded ICE logic. This clock must be slower than 1 6 of the CPU clock (CCLK) for the JTAG interface to operate.

63

OVERALL SYSTEM RESULT

Thus from this FINGER PRINT BASED ATM we are able to operate as usual as the present ATM system that we are currently using we include this FINGER PRINT where the security is provided and also we provide the for each and every user to whom they registered the account. The system we developed is working accordingly as we supposed.

Fig 6.1 Finger Print based ATM Security System

64

CONCLUSION AND FUTURE SCOPE

7.1CONCLUSION Easy-to-use design environment— It was a challenge for us to gain basic knowledge about software and hardware development and conduct systematic design, implementation of FINGER PRINT BASED ATM SECURITY SYSTEM has been successfully designed and tested. Integrated features of all the hardware components used and developed it. Presence of module has been reasoned out and placed carefully thus contributing to the best working of the unit .Secondly using high advanced ICs and with the help of growing technology the project has been successfully implemented. Every coin has two sides. Similarly although our project provides more security it is slightly expensive task. 7.2 FUTURE SCOPE In this project we can only withdraw our money. By extending this project we can deposit our money also. This is another mode of operation. First system asks us to enter the amount. Whenever we are depositing our money the machine itself taking the money and calculate the amount. If both the amounts are equal then that money is transferred to our account.

65

BIBLIOGRAPHY

[1] Fingerprint Identification System Based on the Nios II Processor by Linchuan Li, Yao Zhang, Chengdong Ge [2] Introduction to embedded system by Rajkamal

[3] Characteristics of biometric system by Cernet

[4] The art of electronics by Horowitz

[5] www atmel.databook.com [6] www.kiel.com [7] www.embedded.com [8] www.wikipedia.com

66

67

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close