Fingerprint Identification with STM32 MCU and Serial TFT LCD Module

CNXSoft: This is a guest post by Amy working for STONE Technology, a company specializing in industrial liquid crystal display modules

This month, I planned to develop a fingerprint door lock project. When I selected the fingerprint identification module, the project was suspended. However, I thought that since the fingerprint identification module had been purchased, I would simply test it.

This fingerprint module can be easily purchased online, connected over UART to an MCU  board. It supports fingerprint scanning, fingerprint entry, fingerprint comparison, and fingerprint deletion.

Since the fingerprint module manufacturer provides a demo program for STM32F103 series microcontrollers, I bought a small development board based on STM32F103C8T6.

The demo program of the fingerprint module uses LED lights to prompt the user to enter the fingerprint and compare the status (success or failure). But I want to use an LCD display, so I chose a 480×272 resolution serial LCD display. The specific model of this display is STONE STVC050WT-01, which communicates with MCU through UART, and will be covered in later chapters.

3 hardware components

A total of three hardware modules are used:

  • STM32 development board
  • Fingerprint module
  • STONE STVC050WT-01 LCD display

Fingerprint identification module with UART-TTL

serial fingerprint module

The UART fingerprint reader module is powered by STM32F205 high-speed digital processor from STMicro and integrates a fingerprint algorithm (TFS-9), as well as a high-precision optical sensor (TFS-d400). It supports fingerprint entry, image processing, feature value extraction, template generation, template storage, fingerprint comparison, and search. It exposes a UART interface to be driven from a host microcontroller or processor.

Features

  1. Sensitive fingerprint sensing and fast identification speed: the fingerprint module adopts high-precision optical path and imaging components, so only hands are needed when using it.
  2. Stability first: the module adopts STM32F205 MCU with low power consumption and fast speed. Speed & stability are better than Chinese chips.
  3. “Scientific structure”: the module adopts a modular structure, fingerprint sensor + processing motherboard + algorithm platform.
  4. Standard 16-pin universal interface: sensors can be independently selected and replaced by optical and other sensors; commercial algorithms are used.
  5. Easy development: serial port UART operation (directly connect to any single-chip microcomputer with serial port), extremely simple operation. The company provides demo software, learning software, MCU routines, and related tools.
  6. Openness: free input and output of fingerprint pictures, fingerprint characteristic value files and various fingerprint operations.

Application scenarios

Typical applications include fingerprint locks, fingerprint safes, fingerprint access control, fingerprint attendance,  intercoms, personnel identification, permission management, etc…

The fingerprint module can be purchased on Aliexpress for $37.78.

STONE 5-inch STVC050WT-01 4:3 TFT-LCD module

480×272 TFT LCD Display introduction

In this project, I would like to use STONE STVC050WT-01 TFT LCD to display the status of the fingerprint module (entry status, comparison status and deletion of fingerprint data). This display comes with a driver chip, and development software is provided for user interface development. The user simply needs to add the designed UI picture through the software as well as any button or text box as needed, and then generate the configuration file to flash into the display.

The STONE STVC050WT-01 display communicates with MCU through UART-TTL signals.

In theory, the STONE display and fingerprint module can communicate directly. However, due to the different communication data protocols, it is impossible to establish communication. Therefore, an MCU is still needed to handle serial communication.

STONE LCD DisplayMore technical information including the datasheet can be found on the product page, and the module can be purchased on Aliexpress for $37.78.

4 steps to get started with STONE Touch LCD module

  1. Design the user display interface with PhotoShop, or other photo editing software.
  2. Design the display logic and button logic with STONE TOOL software, and download the design file onto the display module.
  3. The MCU communicates with the STONE LCD module through the serial port.
  4. The data obtained in step 3 shall be used for other actions by MCU.

STONE TOOL Software installation

Download the latest version of the STONE TOOL software (currently TOOL 2019) from the official website and install it.

After the software installation is completed, the following interface will be opened:

STONE TOOL Software for LCD

Click the “File” button in the upper left corner to create a new project, which will be explained in the following sections.

STM32 MCU Board

We used a development board based on STM32F103C8T6 MCU, which can be purchased on Aliexpress for under $2 shipped.

BluePill STM32 Board

The development environment of STM32

Keil vision is an integrated development environment developed by Keil. Currently, there are several versions of Vision2, Vision3, Vision4, and Vision5. In 2005, Keil was acquired by Arm. In March 2011, the latest integrated development environment Realview MDK development tool released by Arm integrated the latest version of Keil uvision4, and its compiler and debugging tool were optimized for Arm devices.

STM32 uses the KEIL MDK development environment, available on the company’s website.

STONE LCD Fingerprint module test project implementation

Hardware connection to development board and stone LCD module

To make sure that we can write code later, we must first determine the reliability of the hardware connection.

The STM32F103C8T6 development board and STVC050WT-01 TFT-LCD display are connected through UART, and then the STM32F103C8T6 development board and fingerprint module are also connected through UART.

Make sure the hardware connection is correct, then move on to the next step.

Only 1 step to design UI Graphic

First of all, we need to design a UI display image, which can be designed with PhotoShop software or other image design tools. After designing the UI display image, save the image as JPG format. Here’s the UI I designed in Photoshop.

fingerprint scanner UI

TFT-LCD Display module design

Open the STONE TOOL2019 software and create a new project:

STONE TOOL New ProjectChange UI

Delete the image that the new project loads by default, and add the UI image that we designed ourselves.

How to add font file via STONE Tool

STONE Tool Font

The UI includes a status bar that shows fingerprint verification in real-time, so you need to add a font, as well as text display components and buttons.

The effect is as follows:

UI font
Click to Enlarge

How to generate the configuration file for STONE LCD

Once the UI design above is complete, you can generate the configuration file and download it to the STVC050WT-01 display, which is described in the STONE development materials.

Upload UI to STONE LCD

Perform step 1 to generate the configuration file, then insert the USB flash drive into the computer. The flash drive will display. Then click “Download to u-disk” to download the configuration file to the USB flash drive, and then insert the USB flash drive into STVC050WT-01 to complete the upgrade.

How to connect the fingerprint module via UART-TTL

The fingerprint module actually consists of two parts:

  1. Optical collector
  2. Driver circuit

The core part is the driver circuit, which is integrated with an STM32F2 series chip. The fingerprint algorithm and scanning algorithm are embedded into the chip, and UART communication is used to get the results making it very convenient for application developers.

Hardware connection:

VCC —— — 3.3v or 5V
GND — — — — — -GND
TXD (fingerprint module serial port send) —— RXD (PC or MCU serial port Rx)
RXD (fingerprint module serial port receive) —— TXD (PC or MCU serial port Tx)
BL (backlight of fingerprint head, not connected) —- IO port
RST(fingerprint module reset, not connected) —— IO port

The first time, you can use a Windows PC to communicate with the fingerprint module through the serial port to do testing. You can find more details on Waveshare Wiki (in Chinese).

STM32 Application development

Visit the official website of the fingerprint module supplier, download the fingerprint module demo program (示例程序), and then open the program with KEIL software.

But before going further with software development, let’s connect the hardware first.

STM32 Fingerprint TFT LCD

Then send instructions through the serial console to check the connection is working properly.

SSCOM serial data debuggerWe made some minor modifications to the program with the final code (main.c) as follows:


We also had to modify stm32f10x_it.c file to add a USART IRQ handler function.


STM32 USART IRQ handler
Click to Enlarge

The final result

We only need to connect the STM32 board, fingerprint module, display screen, and power supply.  Press the button above the STONE display, and you should be able to add, delete, and verify fingerprints.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
3 Comments
oldest
newest
Tim
Tim
4 years ago

Nice work, interesting project.

tomy
tomy
4 years ago

Great tutorial. The code is very complete. I can take that idea

TOM
TOM
3 years ago

Good. It gives me some inspiration

Khadas VIM4 SBC