In today’s secure world biometric safety is on the top. Unlike other techniques which make use of passwords and numbers, that are needed to be remembered, biometric techniques make use of human body parts like fingerprints or even iris of your eyes and as we know that these things are unique to all thus it makes biometric systems the most effective over others. In this project I have interfaced a very popular fingerprint scanner . This module communicates over UART protocol with microcontroller i.e. it makes use of Rx and Tx pin of microcontroller to interact with it.
Now talking about this module, it comes preloaded with scanner as well as detection section and we are left with 4 pins for connections. These 4 pins are: VCC, GND, Rx and Tx. It works over 3.3 to 5V supply and its Rx and Tx pin is connected to Tx and Rx pin of the microcontroller respectively. The mode is semi duplex asynchronism serial communication and the default baud rate is 57600bps but it can be changed between 9600~115200bps.
At power on, it takes about half a second for initialization, during this period the module can’t accept commands. The system sets aside a 512-bytes memory (16 pages X 32 bytes) for user’s notepad, where data requiring power-off protection can be stored. There is an image buffer and two 512-byte-character-file buffers within the RAM space of the module. This buffer serves for image storage and the image format is 256*288 pixels. Two character file buffers can be used to store both character file and template file. System sets aside a certain space within Flash for fingerprint template storage, that’s fingerprint library. It is nonvolatile in nature. This module also serves the purpose for providing any 32 bit random number.
When communicating, the transferring and receiving of command/data/result are all wrapped in data package format.
ADDER: Default value is 0xFFFFFFFF, which can be modified by command. High byte transferred first and at wrong adder value, module will reject to transfer.HEADER: Fixed value of 0xEF01
PACKAGE IDENTIFIER: Its size is one byte. 01H for command packet and 07H for acknowledge packet.
PACKAGE LENGTH: Refers to the length of package content (command packets and data packets) plus the length of Checksum ( 2 bytes). Unit is byte. Max length is 256 bytes.
PACKAGE CONTENTS: It can be commands, data and command’s parameters, acknowledge result, etc. (fingerprint character value, templates are all deemed as data)
CHECKSUM: The arithmetic sum of package identifier, package length and all packages contends. Overflowing bits are omitted. High byte is transferred first.
Let me clear this concept with an example:-
To change the Modules Address, a command package like this is needed to be sent to it: If change becomes successful this type of acknowledge package will be received by it: *If there will be any error while doing this task, this CODE will change to 0x01.
If change becomes successful this type of acknowledge package will be received by it:
Coming back to this project I have made use of only few functions out of several. These are:
When enrolling, user needs to enter the finger two times. The system will process the two time finger images, generate a template of the finger based on processing results and store the template. When matching, user enters the finger through optical sensor and system will generate a template of the finger and compare it with templates of the finger library. For 1:1 matching, system will compare the live finger with specific template designated in the Module; for 1:N matching, or searching, system will search the whole finger library for the matching finger. In both circumstances, system will return the matching result, success or failure.
Here N is the maximum number of templates flash library can store. Mine has 1000.
I would recommend going through its datasheet and understanding how to communicate with it and see what all functions it can perform. I have attached the PDF file of the same in this folder itself.
In this project you will see that on powering up the microcontroller the fingerprint module will take certain time to initialize itself, thus I have given it plenty of delay time to do so. Also the status will be shown on a 16X2 LCD and some LEDS as well.
LCD is connected to PORTB and will work under 4 bit mode. LEDs are connected with PORTC.
Header files used in my coding part have been attached inside this folder itself.