Anda di halaman 1dari 39

Biometric Authentication System for vehicles with SMS Alert and Password assistance

External Project at K.M.V Mechatronics Pvt.Ltd., Chennai.

By, N.VIGNESH (9908005372),ECE-F R.R.VIJAY (9908005375),ECE-F S.VINOTH KUMAR (9908005380),ECE-F

INTERNAL GUIDE Mr.Radeep Krishna (ASSISTANT PROFESSOR-ECE) EXTERNAL GUIDE Mr.Satish Kumar (PROJECT CO-ORDINATOR) KMV MECHATRONICS PVT.LTD.,

Abstract

To protect our vehicles from theft, the present mechanical key

based security system should be replaced with biometric fingerprint


based ignition lock system. The entire circuit of this project provides an anti-theft device for vehicles. The technology used in this device is based

on biometrics and embedded systems.


In this project, the biometric fingerprint based key system is accessed only by the authorized person or owner of the vehicle for starting the vehicle.

If any unauthorized person tries to start the vehicle (ie., invalid


password) an SMS is sent to the predefined number.

Technology used consists of


system.

biometric fingerprint based authentication

The fingerprint scanner module

is used to scan the fingerprint of the

authorized persons.
The authorization of a person is verified by the 8051 program which is written in embedded C and burns it into the 89S52 microcontroller flash memory. A GSM modem is interfacing to 89S52 microcontroller to provide the SMS alerts when the unauthorized persons try to access the vehicle ignition lock.

Block Diagram

Biometric Technology (Schema : Fingerprint) Password Authentication GSM Communication

Literature Review

Efficient Fingerprint-based User Authentication for Embedded Systems IEEE JOURNAL Aim: To provide authentication at Biometric level Tech: Embedded systems Result: Successfully implemented with some shrotcomings Conclusion: An efficient architecture for performing fingerprint-based user authentication in embedded systems. Author: Pallav Gupta et.al., Journal: IEEE transaction Journal Year:2006 Vol:14.5 Page no:244-247

Implementation of the system

Developed AVR Microcontroller unit

Developed Fingerprint Scanner Module unit


Developed Interfacing LCD display with AVR Microcontroller unit Developed GSM modem interfacing

AVR Microcontroller Specifications (in Keil Microvision)

Chip type : ATmega162Program type

ApplicationClock frequency : 11.059200 MHzMemory model


SmallExternal RAM size : 0 Data Stack size : 256

The ATmega162 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega162 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.

Initializing AVR microcontroller in Embedded C

#include <mega162.h>
#include <delay.h> #asm .equ __lcd_port=0x15 ; PORTC#endasm

AVR Pin Configurations

LCD Coding in Keil Microvision Algorithm Initialize the LCD library file by enabling <lcd.h> Initialize the LCD with two lines, 4X4 matrix Clear the Register, Read/Write and SET the ENABLE PIN on the LCD

Define some BUFFER SIZE


Call some DELAY Clear the ENABLE pin of the LCD Set the DISPLAY ON and CURSOR ON STOP the LCD loop program in PORT-A

FLOW CHART (for LCD Display)


START

Initialize the 2 line display with 4x4 matrix

Clear the register, r/w pins and SET the enable pin on the lcd
Call some delay ; define buffer size

Set the display and cursor ON

on password input
no

yes

password match

access denied

Fingerprint Scanner coding Algorithm Read the image obtained from the users finger

If it is, enroll mode, save the image and display Enroll Success
Check if the obtained image already exists in the memory If it is present, start the comparison of both images

Store the image in FVS image format


Process the image as follows: i) Edge Detection ii)Thin Image and Skeletonize Image On match of Fingerprint display Match Success On mismatch of fingerprint display Match Failure

FLOW CHART (Fingerprint Scanner)

START

Read image

Process image

Second process image

Match prints

Process of Image Retrieval

Primarily provided and implemented by program, but have one file format for testing purposes

File does exist?

If file exist?

Open file

Read image data

Store data in FVS image format

FVS Image Format

Vector operator[]

Matrix Width Height resize operator[]

Private myVector

resize Private myMatrix (Vector of Vector)

Detailed Flowchart of Image Processing

Provided that image has not be previously processed:

Edge Detection (Binarize remove all color leaving only two)

Thin image, skeletonize image

Detailed Flowchart of Edge Detection

x width

y height

Get pixel @ (x,y)

Run pixel through the formula

Repla ce pixel with new color

Logarithm formula: New pixel value = round(log((1.0)/((double)(srcpixel) + 20)) * 70.0) / log(2) * - 255.0)

Detailed Flowchart of Matching Prints

Match with shift, match up lines, if certain percentage of line pixels match continue to second matching function

Find minutiaes in both images compare (x,y) location, type (branching or ending), and degree made by line

Find minutiaes

SMS (using GSM Technique) coding

Algorithm Define the desired mobile number to receive SMS Set the GSM in TEXT mode Select SIM memory for SMS Storage

Delete all SMS in SIM Memory


On match of fingerprint, do nothing; Start the engine On mismatch of fingerprint/password block the ignition Display Try again in LCD Send GSM SMS message to the predefined number Terminate the loop; do nothing

Flow chart (for GSM SMS Alert)


Start

Check for the predefined number

Set GSM modem in TEXT mode

Check the input password

correct

Start the engine

wrong

Send Intruder SMS alert

Softwares Used

Electronics Workbench V 10.0 (for design and tutorial)

Quite Universal Circuit simulator (QUCS) (for simulation of circuits)


Keil Microvision V 3.0 (for programming in Embedded C) Super pro (for dumping the program into the microcontroller)

Result and Conclusion

With the use of biometric technology the conventional mechanical key ignition system was

replaced. Thereby enhancing the security premises of the vehicle. The SMS alert prompts the
user , whenever the Someone tries to tamper the security features. In this manner, the user can have the information whenever unauthoriesd action is performed against the safety of the vehicle.So, the end result seems as by integrating the biometric technology, the security of the vehicle is elated to another degree.

Reference

[i] Pallav Gupta et.al., Efficient Fingerprint-based User Authentication for Embedded Systems ,IEEE Journal,14.5,244-247,June,2005. [ii] Yagiz Sutcu et.al., Secure Biometric Templates from Fingerprint-Face Features,IEEE Journal,7,1-7,July 2007. [iii] Seira Hidano et.al., On Biometric Encryption using Fingerprint and Its Security Evaluation,IEEE Journal,1,950-956,december,2008. [iv] NGUYEN Thi Hoang Lan et.al., An Approach to Protect Private Key using Fingerprint Biometric Encryption Key in BioPKI based Security System,IEEE Jorunal,3,1595-1599,December,2008

References Contd.,

[v] Zhu Yanqiong et.al., Security Authentication Scheme Based on Certificateless Signature and Fingerprint Recognition ,IEEE Journal,7,817820,April,2011. [vi] http://www.biometrics.org/research.php

[vii] http://www.calsoftlabs.com/whitepapers/biometrics-technologies.html
[viii]http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=0628674&url=ht tp%3A%2F%2Fieeexplore.ieee.org%2Fiel3%2F5%2F13673%2F00628674.p df [xi]http://www.eyenetwatch.com/Biowebserver/fingerprint_authentication.h tm

Reference contd.,

[x] http://ugpro143.blogspot.in/2009/03/fingerprint-analysis-forfingerprint.html [xi] http://scialert.net/fulltext/?doi=jas.2008.2939.2948

APPENDIX

LCD Coding in Atmega162

#include <lcd.h> #define bit_get(p,m) ((p) & (m)) #define bit_set(p,m) ((p) |= (m)) #define bit_clear(p,m) ((p) &= ~(m)) #define bit_flip(p,m) ((p) ^= (m)) #define bit_write(c,p,m) (c ? bit_set(p,m) : bit_clear(p,m)) #define BIT(x) (0x01 << (x)) #define LONGBIT(x) ((unsigned long)0x00000001 << (x)) #define row1 PINA.0 #define row2 PINA.1 #define row3 PINA.2 #define row4 PINA.3 #define RXB8 1 #define TXB8 0 #define UPE 2

#define OVR 3 #define FE 4 #define UDRE 5 #define RXC 7 #define FRAMING_ERROR (1<<FE) #define PARITY_ERROR (1<<UPE) #define DATA_OVERRUN (1<<OVR) #define DATA_REGISTER_EMPTY (1<<UDRE) #define RX_COMPLETE (1<<RXC) #define RX_BUFFER_SIZE1 64char rx_buffer1[RX_BUFFER_SIZE1]; #if RX_BUFFER_SIZE1<256 unsigned char rx_wr_index1,rx_rd_index1,rx_counter1; #else unsigned int rx_wr_index1,rx_rd_index1,rx_counter1; #endifbit rx_buffer_overflow1; interrupt [USART1_RXC] void usart1_rx_isr(void) { char status,data; status=UCSR1A; data=UDR1;

if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0) { rx_buffer1[rx_wr_index1]=data; if (++rx_wr_index1 == RX_BUFFER_SIZE1) rx_wr_index1=0; if (++rx_counter1 == RX_BUFFER_SIZE1) { rx_counter1=0; rx_buffer_overflow1=1; }; };} #pragma used+char getchar1(void) {char data; while (rx_counter1==0); data=rx_buffer1[rx_rd_index1]; if (++rx_rd_index1 == RX_BUFFER_SIZE1) rx_rd_index1=0; #asm("cli")--rx_counter1; #asm("sei")return data;} #pragma used#pragma used+ void putchar1(char c) { while ((UCSR1A & DATA_REGISTER_EMPTY)==0); UDR1=c; }

#pragma used#include <stdio.h> unsigned char i, temp_data[20];bit match=0;int l,i_pos,w,y; unsigned char no[16],z,q,here,lock=0,used1=0; void flush_buffer() { #asm("cli") rx_counter1=0; rx_rd_index1=0; rx_wr_index1=0; #asm("sei")} void ok() { lcd_clear(); lcd_putsf("OKAY"); delay_ms(300); lcd_clear(); } void error() { lcd_clear(); lcd_putsf("ERROR"); delay_ms(300); lcd_clear(); } void lcd_putint(int val,unsigned int field_length)

{ char str[5]={0,0,0,0,0}; int i=4,j=0; while(val) { str[i]=val%10; val=val/10; i--; } if(field_length==-1) while(str[j]==0) j++; else j=5-field_length; if(val<0) lcd_putchar('-'); for(i=j;i<5;i++) { lcd_putchar(48+str[i]); } }void check_on() { l++; if(l==5) l=1; switch(l) {

case 4: bit_clear(PORTA,BIT(4)); bit_set(PORTA,BIT(5)); bit_set(PORTA,BIT(6)); bit_set(PORTA,BIT(7)); break; case 3: bit_set(PORTA,BIT(4)); bit_clear(PORTA,BIT(5)); bit_set(PORTA,BIT(6)); bit_set(PORTA,BIT(7)); break; case 2: bit_set(PORTA,BIT(4)); bit_set(PORTA,BIT(5)); bit_clear(PORTA,BIT(6)); bit_set(PORTA,BIT(7)); break; case 1: bit_set(PORTA,BIT(4)); bit_set(PORTA,BIT(5)); bit_set(PORTA,BIT(6)); bit_clear(PORTA,BIT(7)); break; }

void okay() { bit_set(PORTA,BIT(7)); bit_set(PORTA,BIT(6)); bit_set(PORTA,BIT(5)); bit_clear(PORTA,BIT(4)); while(row4==1 && row3==1 && row2==1 && row1==1); w=0; if((no[0]==5) && (no[1]==0) && (no[2]==5) && (no[3]==0) && used1==0) w=4; //5050 lcd_clear(); lcd_gotoxy(0,0); lcd_putsf("VERIFYING..."); delay_ms(1000); lcd_clear(); if(w==4) { lcd_gotoxy(0,0); lcd_putsf("Password Match"); delay_ms(2000); lock=1; match=1; } else { lcd_gotoxy(0,0);

lcd_putsf("Access Denied"); delay_ms(2000); lcd_clear(); lock=0; match=0; } } void move_to_lib()

Coding For Enrolling FingerPrint


//Rx_Flush flush_buffer(); //Enroll command putchar1(0x02); putchar1(0x00); putchar1(0x04); putchar1(0x10); putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x14); putchar1(0x03); delay_ms(2000); for(i=0;i<4;i++) temp_data[i]=getchar1(); if(temp_data[0]==0x02 && temp_data[1]==0x00 && temp_data[2]==0x02 && temp_data[3]==0x00)

{ delay_ms(300); } else { delay_ms(300); goto failure; } //Rx_Flush flush_buffer(); //move to lib command putchar1(0x02); putchar1(0x00); putchar1(0x05); putchar1(0x21); putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x0a); putchar1(0x2e); putchar1(0x03); delay_ms(1000); for(i=0;i<8;i++) temp_data[i]=getchar1(); if(temp_data[0]==0x02 && temp_data[1]==0x00 && temp_data[2]==0x04 && temp_data[3]==0x00) { delay_ms(300);

lcd_clear(); lcd_putsf("Enroll Success"); lcd_gotoxy(0,1); lcd_putsf("Enroll Id:"); lcd_gotoxy(10,1); lcd_putint(temp_data[6],3); delay_ms(400); lcd_clear(); } else { failure: error(); delay_ms(300); } } void sample_search()

Fingerprint Matching Stage Coding


//Rx_Flush flush_buffer(); //sample and search command 0x02 0x00 0x08 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xba 0x03 putchar1(0x02); putchar1(0x00); putchar1(0x08); putchar1(0x32);

putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x80); putchar1(0xba); putchar1(0x03); delay_ms(2000); for(i=0;i<=10;i++) temp_data[i]=getchar1(); if(temp_data[0]==0x02 && temp_data[1]==0x00 && temp_data[2]==0x08 && temp_data[3]==0x00) { ok(); delay_ms(300); match=1; lcd_clear(); lcd_putsf("Match Success"); lcd_gotoxy(0,1); // lcd_putsf("Match Id:"); lcd_gotoxy(10,1);// lcd_putint(temp_data[10],3); delay_ms(500); }

else { match=0; lcd_clear(); lcd_putsf("Match Failure"); delay_ms(400); } } void clear_library() //Rx_Flush flush_buffer(); //Erase command putchar1(0x02); putchar1(0x00); putchar1(0x05); putchar1(0x20); // putchar1(0x00); putchar1(0x00); putchar1(0x00); putchar1(0x0A); putchar1(0x2F); putchar1(0x03); delay_ms(2000); for(i=0;i<4;i++) temp_data[i]=getchar1(); if(temp_data[0]==0x02 && temp_data[1]==0x00 && temp_data[2]==0x02 && temp_data[3]==0x00) { lcd_gotoxy(0,1); delay_ms(300);

} else { error(); delay_ms(300); } }

Coding For Prompting with SMS via GSM (on unauthorised attempt)
unsigned char mobile_num[14]="+919944722933"; void GSM_init() { printf("AT"); putchar(0x0D); delay_ms(150); // Set GSM Modem in TEXT MODE printf("AT+CMGF=1"); putchar(0x0D); // enter key delay_ms(100); printf("AT+CSMP=17,167,0,0"); putchar(0x0D); // enter key delay_ms(150);

//Select SIM Memory for SMS Storage printf("AT+CPMS="); putchar('"'); putchar('S'); putchar('M'); putchar('"'); putchar(0x0D); // enter key delay_ms(100); //Delete All SMS in SIM Memory// printf("AT+CMGD=");// putchar('1');putchar(','); putchar('4');// putchar(0x0D); // enter key// delay_ms(12000); } void GSM_send_msg() { printf("AT+CMGS="); putchar('"'); for(i=0;i<13;i++) { putchar(mobile_num[i]); delay_ms(150); } putchar('"'); putchar(0x0D);

// enter key delay_ms(150); printf("BIKE THEFT ALERT") ; delay_ms(300); putchar(26); // send ctrl + Z putchar(0x0D); delay_ms(1000); putchar(0x0D); printf("AT"); putchar(0x0D); // enter delay_ms(150); } void main(void) { #pragma optsize-CLKPR=0x80; CLKPR=0x00; #ifdef _OPTIMIZE_SIZE_ #pragma optsize+ #endifPORTA=0x0F; DDRA=0xF0; PORTB=0x00; DDRB=0x00; PORTC=0x00; DDRC=0x00; PORTD=0x00; DDRD=0x00; PORTE=0x00; DDRE=0x07;

TIMSK=0x00; ETIMSK=0x00; UCSR0A=0x00; UCSR0B=0x18; UCSR0C=0x86; UBRR0H=0x00; UBRR0L=0x47; UCSR1A=0x00; UCSR1B=0x98; UCSR1C=0x86; UBRR1H=0x00; UBRR1L=0x47; ACSR=0x80; lcd_init(16); lcd_putsf("Initializing..") ; GSM_init(); lcd_clear(); delay_ms(1000); #asm("sei") check_on(); switch(l) { case 1: if(row1==0) { lcd_putsf("ENROLL MODE"); //Press * clear_library(); move_to_lib() ;

} if(row2==0) { lcd_putsf("FINGER PRINT MODE"); //Press 7 goto vote; } break; } l=0; i_pos=7; here=0; z=0; q=0; lcd_gotoxy(0,0); lcd_putsf("ENTER PASSWORD"); while (1) { check_on(); switch(l) { case 1: if(row1==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("*"); no[q++]=10; } else if(row2==0)

{ lcd_gotoxy(i_pos++,1); lcd_putsf("7"); z++; no[q++]=7; else if(row3==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("4"); z++; no[q++]=4; } else if(row4==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("1"); z++; no[q++]=1; } break; case 2: if(row1==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("0"); z++; no[q++]=0; } else if(row2==0) {

lcd_gotoxy(i_pos++,1); lcd_putsf("8"); z++; no[q++]=8; } else if(row3==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("5"); z++; no[q++]=5; } else if(row4==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("2"); z++; no[q++]=2; } break; case 3: if(row1==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("#");z++; no[q++]=11; } else if(row2==0) {

lcd_gotoxy(i_pos++,1); lcd_putsf("9"); z++; no[q++]=9; } else if(row3==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("6"); z++; no[q++]=6; } else if(row4==0) { lcd_gotoxy(i_pos++,1); lcd_putsf("3");z++; no[q++]=3; } break; case 4: if(row1==0) { lcd_gotoxy(--i_pos,1); lcd_putsf(" "); q=q-1; z=z-1; } else if(row2==0) { lcd_clear();

okay(); } else if(row3==0) { lcd_clear(); okay(); } else if(row4==0) { lcd_clear(); okay(); } break; } if(z==4) { delay_ms(500); lcd_clear(); lcd_gotoxy(0,0); lcd_putsf("PRESS ENTER"); y++; okay(); if(lock==1) goto engine_start; z=0; delay_ms(1000); lcd_clear(); l=0; i_pos=7;

here=0; z=0; q=0; lcd_gotoxy(0,0); lcd_putsf("ENTER PASSWORD"); } delay_ms(100);}; vote: sample_search(); if(match==1) goto engine_start; else if(match==0) { lcd_clear(); lcd_putsf("Try again.."); delay_ms(500); sample_search(); if(match==1) goto engine_start; else if(match==0) { lcd_clear(); lcd_putsf("Intruder Alert"); /// SEND GSM MSG GSM_send_msg(); GSM_send_msg(); while(1); } } engine_start:

//START ENGINE delay_ms(400); lcd_clear(); lcd_putsf("Ignition On"); bit_set(PORTE,BIT(0)); bit_set(PORTE,BIT(1)); bit_set(PORTE,BIT(2)); while(1); }

Anda mungkin juga menyukai