Waveshare Stm32f205 Uart Fingerprint Sensor User Manual

Waveshare Stm32f205 Uart Fingerprint Sensor User Manual

WAVESHARE logo

UART Fingerprint Sensor (C)
User Manual

OVERVIEW

This is a highly integrated round-shaped all-in-one capacitive fingerprint sensor module, which is nearly as small as a nail plate. The module is controlled via UART commands, easy to use. Its advantages include 360° Omni-directional verification, fast verification, high stability, low power consumption, etc.
Based on a high-performance Cortex processor, combined with a high-security commercial fingerprinting algorithm, the UART Fingerprint Sensor (C) features functionalities like fingerprint enrolling, image acquisition, feature finding, template generating and storing, fingerprint matching, and so on. Without any knowledge about the complicated fingerprinting algorithm, all you need to do is just send some UART commands, to quickly integrate it into fingerprint verification applications which require small size and high precision.

FEATURES
  • Easy to use by some simple commands, you do not have to know any fingerprint technology or the module inter structure
  • The commercial fingerprinting algorithm, stable performance, fast verification, supports fingerprint enrolling, fingerprint matching, collect fingerprint image, upload fingerprint feature, etc.
  • Capacitive sensitive detection, just touch the collecting window lightly for fast verification
  • Hardware highly integrated, processor and sensor in one small chip, suit for small size applications
  • Narrow stainless-steel rim, large touching area, supports 360° Omni-directional verification
  • Embedded human sensor, the processor will enter sleep automatically, and wake up when touching, lower power consumption
  • Onboard UART connector, easy to connect with hardware platforms like STM32 and Raspberry Pi
SPECIFICATION
  • Sensor type: capacitive touching
  • Resolution: 508DPI
  • Image pixels: 192×192
  • Image grey scale: 8
  • Sensor size: R15.5mm
  • Fingerprint capacity: 500
  • Matching time: <500ms (1:N, and N<100)
  • False acceptance rate: <0.001%
  • False rejection rate: <0.1%
  • Operating voltage: 2.73V
  • Operating current: <50mA
  • Sleep current: <16uA
  • Anti-electrostatic: contact discharge 8KV / aerial discharge 15KV
  • Interface: UART
  • Baudrate: 19200 bps
  • Operating environment:
    • Temperature: -20°C~70°C
    • Humidity: 40%RH~85%RH (no condensation)
  • Storage environment:
    • Temperature: -40°C~85°C
    • Humidity: <85%RH (no condensation)
  • Life: 1 million times

HARDWARE

DIMENSION

WAVESHARE STM32F205 UART Fingerprint Sensor - DIMENSION

INTERFACE

Note: The color of actual wires may be different from the image. According to the PIN when connecting but not the color.

WAVESHARE STM32F205 UART Fingerprint Sensor - INTERFACE

  • VIN: 3.3V
  • GND: Ground
  • RX: Serial data input (TTL)
  • TX: Serial data output (TTL)
  • RST: Power enable/disable Pin
    • HIGH: Power enable
    • LOW: Power disable (Sleep Mode)
  • WAKE: Wake up pin. When the module is in sleep mode, the WKAE pin is HIGH when touching the sensor with a finger.

COMMANDS

COMMANDS FORMAT

This module works as a slave device, and you should control the Master device to send commands to control it. The communication interface is UART: 19200 8N1.
The format commands and responses should be:
1) =8 bytes

Byte12345678
CMD0xF5CMDP1P2P30CHK0xF5
ACK0xF5CMDQ1Q2Q30CHK0xF5

Notes:
CMD: Type of command/response
P1, P2, P3: Parameters of command
Q1, Q2, Q3: Parameters of response
Q3: Generally, Q3 is valid/invalid information of the operation, it should be:

#define ACK_SUCCESS
#define ACK_FAIL
#define ACK_FULL
#define ACK_NOUSER
#define ACK_USER_OCCUPIED
#define ACK_FINGER_OCCUPIED
#define ACK_TIMEOUT
0x00
0x01
0x04
0x05
0x06
0x07
0x08
//Success
//Failed
//The database is full
//The user is not exist
//The user was exist
//The fingerprint was exist
//Time out

CHK: Checksum, it is XOR result of bytes from Byte 2 to Byte 6

2) >8 bytes. This data contains two parts: data head and data packet data head:

Byte12345678
CMD0xF5CMDHi(Len)Low(Len)00CHK0xF5
ACK0xF5CMDHi(Len)Low(Len)Q30CHK0xF5

Note:
CMD, Q3: same as 1)
Len: Length of valid data in the data packet, 16bits (two bytes)
Hi(Len): High 8 bits of Len
Low(Len): Low 8 bits of Len
CHK: Checksum, it is XOR result of bytes from Byte 1 to Byte 6 data packet:

Byte12…Len+1Len+2Len+3
CMD0xF5DataCHK0xF5
ACK0xF5DataCHK0xF5

Note:
Len: numbers of Data bytes
CHK: Checksum, it is XOR result of bytes from Byte 2 to Byte Len+1
data packet following data head.

COMMAND TYPES:
  1. Modify SN number of the module (CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x08New SN (Bit 23-16)New SN (Bit 15-8)New SN(Bit 7-0)0CHK0xF5
    ACK0xF50x08old S (Bit 23-16)old SN (Bit 15-8)old SN (Bit 7-0)0CHK0xF5
  2. Query Model SN (CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x2A0000CHK0xF5
    ACK0xF50x2ASN (Bit 23-16)SN (Bit 15-8)SN (Bit 7-0)0CHK0xF5
  3. Sleep Mode (CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x2C0000CHK0xF5
    ACK0xF50x2C0000CHK0xF5
  4. Set/Read fingerprint adding mode (CMD/ACK both 8 Byte)
    There are two modes: enable duplication mode and disable duplication mode. When the module is in disabled duplication mod: the same fingerprint could only be added as one ID. If you want to add another ID with the same fingerprint, DSP response failed information. The module is in disabled mode after powering on.
    Byte12345678
    CMD0xF50x2D0Byte5=0:
    0: Enable
    1: Disable
    Byte5=1: 0
    0: a new mode
    1: read current mode
    0CHK0xF5
    ACK0xF50x2D0Current modeACK_SUCCUSS
    ACK_FAIL
    0CHK0xF5
  5. Add fingerprint (CMD/ACK both 8 Byte)
    The master device should send commands triple times to the module and add fingerprint triple times, making sure the fingerprint added is valid.
    a) First
    Byte12345678
    CMD0xF
    5
    0x0
    1
    User ID (High 8Bit)User ID (Low 8Bit )Permission(1/2/3)0CHK0xF5
    ACK0xF
    5
    0x0
    1
    00ACK_SUCCESS
    ACK_FAIL
    0CHK0xF5
    ACK_FULL
    ACK_USER_OCCUPIED ACK_FINGER_OCCUPIED
    ACK_TIMEOUT

    Notes:
    User ID: 1~0xFFF;
    User Permission: 1,2,3,(you can define the permission yourself)
    b) Second

    Byte12345678
     

    CMD

     

    0xF5

     

    0x02

    User ID

    (High 8Bit )

    User ID

    (Low 8Bit )

    Permission

    (1/2/3)

     

    0

     

    CHK

     

    0xF5

     

    ACK

     

    0xF5

     

    0x02

     

    0

     

    0

    ACK_SUCCESS

    ACK_FAIL ACK_TIMEOUT

     

    0

     

    CHK

     

    0xF5

    c) third

    Byte12345678
     

    CMD

     

    0xF5

     

    0x03

    User ID

    (High 8Bit )

    User ID

    (Low 8Bit )

    Permission

    (1/2/3)

     

    0

     

    CHK

     

    0xF5

     

    ACK

     

    0xF5

     

    0x03

     

    0

     

    0

    ACK_SUCCESS

    ACK_FAIL ACK_TIMEOUT

     

    0

     

    CHK

     

    0xF5

    Notes: User ID and Permission in three commands.

  6. Add users and upload eigenvalues (CMD =8Byte/ACK > 8 Byte)
    These commands are similar to “5. add fingerprint”, you should add triple times as well.
    a) First
    Same as the First of  “5. add fingerprint”
    b) Second
    Same as the Second of  “5. add fingerprint
    c) Third
    CMD Format:
    Byte12345678
    CMD0xF50x060000CHK0xF5

    ACK Format:
    1) Data head:

    Byte12345678
    ACK0xF50x06Hi(Len)Low(Len)ACK_SUCCESS
    ACK_FAIL
    ACK_TIMEOUT
    0CHK0xF5

    2) Data packet:

    Byte12345—Len+1Len+2Len+3
    ACK0xF5000EigenvaluesCHK0xF5

    Notes:
    Length of Eigenvalues(Len-) is 193Byte
    Data packet is sent when the fifth byte of ACK data is ACK_SUCCESS

  7. Delete user (CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x04User ID (High 8Bit) User ID (Low 8Bit)0 0CHK0xF5
    ACK0xF50x0400ACK_SUCCESS
    ACK_FAIL
    0CHK0xF5
  8. Delete all users(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x05000:Delete all users 1/2/3: delete users whose permission is 1/2/30CHK0xF5
    ACK0xF50x0500ACK_SUCCESS
    ACK_FAIL
    0CHK0xF5
  9. Query count of users(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x09000: Query Count
    0xFF: Query Amount
    0CHK0xF5
    ACK0xF50x09Count/Amount (High 8Bit )Count/Amount (Low 8Bit )ACK_SUCCESS
    ACK_FAIL
    0xFF(CMD=0xFF)
    0CHK0xF5
  10. 1:1(CMD/ACK both 8Byte)
    Byte12345678
    CMD0xF50x0BUser ID (High 8 Bit )User ID (Low 8 Bit)00CHK0xF5
    ACK0xF50x0B00ACK_SUCCESS
    ACK_FAIL
    ACK_TIMEOUT
    0CHK0xF5
  11. Comparison 1:N(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x0C0000CHK0xF5
    ACK0xF50x0CUser ID (High 8 Bit )User ID (Low 8 Bit)Permission
    (1/2/3)
    ACK_NOUSER
    ACK_TIMEOUT
    0CHK0xF5
  12. Query Permission(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x0AUser ID(High 8Bit)User ID(Low8Bit )00CHK0xF5
    ACK0xF50x0A00Permission
    (1/2/3)
    ACK_NOUSER
    0CHK0xF5
  13. Set/Query comparison level(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x280Byte5=0: New Level
    Byte5=1: 0
    0:Set Level
    1:Query Level
    0CHK0xF5
    ACK0xF50x280Current LevelACK_SUCCUSS
    ACK_FAIL
    0CHK0xF5

    Notes: Comparison level can be 0~9, larger the value, the stricter the comparison. Default 5

  14. Acquire image and upload(CMD=8 Byte/ACK >8 Byte)
    CMD Format:
    Byte12345678
    CMD0xF50x240000CHK0xF5

    ACK Format:
    1)Data head:

    Byte12345678
    ACK0xF50x24Hi(Len)Low(Len)ACK_SUCCUSS
    ACK_FAIL
    ACK_TIMEOUT
    0CHK0xF5

    2)Data packet

    Byte12—Len+1Len+2Len+3
    ACK0xF5Image dataCHK0xF5

    Notes:
    In the DSP module, the pixels of the fingerprint images are 280*280, every pixel is represented by 8 bits. When uploading, DSP has skipped pixels sampling in horizontal/vertical direction to reduce data size, so that the image became 140*140, and just take the high 4 bits of the pixel. every two pixels composited into one byte for transferring (previous pixel high 4-bit, last pixel low 4-pixel).
    Transmission starts line by line from the first line, each line starts from the first pixel, totally transferring 140* 140/ 2 bytes of data.
    The data length of the image is fixed at 9800 bytes.

  15. Acquire image and upload eigenvalues(CMD=8 Byte/ACK > 8Byte)
    CMD Format:
    Byte12345678
    CMD0xF50x230000CHK0xF5

    ACK Format:
    1)Data head:

    Byte12345678
    ACK0xF50x23Hi(Len)Low(Len)ACK_SUCCUSS
    ACK_FAIL
    ACK_TIMEOUT
    0CHK0xF5

    2)Data packet

    Byte12345—Len+1Len+2Len+3
    ACK0xF5000EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.

  16. Download eigenvalues and compare with fingerprint acquired(CMD >8 Byte/ACK=8 Byte)
    CMD Format:
    1)Data head:
    Byte12345678
    CMD0xF50x44Hi(Len)Low(Len)00CHK0xF5

    2)Data packet

    Byte12345—Len+1Len+2Len+3
    ACK0xF5000EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.
    ACK Format:

    Byte12345678
    ACK0xF50x4400ACK_SUCCUSS
    ACK_FAIL
    ACK_TIMEOUT
    0CHK0xF5
  17. Download eigenvalues and comparison 1:1(CMD >8 Byte/ACK=8 Byte)
    CMD Format:
    1)Data head:
    Byte12345678
    CMD0xF50x42Hi(Len)Low(Len)00CHK0xF5

    2)Data packet

    Byte12345—Len+1Len+2Len+2
    ACK0xF5User ID (High 8 Bit)User ID (Low 8 Bit)0EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.
    ACK Format:

    Byte12345678
    ACK0xF50x4300ACK_SUCCUSS
    ACK_FAIL
    0CHK0xF5
  18. Download eigenvalues and comparison 1:N(CMD >8 Byte/ACK=8 Byte)
    CMD Format:
    1)Data head:
    Byte12345678
    CMD0xF50x43Hi(Len)Low(Len)00CHK0xF5

    2)Data packet

    Byte12345—Len+1Len+2Len+2
    ACK0xF5000EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.
    ACK Format:

    Byte12345678
    ACK0xF50x43User ID (High 8 Bit)User ID (Low 8 Bit )Permission
    (1/2/3)
    ACK_NOUSER
    0CHK0xF5
  19. Upload eigenvalues from DSP model CMD=8 Byte/ACK >8 Byte)
    CMD Format:
    Byte12345678
    CMD0xF50x31User ID (High 8 Bit )User ID (Low 8 Bit )00CHK0xF5

    ACK Format:
    1)Data head:

    Byte12345678
    ACK0xF50x31Hi(Len)Low(Len)ACK_SUCCUSS
    ACK_FAIL
    ACK_NOUSER
    0CHK0xF5

    2)Data packet

    Byte12345—Len+1Len+2Len+3
    ACK0xF5User ID (High 8 Bit )User ID(Low 8 Bit )Permission (1/2/3)EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.

  20. Download eigenvalues and save as User ID to DSP(CMD>8 Byte/ACK =8 Byte)
    CMD Format:
    1)Data head:
    Byte12345678
    CMD0xF50x41Hi(Len)Low(Len)00CHK0xF5

    2) Data packet

    Byte12345—Len+1Len+2Len+3
    ACK0xF5User ID (High 8 Bit)User ID (Low8 Bit)Permission (1/2/3)EigenvaluesCHK0xF5

    Notes: The length of Eigenvalues (Len -3) is 193 bytes.
    ACK Format:

    Byte12345678
    ACK0xF50x41User ID (High 8 Bit )User ID (Low 8 Bit)ACK_SUCCESS
    ACK_FAIL
    0CHK0xF5
  21. Query information (ID and permission) of all users added(CMD=8 Byte/ACK >8Byte)
    CMD Format:
    Byte12345678
    CMD0xF50x2B0000CHK0xF5

    ACK Format:
    1)Data head:

    Byte12345678
    ACK0xF50x2BHi(Len)Low(Len)ACK_SUCCUSS
    ACK_FAIL
    0CHK0xF5

    2)Data packet

    Byte1234—Len+1Len+2Len+3
    ACK0xF5User ID (High 8 Bit)User ID (Low 8 Bit)User information (User ID and permission)CHK0xF5

    Notes:
    The data length of the Data packet (Len) is ”3*User ID+2”
    User information Format:

    Byte456789
    DataUser ID1 (High 8 Bit )User ID1 (Low 8 Bit )User 1 Permission (1/2/3)User ID2 (High 8 Bit)User ID2 (Low 8 Bit )User 2 Permission (1/2/3) 

  22. Set/Query fingerprint capture timeout(CMD/ACK both 8 Byte)
    Byte12345678
    CMD0xF50x2E0Byte5=0: timeout
    Byte5=1: 0
    0:Set timeout
    1:query timeout
    0CHK0xF5
    ACK0xF50x2E0timeoutACK_SUCCUSS
    ACK_FAIL
    0CHK0xF5

    Notes:
    The range of fingerprint waiting timeout (tout) values is 0-255. If the value is 0, the fingerprint acquisition process will keep continuing if no fingerprints press on; If the value is not 0, the system will exist for the reason of timeout if no fingerprints press on in time tout * T0.
    Note: T0 is the time required for collecting/processing an image, usually 0.2- 0.3 s.

COMMUNICATION PROCESS

ADD FINGERPRINT

WAVESHARE STM32F205 UART Fingerprint Sensor - ADD FINGERPRINT

DELETE USER

WAVESHARE STM32F205 UART Fingerprint Sensor - DELETE USER

DELETE ALL USERS

WAVESHARE STM32F205 UART Fingerprint Sensor - DELETE ALL USERS

ACQUIRE IMAGE AND UPLOAD EIGENVALUE

WAVESHARE STM32F205 UART Fingerprint Sensor - ACQUIRE IMAGE AND UPLOAD EIGENVALUE

USER GUIDES

If you want to connect the fingerprint module to a PC, you need to buy one UART to the USB module. We recommend you use Waveshare FT232 USB UART Board (micro) module.
If you want to connect the fingerprint module to a development board like Raspberry Pi, if the working
level of your board is 3.3V, you can directly connect it to the UART and GPIO pins of your board. If it is 5V, please add level convert module/circuity.

CONNECT TO PC

HARDWARE CONNEC TION

You need:

  • UART Fingerprint Sensor (C)*1
  • FT232 USB UART Board *1
  • micro USB cable *1

Connect the fingerprint module and FT232 USB UART Board to the PC

UART Fingerprint Sensor (C)FT232 USB UART Board
VccVcc
GNDGND
RXTX
TXRX
RSTNC
WAKENC

TESTING

  • Download UART Fingerprint Sensor test software from wiki
  • Open the software and choose the correct COM port.(The software can only support COM1~COM8, if the COM port in your PC is out of this range, please modify it)
  • Testing

WAVESHARE STM32F205 UART Fingerprint Sensor - Testing

There are several functions provided in Testing interface

  1. Query Count
    Choose Count, then click Send. The count of users is returned and displayed in the Information Response interface
  2. Add User
    Choose Add User, check to Acquire Twice and Auto ID+1, type the ID (P1 and P2) and permission (P3), then click Send. Finally, touch sensor to acquire fingerprint.
  3. Delete user
    Choose to Delete User, type the ID (P1 and P2) and permission (P3), then click Send.
  4. Delete All Users
    Choose Delete All Users, then click Send
  5. Comparison 1:1
    Choose 1:1 Comparison, type the ID (P1 and P2) and permission (P3), then click Send.
  6. Comparison 1:N
    Choose 1: N Comparison, then click Send.


For more functions, please test it. (Some of the functions are unavailable for this module)

CONNECT TO XNUCLEO-F103RB

We provide a demo code for XNCULEO-F103RB, which you can download from the wiki

UART Fingerprint Sensor (C)NUCLEO-F103RB
Vcc3.3V
GNDGND
RXPA9
TXPA10
RSTPB5
WAKEPB3

Note: About the pins, please refer to the Interface above

  1. Connect UART Fingerprint Sensor (C) to XNUCLEO_F103RB, and connect the programmer
  2. Open project (demo code) by keil5 software
  3. Check if programmer and device are recognized normally
  4. Compile and download
  5. Connect XNUCELO-F103RB to PC by USB cable, open Serial assistance software, set COM port: 115200, 8N1

Type commands to test module according to the information returned.

CONNECT TO RASPBERRY PI

We provide a python example for Raspberry Pi, you can download it from the wiki
Before you use the example, you should enable the serial port of Raspberry Pi first:
Input command on Terminal: Sudo raspi-config
Choose: Interfacing Options -> Serial -> No -> Yes
Then reboot.

UART Fingerprint Sensor (C)Raspberry Pi
Vcc3.3V
GNDGND
RX14 (BCM) – PIN 8 (Board)
TX15 (BCM) – PIN 10 (Board)
RST24 (BCM) – PIN 18 (Board)
WAKE23 (BCM) – PIN 16 (Board)
  1. Connect fingerprint module to Raspberry Pi
  2. Download demo code to Raspberry Pi: wget https://www.waveshare.com/w/upload/9/9d/UART-Fignerprint-RaspberryPi.tar.gz
  3. unzip it
    tar zxvf UART-Fingerprint-RaspberryPi.tar.gz
  4. Run the example
    cd UART-Fingerprint-RaspberryPi/sudo python main.py
  5. Following guides to test the

www.waveshare.com

Documents / Resouces

Download manual
Here you can download full pdf version of manual, it may contain additional safety instructions, warranty information, FCC rules, etc.


Related Manuals