User Manual: ZFM-20 Series
User Manual: ZFM-20 Series
User Manual: ZFM-20 Series
com
ZFM-20 series
User Manual
Thank you for purchasing the ZFM-20 series fingerprints of Hangzhou Zhian Technology Co., Ltd. (hereinafter referred to as: Zhian Company).
This user manual is written for software and hardware application development engineers, including hardware interfaces, system resources, instructions
Command system, installation information, etc. To ensure smooth application development, please carefully check before proceeding with module development.
Every effort has been made to ensure the accuracy of this manual. However, if you have any questions or find an error,
Because our company pursues the purpose of continuously improving and improving products, the contents of modules and manuals may be changed.
Further notice. Please visit our company's website or contact us by phone for the latest information.
This document contains the private information of the company, without the written permission of the company, third parties do not
In the use of the company's products, Shian does not bear any responsibility or obligation; and third parties in the use of
All products are sold subject to the company's terms and conditions of sale in the order acknowledgment. The company's profit
Use testing, tooling, quality control and other technical means to support the relevant performance of the product to a certain extent to the required specification
guarantee. It is not necessary to perform all parametric tests for each product, except as expressly required in writing by the government.
Hangzhou Zhian Technology Co., Ltd. 2010-2012 Copyright. All rights reserved. Infringement must be investigated.
land Address: Block C/D, 8th Floor, West Building, International Garden, No. 160 Tianmushan Road, Hangzhou, Zhejiang 310012
Fax: 86-571-88210122-818
content
3.1 Host computer interface (marked on the board: J1) ................................................ ...........5
3.1.1 Serial communication...................................................................... .................5
3.1.2 USB communication................................................................ .................6
3.2 Sensor interface (marked on the board: J2)................................................ .......... 7
Appendix................................................. ................................31
Chapter 1 Overview
ZFM-20 series stand-alone fingerprint recognition module is launched by Hangzhou Zhian Technology Co., Ltd. It is based on SynoChip high-speed DSP processor.
As the core, combined with the optical fingerprint sensor with the company's independent intellectual property rights, without the need for the host computer to participate in management, it has
An intelligent module with functions such as fingerprint entry, image processing, fingerprint comparison, search and template storage.
Fingerprint processing includes two processes: fingerprint login process and fingerprint matching process [where fingerprint matching is divided into fingerprint comparison (1:1)
When fingerprint login, enter each fingerprint 2 times, will 2 The second-entry image is processed, and the composite template is stored in the module. When the
fingerprint is matched, through the fingerprint head sensor, the fingerprint image to be verified is entered and processed, and then matched and compared with the
fingerprint template in the module (if it matches with a template specified in the module, it is called the fingerprint comparison method, that is1:1 method; if it matches
with multiple templates, it is called fingerprint search method, that is, 1:N mode), the module gives a matching result (pass or fail).
The complete model of the fingerprint module of our company adopts the following rules. When ordering products from our company, please fill in the complete model number as
B:930 pieces
S: serial (Series:UART)
1: All-in-one
optics 20 series
Note: 1) The lead length refers to the length of the cable connected between the module main board and the optical fingerprint sensor. Integral modules do not have this lead.
2) software version can be omitted when ordering for the first time or non-specified version, that is, the latest version of our company is adopted by default.
Window area: 14 ╳ 18 mm
Match method:
storage:162/930 pieces
Communication baud rate (UART):(9600╳N)bps where N=1〜12 (default value N=6, ie 57600bps)
working environment:
Temperature: -20℃-+50℃
Relative humidity: 40%RH-85%RH (non-condensing)
Storage environment:
Temperature: -40℃-+85℃
Relative humidity: <85%H (no condensation)
Dimensions (L╳W╳H):
Split type:
mold Block: 42 ╳ 25 ╳ 8.5mm (Installation size: 31.5 ╳ 19 mm )
Fingerprint sensor: 56 ╳ 20 ╳ 21.5mm
All-in-one:56 ╳ 20 ╳ 21.5mm
no matter what you order UART still is USB Interface type (but the factory settings of the hardware circuits on the board are different, please do not mix them), in
PCB On the board, the interface between the module and the user equipment adopts the same single-row socket/pin (split type is 5 core 2.0 Spacing, one-piece is 4 core
1.27 spacing).
When the user has no special requirements, the provided user interface lead length is 150mm.
When the module communicates with the user equipment serially, the interface J1 The pins are defined as follows:
2 TD out Serial data output. TTL logic level. (Line color: green)
4 GND - signal ground. Internally connected to power ground. (Line color: black)
Note: Type column, in represents the input to the module, out output from the module.
Through the serial communication interface, the module can be directly connected with the 3.3V or 5V Communication with the single-chip microcomputer of the power supply:
the module data sending pin (2 foot TD) connected to the data receiving end of the host computer (RXD), module data receiving pin (3 foot RD) connected to the data sending end of the
If required with RS-232 level (for example:PC to communicate with the host computer), please add a level conversion circuit between the module
Using half-duplex asynchronous serial communication. Default baud rate57600bps, which can be set by the command to 9600~115200bps.
The transmitted frame format is 10 bit, bit 0 level start bit,8 Bit data (low order first) and one stop bit, no parity
bit.
After the module is powered on, it takes about 500mS Time for initialization work. During this period, the module cannot respond to the command of the upper computer.
3.1.1.4 Electrical parameters (All levels to power/signal ground GND is the reference level)
1. power input
parameter
project unit prepare Note
minimum typical maximum
limit voltageVinmax - 0.3 7.0 V Exceeding this range may cause permanent damage
module and user equipment USB When communicating, the interface J1 The pins are defined as follows:
1 Vin in Positive input terminal of power supply. (Refer to 3.1.1.4 for electrical parameters)
5 END - protected area. It can be suspended or can be connected to the shielding layer of the communication lead.(All-in-one module does not have this pin)
Note: Type column,in represents the input to the module,out output from the module.
The split module provides a dedicated interface to the optical fingerprint sensor board (15-pin single-row socket/pin, 1.25mm pitch). Use this interface
to connect to the sensor board through a 15-pin cable. When the user has no special requirements, the provided lead length is 150mm.
All-in-one module The interface is an internal connection and does not require user consideration.
In order to meet the needs of different customers, the module system provides a lot of resources for the user system to use.
4.1 buffer
There is an image buffer ImageBuffer with a size of 72K bytes and two characteristic file buffers CharBuffer1 and CharBuffer2 with a size
of 512 bytes in the module RAM. The user can read and write any buffer through instructions. The contents of the image buffer and the two
profile buffers are not saved when the module is powered off.
Image buffer ImageBuffer is used to store image data and use in image processing inside the module. When uploading/downloading images, the
When uploading or downloading images through the UART port, in order to speed up the speed, only the upper four bits of the pixel byte are used, that is, 16-level
grayscale is used, and each byte represents two pixels (the high four bits are one pixel, and the low four bits are the same. A pixel in the next adjacent column of the row,
that is, two pixels are combined into one byte and transmitted). Since the image is16 grayscale levels, uploaded to PC When displaying (corresponding to BMP format), the
grayscale should be expanded (expanded to 256 grayscale, i.e. 8bit bitmap format).
Transmission through the USB port is a full 8-bit pixel, that is, 256 gray levels.
The feature file buffer CharBuffer1 or CharBuffer2 can be used to store both common feature files and
template feature files.
The module has opened up a storage area in FLASH as the fingerprint template storage area, which is commonly known as the fingerprint library. The data in the fingerprint
The fingerprint templates are stored according to the serial numbers. If the capacity of the fingerprint database is N, the serial numbers of the fingerprint templates in the fingerprint database are defined as: 0, 1, 2...N-2,
N-1. Users can only access the contents of the fingerprint database according to the serial number.
For the convenience of users, the module opens some system parameters, allowing users to individually modify the specified (by parameter serial number) parameter values
through commands. See the command to set the basic parameters of the module systemSetSysPara and read system parameter command ReadSysPara.
When the host computer sends an instruction to modify system parameters, the module first responds according to the original configuration, and then modifies the system settings after the
response, and records the configuration in FLASH. After the system is powered on next time, it will work according to the new configuration.
This parameter controls the communication baud rate when the module communicates with the host computer through UART. If the parameter value is N (the value of N ranges from 1 to
This parameter controls the fingerprint comparison and the comparison threshold during search. It is divided into 5 level, the value range is:1,2,3,4,5. When the security level is 1, the false
acceptance rate is the highest, and the rejection rate is the lowest. The security level is5 When the false rate is the lowest, the rejection rate is the highest.
When this parameter controls the communication between the module and the host computer, the maximum length of the packet content in the data is allowed
for each transmission. The value range is: 0,1,2,3, the corresponding lengths (number of bytes) are:32,64,128,256.
The system status register indicates the current working status of the module. It can be read through the command ReadSysPara, the length is 1Word. Its bits are
defined as follows:
Tag number 15 4 3 2 1 0
significance Reserved ImgBufStat PWD Pass Busy
Note:
Busy: occupy 1 bit, set to 1 to indicate that the system is executing commands, 0 to indicate that the system is idle; Pass:
PWD: One bit, set to 1 means the device handshake password is verified; ImgBufStat: One bit, set to 1
After the module is powered on and reset, it will firstly check whether the device handshake password has been modified. If it is not modified, the module considers that the host
computer does not need to verify the password, and directly enters the normal working state; that is, when the module password is the default password, it does not need to verify the
If the module internal password has been modified (see the set password command SetPwd), the device handshake password must be verified first, and the
module will enter the normal working state after the password is passed. Otherwise the module refuses to execute any instruction.
After the password is modified, the new password will be saved in Flash, and it will still be saved when the
power is turned off. See Authentication PasswordVfyPwd Command and set password SetPwd instruction.
Each module has an identification address. When the module communicates with the host computer, each instruction/data is transmitted in the form of a data
packet, and each data packet contains an address and an address item. The module only reacts to commands and data packets that contain the same address as its own.
The module address is 4 bytes, and the default value is: 0xFFFFFFFF. The user can modify the module address through the command (see the SetAdder command
for setting the module address). After the module address is modified, the new address is still saved after the module is powered off.
The module integrates a hardware 32-bit random number generator (no random number seed is required). The user can let the module generate a random
number and upload it through instructions. See the sampling random number instruction GetRandomCode.
The communication protocol defines the rules of information exchange between ZFM-20 series modules and the host computer. Whether the hardware uses UART or
It is a USB interface type, and both use the same communication protocol and instruction set. If the host computer uses a PC, it is recommended to order a USB interface
type of module to improve the system speed (because the uploading image has many gray levels and fast speed when using USB, at this time the module can be used for fingerprinting
collector) .
The module communicates with the host computer, and the receiving and sending of commands, data and results are carried out in the form of data packets.
Packet format:
Baotou address code Package ID package length Package content (command/data/parameter/confirmation code) checksum
Baotou START 2 bytes Fixed to 0xef01, the high byte is first when transmitted.
The default value is 0xffffffff, and the user can generate a new address through instructions. The
address code ADDER 4 bytes
module will reject packets with incorrect addresses. High byte first when transmitting.
Indicates that it is a data packet (Data packet), and there are subsequent packets.
0x02 The data packet cannot enter the execution flow alone, and must follow the instruction packet
The maximum value is 256 bytes; the packet length refers to the length of the packet content
package length LENGTH 2 bytes (command/data) plus the length of the checksum (ie, the length of the packet content + 2). The
It can be command, data, command parameter, response result, etc. (Fingerprint feature
Package Contents DATA -
value and fingerprint template are all data)
Arithmetic cumulative sum of all bytes of packet identification, packet length and packet content,
checksum SUM 2 bytes
and the carry over 2 bytes is ignored. High byte first when transmitting.
Instructions can only be given to the module by the host computer, and the module will respond to the host computer.
After the module receives the command, it will report the execution status and result of the command to the host computer through the response packet. The reply contains parameters and can be
followed by subsequent packets. The host computer can only confirm the receiving status of the module and the command execution status after receiving the module's response packet.
The content of the response packet includes a one-byte confirmation code (must have) and possible return parameters.
5. 0x06: Indicates that the fingerprint image is too messy to generate features;
6. 0x07: Indicates that the fingerprint image is normal, but the feature points are too few (or the area is too small) to generate features;
10. 0x0b: Indicates that the address serial number exceeds the range of the fingerprint database when accessing the fingerprint database;
11. 0x0c: Indicates that there is an error or invalidity in reading the template from the fingerprint library;
13. 0x0e: Indicates that the module cannot accept subsequent data packets;
18. 0x15: Indicates that there is no valid original image in the buffer and the image cannot be generated;
ZFM-20 series modules have a total of 21 instructions. The application program realizes various fingerprint recognition functions through different combinations of instructions.
All command/data transfers are delivered in packets. For package formats and definitions see5.1 packet format.
Function description: Verify the module handshake password (see 4.6 Module Password).
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Set the module handshake password (see 4.6 module password).
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Set the module address (see 4.7 Module address) .
Input parameter: module new address
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+Module new address (4 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: work parameter setting (refer to 4.4 system configuration parameters). Input
confirmation code =0x1a Indicates that the register serial number is incorrect;
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+parameter number (1 byte)
+ content (1 byte);
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
package content length 6 Value range: 0, 1, 2, 3, corresponding length (number of bytes): 32, 64, 128, 256
Function description: Read the module's status register and system basic configuration parameters (see 4.4 System Configuration Parameters and 4.5
0xef01 XXXX 0x07 0x0013 X The structure is shown in the table below Sum
Note: Confirmation code=0x00 means OK;
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+Basic parameters(16 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Offset
name Content description size (word)
(Character)
Function description: Read the module fingerprint template index table, and read the index table of up to 256 fingerprint templates each time.
Index page 0 means reading 0〜255 fingerprint template index table index page
1 means reading 256〜511 fingerprint template index table index page 2 means
reading 512〜767 fingerprint template index table index page 3 means reading
0xef01 XXXX 0x07 0x0023 X The structure is shown in the table below Sum
Note: 1. Confirmation code = 0x00 means reading the index table successfully;
2. At most 256 fingerprint template index data are read each time, and “0” is added if the data is less than 256 bits. .
3. Index table data structure: every 8 bits is a group, and each group starts to output from the high bit. See the table below for details:
Transmission order The sequence is output from low byte to high byte, and each byte is output from high byte.
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+index page (1 byte);
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+direction chart(N bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Read the number of fingerprint templates stored in the module.
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+number of templates (2 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: detect the finger, record the fingerprint image and store it in ImageBuffer after detection, and return to confirm the success of the registration
code. If no finger is detected, it will directly return to the no-finger confirmation code.
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Upload the data in the module image buffer ImageBuffer to the upper computer and upload it to the upper computer (see
2. Send the command packet, the module sends the data packet or the end packet after the response, and the data packet and the end packet have no response packet; 3. The
value of the number of bytes in the packet content N is determined by the length of the packet content, and the length of the factory packet content is set to 128 bytes;
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: The host computer downloads the image data to the module image buffer ImageBuffer, see 1.1.1 image buffer
Area).
Input parameter: none
2. Send the command packet, and the module will receive the data packet or end the packet after the module responds.
3. The value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes.
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Generate fingerprint features from the original image in ImageBuffer, and store the file in CharBuffer1 or
CharBuffer2.
Input parameter: BufferID (feature buffer number)
Confirmation code=0x06 means that the fingerprint image is too messy to generate features; Confirmation code=0x07 means that the
fingerprint image is normal, but there are too few feature points to generate features; Confirmation code=0x15 means that there is no
valid original image in the image buffer and the image cannot be generated ;
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Merge the feature files in CharBuffer1 and CharBuffer2 to generate a template, and the result is stored in
Confirmation code=0x0a means the merging fails (the two fingerprints do not belong to the same finger);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Upload the characteristic file in the characteristic buffer CharBuffer1 or CharBuffer2 to the upper
packet format:
2. Send an instruction packet, the module sends a data packet or an end packet after responding, and there is no response packet for the data packet and the end packet. 3. The
value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes. 4. This
instruction does not affect the content in the module feature buffer.
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+good buffer (1 byte);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: The host computer downloads the feature file to a feature buffer of the
Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively. Response
packet format:
2, Send the command packet, and the module will receive the data packet or end the packet after the module responds.
3. The value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes.
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: store the template data in the specified feature buffer (CharBuffer1 or CharBuffer2) to
Input parameters: BufferID (buffer number) + PageID (fingerprint library location number, two bytes, high byte first). Return
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte)
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Read the fingerprint template with the specified ID number in the flash database into the template buffer CharBuffer1 or
CharBuffer2.
Input parameters: BufferID (buffer number) + PageID (fingerprint library template number, two bytes, high byte first). Return parameter:
confirmation word
packet format:
Confirmation code=0x0c indicates that there is an error in reading or the template is invalid;
Confirmation code=0x0b Express PageID beyond the scope of the fingerprint database;
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (2 bytes)
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function Description:Delete the specified segment (N fingerprint templates starting with the specified ID number) template in the module fingerprint library. Input
parameters: PageID (fingerprint library template number) + N The number of templates to be deleted.
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+page number(2 bytes)
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: delete all fingerprint templates in the fingerprint library in the module.
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: module accurate comparison (1:1) characteristic files in CharBuffer1 and CharBuffer2, and give the ratio
to the results.
2, After the instruction is executed, the contents of the two feature buffers remain unchanged.
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+Score(2 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: Search the whole or part of the fingerprint library with the characteristic files in CharBuffer1 or CharBuffer2. ifso
Input parameter: BufferID + StartPage (start page) + PageNum (page number) Return parameter:
packet format:
2,After this instruction is executed, the content in the feature buffer does not change.
★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 bytes)
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+page number(2 bytes)
+ score(2 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
Function description: make the module chip generate a random number and return it to the host computer (see 4.8 Random Number Generator) .
Input parameter: none
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+random number(4 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;
type serial number code Function Description type serial number code Function Description
4 0x0e 16 0x07
system
Set system parameters read template
5 0x0f 17 0x0c
where
Read system parameters delete template
kind
6 0x1f Read fingerprint template index table 18 0x0d Clear fingerprint library
reason
where
10 0x0b Download images That twenty one 0x14 sampling random numbers
reason
11 0x02 image to feature he
kind 12 kind
0x05 Feature Synthesis Template
0x09 DownChr Download Features 0x1f ReadConList Read fingerprint template index table
Appendix
- - - - - - - - - - - End----------