Overview
In this tutorial we will learn about Interfacing GT511C3 Fingerprint Sensor Module with Arduino. There are many fingerprint sensors available in the market and we used R305/R307 Optical fingerprint sensors in some earlier projects like Attendance System and Biometric Security System. But the GT511C3 is a more advanced fingerprint sensor with high accuracy and faster response time. Instead of the optical method, it uses a camera image processing method to detect fingerprints. A better fingerprint sensor is R502/R503 which is a Capacitive Type fingerprint sensor with fast and better response.
In this post, we will go through the details and specifications of the GT511C3 fingerprint sensor. We will also learn how to use the official SDK of this fingerprint sensor to register, test, and delete fingerprints. Apart from this, we will interface the GT511C3 Fingerprint Sensor with Arduino using the Library and then learn the method to enroll and test fingerprints.
Bill of Materials
| S.N. | Components Name | Quantity | Purchase Links |
|---|---|---|---|
| 1 | Arduino UNO Board | 1 | Amazon | AliExpress |
| 2 | GT511C3 Fingerprint Sensor | 1 | Amazon |
| 3 | 16X2 LCD Display | 1 | Amazon | AliExpress |
| 4 | Resistor 1K | 1 | Amazon | AliExpress |
| 5 | Resistor 2K | 1 | Amazon | AliExpress |
| 6 | Potentiometer 10K | 1 | Amazon | AliExpress |
| 7 | Push Button Switch | 1 | Amazon | AliExpress |
| 8 | Connecting Wires | 20 | Amazon | AliExpress |
| 9 | Breadboard | 1 | Amazon | AliExpress |
GT511C3 Fingerprint Sensor Module
The GT511C3 Fingerprint Sensor module is very different from the Capacitive and Ultrasonic Fingerprint sensor modules. GT511C3 Module uses an optical sensor to scan fingerprints. It means it relies on images of user fingerprints to recognize its pattern. The module has a camera inside it which takes pictures of your fingerprint. These fingerprints are processed by powerful in-built HOLTEK ARM Cortex M3 microcontroller. This scanner module can save up to 200 fingerprints scans, and it assigns an ID from 0 to 199 for each fingerprint.
This optical sensor module is designed for easy integration into applications with a Serial UART interface. It has two wires for TX and RX and two wires for power supply. The sensor can operate from 3.3V to 6V but communication pins (Rx and Tx) are 3.3V tolerant.
The GT511C3 Module can also be directly interfaced with a computer through a USB connection. While using a USB connection, this Module can be controlled using the SDK_DEMO.exe application. This application allows you to enroll/verify/delete fingerprints.
GT511C3 Module Features & Specifications
- Operating Voltage: 3.3V to 6V DC
- Operating Current: < 130mA
- Operating Temperature: ~20°C ~ +60°C
- CPU: ARM Cortex M3 Core (Holtek HT32F2755)
- Max no of fingerprints: 200 fingerprints
- Sensor: Optical Sensor
- Serial Communication: UART (Default: 9600 baud) and USB v1.1
- False Acceptance Rate (FAR): < 0.001%
- False Rejection Rate (FRR): < 0.01%
- Enrollment Time < 3 sec (3 fingerprints)
- Identification Time: <1.0 seconds (200 fingerprints)
GT511C3 Module Pinout
The GT511C3 Fingerprint Sensor Module has 4 pins.
The red color wire is VCC & Black is the GND. Similarly, green is the Rx & white is the Tx.
GT511C3 SDK Demo Software
To use the demo software first connect the fingerprint sensor to USB-to-TTL Module. Here is the UART Connection with USB-to-TTL FTDI Module & GT511C3 Fingerprint Sensor.
Connect the red wire to VCC, black to GND, Green to Tx, and White to Rx.
For basic operation with the software, download the demo software development kit (SDK) from here.
To use the demo SDK on a computer:
- Download the SDK_DEMO.exe
- Unzip the folder.
- Go to the directory that it was unzipped
- Open the SDK_DEMO.exe executable.
- Select the COM port that the FTDI enumerated in the Serial Port Number’s drop-down menu.*
- Select 9600 in the Baudrate’s drop-down menu.
- Click on the Open button.
Once the demo SDK has been opened, it will look like this:
Once connected, it will display the Firmware Version and Device Serial Number. And there are so many options like Enroll, Verify, Identify, Get an image, delete, get a database, etc. You can try all the options one by one. The most important option is deleting the fingerprint which can be done by simply clicking on Delete All option.
Interfacing GT511C3 Fingerprint Sensor Module with Arduino
Let’s see how we can interface the fingerprint sensor with Arduino. So here is a simple schematic for the project.
We have used 2K & 1K resistors for the voltage divider network as the sensor UART Pins are 3.3V tolerant. Connect the Green Wire (Rx) to Arduino D5 Pin & White Wire (Tx) to Arduino D4 Pin.
GT511C3 Arduino Library
Moving to the software part, we can use a GT511C3 Arduino Library library written by Sparkfun. This repository contains Arduino example code to work with GT511C3.
This code has been tested with other types of fingerprint sensors as well. You can download this library and add it to the Arduino IDE.
Fingerprint Enroll Code
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
#include "FPS_GT511C3.h" #include "SoftwareSerial.h" FPS_GT511C3 fps(4, 5); // 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 can upload the code and test it. After uploading codes, open the Serial Monitor and you will be asked to place a finger for enrolling.
Fingerprint Read Code
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#include "FPS_GT511C3.h" #include "SoftwareSerial.h" FPS_GT511C3 fps(4, 5); // 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); } |
You can upload the code again and test it. After uploading codes, open the Serial Monitor and you will be asked to place a finger. You can place your enrolled finger and the fingerprint will read it.
Portable Fingerprint Scanner with Arduino & LCD Display
Let us add an LCD Display to see how we can observe the serial monitor data on LCD Display. This is the schematic for interfacing GT511C3 Fingerprint Sensor & LCD with Arduino for the project.
We have used a push-button connected to the digital pin 2 of Arduino. When it’s pressed, the sensor will go into enrolling mode. A 16×2 character LCD is attached which is programmed for displaying all the happening when interacting with a fingerprint sensor.
You can use a breadboard for assembly. Otherwise, you can use a dedicated PCB for this project.
Source Code/Program
On the coding part, we have combined the fingerprint enroll and verify code together. We also added the LCD Display library and modified the code as per LCD requirements.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
#include <LiquidCrystal.h> const int rs = 12, en = 11, d4 = 10, d5 = 9, d6 = 8, d7 = 7; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); #include "FPS_GT511C3.h" #include "SoftwareSerial.h" FPS_GT511C3 fps(4, 5); // digital pin 5(arduino Tx, fps Rx) void setup() { Serial.begin(9600); //default baud rate lcd.begin(16, 2); delay(100); fps.Open(); fps.SetLED(true); pinMode(2, INPUT_PULLUP); //Connect to internal pull up resistor as input pin lcd.setCursor(4, 0); lcd.print("GT511C3"); lcd.setCursor(3, 1); lcd.print("FPS Sensor"); delay(2500); } void loop() { read_fps(); if (digitalRead(2) == 0) //If button pressed { Enroll(); //Enroll a fingerprint } delay(100); } 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); lcd.setCursor(0, 0); lcd.print("Put Finger to"); lcd.setCursor(0, 1); lcd.print("Enroll: #"); lcd.print(enrollid); while (fps.IsPressFinger() == false) delay(100); bool bret = fps.CaptureFinger(true); int iret = 0; if (bret != false) { Serial.println("Remove finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Remove finger"); fps.Enroll1(); while (fps.IsPressFinger() == true) delay(100); Serial.println("Press same finger again"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Put same finger"); lcd.setCursor(0, 1); lcd.print("again"); while (fps.IsPressFinger() == false) delay(100); bret = fps.CaptureFinger(true); if (bret != false) { Serial.println("Remove finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Remove finger"); fps.Enroll2(); while (fps.IsPressFinger() == true) delay(100); Serial.println("Press same finger yet again"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Put same finger"); lcd.setCursor(0, 1); lcd.print("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"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Enrolling"); lcd.setCursor(0, 1); lcd.print("Successfull"); } else { Serial.print("Enrolling Failed with error code:"); Serial.println(iret); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Enrolling Failed"); lcd.setCursor(0, 1); lcd.print(iret); } } else Serial.println("Failed to capture third finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Failed Capturing"); lcd.setCursor(0, 1); lcd.print("third finger"); } else Serial.println("Failed to capture second finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Failed Capturing"); lcd.setCursor(0, 1); lcd.print("second finger"); } else Serial.println("Failed to capture first finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Failed Capturing"); lcd.setCursor(0, 1); lcd.print("first finger"); } void read_fps() { // Identify fingerprint test if (fps.IsPressFinger()) { fps.CaptureFinger(false); int id = fps.Identify1_N(); if (id < 200) { Serial.print("Verified ID:"); Serial.println(id); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Verified ID:"); lcd.setCursor(0, 1); lcd.print(id); } else { Serial.println("Finger not found"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Finger Not Found"); } } else { Serial.println("Please press finger"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Please Put "); lcd.setCursor(0, 1); lcd.print("Finger"); } delay(100); } |
Select Arduino Nano Board and COM port and upload the code. After uploading is done, the LCD will display the message to put your finger, and also the blue LED will light up in the Fingerprint module.
Testing Portable Fingerprint Scanner
To register your finger press the push button. Then scan your finger 3 times. The fingerprint will be enrolled.
To verify the fingers, place the same finger on the fingerprint module.
So, this is how you can enroll and read the fingerprint data.





















