Introduction: Fingerprint Module + STONE TFT-LCD
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 is purchased online. Through UART and MCU communication, fingerprint collection, fingerprint entry, fingerprint comparison and fingerprint deletion can be completed. Since the Demo program provided on the official website of the fingerprint module USES STM32F103 series, I also bought a small development board of STM32 with the chip model of 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 LCD displayer. The specific model of this display is STONE stvc050wt-01, which communicates with MCU through UART. This will be covered in later chapters.
Step 1: Hardware Introduction
A total of three hardware modules are used:
STM32 development board
Fingerprint module
STONE stvc050wt-01 LCD display
Fingerprint identification module with UART-TTL
The UART Fingerprint Reader module takes STM32F205 high-speed digital processor imported from ST company as the core, combines the commercial Fingerprint algorithm (tfs-9), high-precision optical sensor (tfs-d400), and has the functions of Fingerprint entry, image processing, feature value extraction, template generation, template storage, Fingerprint comparison and search.Provide UART interface and communication protocol, professional for scientific research units, application integration manufacturers to provide standard secondary development fingerprint suite, fast, convenient integration applications.
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 Refers to a light click, can quickly identify. 2) stability first: the module adopts the advanced digital processing chip imported from ST company STM32F205 as the processor, with low power consumption and fast speed Speed stability, than domestic chip, other platform chip stability at least 30%. 3) scientific structure: the module adopts split structure, fingerprint sensor + processing motherboard + algorithm platform, and the motherboard is stable. Adopt standard 16P universal interface;Sensors can be independently selected and replaced optical and semiconductor sensors;Commercial algorithms are used. 4) easy development: serial port UART operation (directly connected to any single-chip microcomputer with serial port), extremely simple operation, and equipped with a PC Demo software, learning software, MCU routines and related tools. 5) openness: free input and output of fingerprint pictures, fingerprint characteristic value files and various fingerprint operations.
Application scenarios
Fingerprint product development: the development of fingerprint lock, fingerprint safe, fingerprint access control, fingerprint attendance Fingerprint integration application: integrated in all kinds of security products, such as intercom, switch, personnel identification, permission management.
5 inch STONE STVC050WT 4:3 TFT-LCD module
480*272 LCD-TFT Displayer introduction In this project, I would like to use the display screen of STONE STVC050WT to display the status of the fingerprint module (fingerprint entry status, fingerprint contrast status and deletion of fingerprint data).This display has been integrated with the driver chip, and the development software can be provided for the user to use, the user just need to add the designed UI picture through the computer software button, text box, and then generate the configuration file to download into the display and then run. The STVC050WT display communicates with MCU through uart-ttl signal. In theory, STONE display screen and fingerprint module can communicate directly. However, due to the different communication data protocols of the two modules, it is impossible to shake hands. Therefore, a MCU is still needed for conversion.
Website have detailed information and introduction: https://www.stoneitech.com/
If you need a video tutorial, you can download it from the official website.
3 steps to get start with STONE Touch LCD displayer
Four steps of STONE display development:
Designed the user display interface with PhotoShop software.
Design display logic and button logic with STONE TOOL software, and download the design file onto the display module.
MCU communicates with STONE LCD display module through serial port.
The data obtained in step 3 shall be used for other actions by MCU.
About STONE TOOL Software installation
Download the latest version of the STONE TOOL software (currently TOOL2019) from the official website and install it. After the software installation is completed, the following interface will be opened:
Click the "File" button in the upper left corner to create a new project, which will be explained in the following sections.
STM32 MCU
STM32F103C8T6
This is the development board of STM32F103C8T6, the purchase link:
https://item.taobao.com/item.htm?id=597967750760&ali_refid=a3_420434_1006:1189590055:N:jxREdm5V8MoL69LZxL%2Biz%2BQbG4S%2FtfkN:7ae5423c73cc44495581abdec5cd6265&ali_trackid=1_7ae5423c73cc44495581abdec5cd6265&spm=a230r.1.1957635.59
Step 2: Introduction of Chip
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 realized the most perfect match with ARM devices. STM32 USES the KEIL MDK development environment, which is available on the web for installation tutorials.
STONE LCD Fingerprint module test project implementation
Hardware connection 2 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. Three hardware modules are used in this project: l STM32F103C8T6 development board l STONE STVC050WT tft-lcd display l Fingerprint module The STM32F103C8T6 development board and STVC050WT 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 Using photoshop, I designed this UI picture simply:
LCD-TFT Display module design
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. Open the STONE TOOL2019 software and create a new project:
Delete the image that the new project loads by default, and add the UI image that we designed ourselves.
How to add font file by STONE Tool
The item has a status bar that shows fingerprint verification in real time, so you need to add a font.
Add text display components and buttons to get the storage location of components in the display. The effect is as follows:
How to generate configuration files for STONE LCD
Once the UI design above is complete, you can generate the configuration file and download it to the STVC050WT display, which is described in the STONE development materials.
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 to complete the upgrade.
How to connect the fingerprint module with UART-TTL
The fingerprint module actually consists of two parts:
Optical collector Drive circuit The core part is the driver circuit, which is integrated with a STM32F2 series chip. The fingerprint algorithm and collection algorithm have been written internally, and UART communication is provided to users, so it is very convenient for us to be application developers. Hardware connection: VCC ------ -- 3.3v or 5V GND -- -- -- -- -- -GND TXD(fingerprint module serial port send) ------ RXD (PC or MCU serial port receive) RXD(fingerprint module serial port receive) ------ TXD (PC or MCU serial port send) BL (backlight of fingerprint head, not connected) ---- IO port RST(fingerprint module reset, not connected) ------ IO port The first time to use it, you can use PC to communicate with fingerprint module through serial port to do the test, and click the following link to watch the tutorial: http://www.waveshare.net/wiki/UART_Fingerprint_Reader_APP
STM32 Application development
Log on to the official website of the fingerprint module supplier, download the fingerprint module driver Demo program provided by them, and then open the program with KEIL software. Fingerprint module supplier's official website:
http://www.waveshare.net/shop/UART-Fingerprint-Reader.htm
Use the program provided by the official website, make some minor modifications, and then connect the hardware. The picture of connection is as follows:
Then send instructions through the computer serial assistant software, you can receive a reply.
Here is the code in main.c :
#include
#include "usart.h"
#include "timer.h"
#include "fingerprint.h"
#define ADDUSER_BTN_ADDR 0x01
#define VERIFY_BTN_ADDR 0x05
#define CLEAR_BTN_ADDR 0x09
#define TEXT_STATUS_ADDR 0x0c
#define USER_SUCESS 0x01
#define USER_FAIL 0X00 u8 data_send[8]= {0xA5, 0x5A, 0x05, 0x82, 0x00, 0x00, 0x00,0x00}; void delay() { u16 i, j; for (i = 0; i < 1000; i++) for(j = 0; j < 10000; j++); }
//void USERGPIO_Init(void)
//{ // GPIO_InitTypeDef GPIO_InitStructure;
......
Please contact us if you need a complete procedure:
https://www.stoneitech.com/contact
I will reply to you within 12 hours.
Step 3: The Final Result
We only need to connect STM32 microcontroller, fingerprint module and display screen, and then power supply.At this time, press the button above the displayer, you can normally add delete and verify the fingerprint.
Comments