Menu Close

GT511C3- Enroll and Get Finger Print ID

Robo India presents tutorial on GT-511C3 FPS (Fingerprint Scanner). This tutorial explains how to enroll fingerprints in  FPS module and to get enroll id of scanned fingerprints.  

Detailed Tutorial.

1. Introduction:

The GT-511C3 FPS (fingerprint scanner) is a small embedded module that consists of an optical sensor mounted on a small circuit board. The optical sensor scans a fingerprint and the microcontroller and software provides the modules functionality which automatically processes the scanned fingerprint. The module can be used in projects for identifying users, for example allowing access through a door by scanning a finger print instead of using a key.

To get started, just register each fingerprint that you want to store by sending the corresponding command and pressing your finger against the reader three times.

The user can store the finger print data in the module and can configure it in 1:1 or 1: N mode for identifying the person. This module can directly interface with any 3.3V or 5V microcontrollers, but a suitable level converter/serial adapter is required for interfacing with the serial port of a PC. A logic level converter is a mediator so that two devices can communicate which works on different voltage level.

2. Hardware required

S.No.ItemQuantity
1.Arduino 1
2.Breadboard 1
3.Fingerprint Scanner- TTL (GT-511C3) 1
4.Logic Level Convertor 1
5.Male to Female Jumper Wires 8
6.Male to Male Jumper Wires 6

3. Hardware Interfacing: 

The interface of the FPS is very basic consisting of only four pins – power, ground, serial transmit and serial receive.

Pin 1 is the transmit pin on the FPS and transmits a logic high of up to a maximum of 3.3V. The default baud rate is 9600bps after power on.

Pin 2 is the receive pin on the FPS and can receive a logic high level of up to 3.3V. The voltage level sent to this pin from a microcontroller needs to be reduced when working with 5V microcontrollers.

Pin 3 is the common GND or 0V pin of the FPS module.

Pin 4 is the 5V input to the FPS module used to power it. This value can be between 4.5V and 6V.

FPS Connector: The 4 pin connector on the board is a JST-SH series connector with 1mm pin spacing.

4. Connecting with Arduino UNO.

When connecting to a microcontroller that uses 5V voltage levels on its pins, a level converter must be used to reduce the 5V output from the microcontroller to the FPS module because the FPS module can only handle 3.3V on its UART pins. we have used logic level converter instead using resistors as logic level converter do a much better job for this. A logic level converter is a mediator so that two devices can communicate which works on different voltage level.

The circuit diagram below shows the fingerprint scanner module connected to an Arduino Uno.

5. Library File

Following library will be required to run this sketch. Download the zip file extract the same and copy this to your Arduino library folder.

This library file should be placed at the install folder of Arduino. I have a 64 bit Win7 OS and my arduino library folder address is located at

C:\Program Files (x86)\Arduino\libraries 

You may download library file from here.

6. Programming

You may download this Arduino Sketch to Enroll ID from here.

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

FPS_GT511C3 fps(5, 4);          //    digital pin 5(arduino Tx, fps Rx)
                                //    digital pin 4(arduino Rx, fps Tx)
void setup()
{
  Serial.begin(9600);           //default baud rate
	delay(100);
	fps.Open();
	fps.SetLED(true);

	Enroll();
}


void Enroll()
{
	int enrollid = 0;             // find open enroll id
	bool okid = true;
	while (okid == true)
	{
		okid = fps.CheckEnrolled(enrollid);
		if (okid==true) enrollid++;
	}
	fps.EnrollStart(enrollid);   // enroll

	
	Serial.print("Press finger to Enroll #"); 
	Serial.println(enrollid);
	while(fps.IsPressFinger() == false) delay(100);
	bool bret = fps.CaptureFinger(true);
	int iret = 0;
	if (bret != false)
	{
		Serial.println("Remove finger");
		fps.Enroll1(); 
		while(fps.IsPressFinger() == true) delay(100);
		Serial.println("Press same finger again");
		while(fps.IsPressFinger() == false) delay(100);
		bret = fps.CaptureFinger(true);
		if (bret != false)
		{
			Serial.println("Remove finger");
			fps.Enroll2();
			while(fps.IsPressFinger() == true) delay(100);
			Serial.println("Press same finger yet again");
			while(fps.IsPressFinger() == false) delay(100);
			bret = fps.CaptureFinger(true);
			if (bret != false)
			{
				Serial.println("Remove finger");
				iret = fps.Enroll3();
				if (iret == 0)
				{
					Serial.println("Enrolling Successfull");
				}
				else
				{
					Serial.print("Enrolling Failed with error code:");
					Serial.println(iret);
				}
			}
			else Serial.println("Failed to capture third finger");
		}
		else Serial.println("Failed to capture second finger");
	}
	else Serial.println("Failed to capture first finger");
}


void loop()
{
	delay(100);
}

You may download this Arduino Sketch to get ID from here.

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

FPS_GT511C3 fps(5, 4);          //    digital pin 5(arduino Tx, fps Rx)
                                //    digital pin 4(arduino Rx, fps Tx)
void setup()
{
  Serial.begin(9600);           //default baud rate
	delay(100);
	fps.Open();
	fps.SetLED(true);
}

void loop()
{

	// Identify fingerprint test
	if (fps.IsPressFinger())
	{
		fps.CaptureFinger(false);
		int id = fps.Identify1_N();
		if (id <200)
		{
			Serial.print("Verified ID:");
			Serial.println(id);
		}
		else
		{
			Serial.println("Finger not found");
		}
	}
	else
	{
		Serial.println("Please press finger");
	}
	delay(100);
}

7. Output

Upload the Enroll_ID code, open the serial monitor and press your finger on FPS module three times. Successfully Enrolling message will shown with ID highlighted in image below.

To read enrolled id, upload the another code and press finger on FPS module. ID related to scanned finger print will display on serial monitor.

You can also delete the stored ID from database of module using fps.DeleteID(id_to_remove) function and fps.DeleteAll(); function to delete all data.

If you have any query please write us at support@roboindia.com

Thanks and Regards
Content Development Team 
Robo India
https://roboindia.com

1 Comment

  1. prerana p

    sir how to enroll finger print id in gts-511c3 using arduino uno i download the library through the link which is there in this website still not getting finger sensor led glow please reply as soon as possible sir

Leave a Reply