A design of fingerprint recognition system based on USB and DSP

Publisher:郑大大Latest update time:2014-12-27 Source: 互联网Keywords:USB Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  Universal Serial Bus (USB) is a new interface technology. It is a serial communication standard developed by Intel, Microsoft and other companies to solve the contradiction between the increasing number of peripherals and the limited motherboard slots and ports. USB has the following characteristics: (1) It has a high transmission rate. USB1.1 supports both full speed and low speed, with a full speed rate of 12Mbps and a low speed rate of 1.5Mbps; in addition to supporting the two speed modes of USB1.1, USB2.0 also adds a high-speed mode with a rate of up to 480Mbps. (2) It is easy and flexible to use. USB supports plug-and-play and hot-swap, allowing peripherals to be connected and disconnected at any time. When a peripheral is connected, the system automatically detects the peripheral and is ready for use. (3) It is easy to expand. Through the root hub, 127 devices can be carried, truly realizing that multiple peripherals share one interface. In addition, USB has the advantages of high reliability, low cost, and low power consumption, and is very popular.

  1 Overall solution selection

  Since fingerprint image processing technology has high requirements for real-time performance and large amount of calculation, a general digital processing chip is used. The high-speed computing performance of DSP gives it a unique advantage in the processing of digital signals. However, the amount of digital signal data is very large, and a convenient and high-speed interface is required to connect with the PC. This article presents a low-cost high-speed USB interface solution based on the DSP (TMS320VC5402) platform. It uses Philips' PDIUSBDl2 interface chip to achieve high-speed data transmission between DSP fingerprint image acquisition and processing and PC. This system covers digital image processing technologies such as image acquisition, processing, storage, and transmission. Its hardware principle is shown in Figure 1.

Hardware Block Diagram
Figure 1 Hardware block diagram

  The fingerprint image and digital output are obtained through the image sensor, and the image data is passed to the central processing chip DSP. The DSP processes the image in real time, such as filtering, image smoothing and sharpening, binarization, feature point extraction, etc., and outputs the processing results to the host computer through USB. In the entire fingerprint image acquisition and processing system, the DSP has three main functions: setting the contrast, brightness, sharpness and other parameters of OV6620 through its I2C bus; digitally processing the fingerprint image; responding according to the USB specification, providing device identification, solidifying PDIUSBDl2, and communicating with the host computer.

  2 System Hardware Solution Selection and Design

  2.1 Image Sensor

  CMOS image sensor is a new type of image sensor that has developed rapidly in recent years. It can integrate pixel array and peripheral support circuit on the same chip, which is a complete image system. Compared with CCD products, it has low power consumption, small size and low cost.

  In the acquisition system, OV6620 is used as the image acquisition chip. OV6620 is a CMOS black and white image acquisition chip developed by Omni Vision. The chip integrates the CMOS light sensing core with peripheral support circuits. The output video is a black and white image. Technical parameters: resolution 352x288, speed 30 frames/second.

  2.2 Digital Signal Processing Chip

  This system uses the high-performance digital signal processor TMS320VC5402 launched by TI. It adopts the Harvard bus structure with completely independent program space and data space, and the execution of instructions adopts a pipeline structure. It has one or more processing cores inside, with an on-chip hardware multiplier. Its instruction execution speed is as fast as tens of nanoseconds, and its processing capacity is 100MIPS. These provide a broad application space for DSP in high-speed and large-volume data acquisition and processing systems. There are 8 buses (4 program memory buses, 1 data memory bus and 3 address buses), on-chip memory and on-chip peripheral circuits and other hardware in the chip. It has a highly specialized instruction system with the advantages of low power consumption and high parallelism.

  2.3 USB interface chip

  Many semiconductor companies in the world have participated in the development of USB chips, forming a variety of product lines. Such as Intel 8*930AX/HX, Cypress FX2 high-speed USB microcontroller, National Semiconductor's USBN9602/9603. For the design of USB interface based on DSP platform, after comprehensive consideration of several solutions, it was decided to use a USB interface chip PDIUSBDl2 without MCU core, plus simple peripheral circuits and timing adjustment circuits. Mainly because it meets the performance requirements of the project, uses an external CPU, and has a very low cost.

  PDIUSBDl2 is a USB interface chip with outstanding features launched by Philips. It fully complies with the USBl.1 protocol, and integrates a serial interface engine (SIE), a 320-byte multi-structure FIFO memory, a transceiver, and a voltage regulator. It can work at a working voltage of 5V or 3.3V; it has an 8-bit data bus and has fully autonomous DMA transfer operations. It also has a controllable software connection (SoftConnect) function, which can ensure that the USB bus is connected after the microcontroller is reliably initialized. Multi-interrupt mode realizes batch and synchronous transmission, and a data transfer rate of 1MB/S can be achieved in batch and synchronous modes. PDIUSBDl2 is highly integrated, highly reliable, and has a wide range of working conditions, which can be very conveniently compatible with most DSP working environments.

  3 Software Design

  3.1 Firmware Design

  Firmware programming is an important part of the terminal device programming in the USB data transmission system. The microprocessor exchanges data with the computer through the firmware program. Since the USB interface chip without MCU core is used, the implementation of the USBl.1 protocol specification must be completed by DSP (TMS320VC5402) controlling the PDIUSBDl2 chip. Programs are written on the DSP (TMS320VC5402) platform to complete the standard requests required by the USBl.1 specification and the requests defined by the user according to product needs.

  When the device is connected to the host, the host sends a control transfer (ie, Setup packet) containing a standard USB request to endpoint 0 of PDIUSBDl2. PDIUSBDl2 generates an interrupt to the MCU (1NT0). The MCU responds to each request by reading the interrupt register and the last transfer status register of PDIUSBDl2, and sends back the request information through endpoint 0 of PDIUSBDl2. The host reads the description data (including device descriptor, configuration descriptor, interface descriptor, endpoint descriptor, string descriptor) from the returned information, allocates and loads a device driver and configures the device. After the device configuration is completed, the endpoints supported in the configuration can be used to transfer data. The firmware program structure is shown in Figure 2.

Firmware Program Structure
Figure 2 Firmware program structure

  3.2 Device Drivers

  3.2 Device Drivers

  In Win32 system, each device is abstracted as a file. At this time, the application only needs to use a few simple file operation API functions to communicate with a device in the driver.

  The driver of the PC is provided by Philips. Use VC++6.0 to write the PC application by calling the API function. In this way, the PC can control the DSP (TMS320VC5402) fingerprint imaging system and transmit the image. The main API functions used are DeviceIOControl(), ReadFile(), and WriteFile(). DeviceIOControl() is used for the PC (host) to send a request to the DSP image acquisition system; ReadFile() and WriteFile() are used to read data from the image acquisition system and write data to the image acquisition system respectively. The problem that must be paid attention to during the design process is: Since the USB interface is a master-slave interface, all its transmission processes must be started after the host sends a request to the peripheral device, so before using ReadFile() and WriteFile() to read and write data, you must first send a request to the image acquisition system through DeviceIOControl().

  3.3 Fingerprint Recognition Process

  When the system is powered on, TMS320VC5402 sets OV6620 through I2C bus operation, and then enters the fingerprint image acquisition stage. In this stage, TMS320VC5402 is in an idle state, CPLD occupies the data bus,

  The data is directly stored in the image RAM. After collecting a frame of fingerprint image, the CPLD sends a handshake signal to notify the DSP to enter the data processing stage. In this stage, the TMS320VC5402 first moves the data in the image RAM to the user RAM in blocks, performs image preprocessing, feature point extraction and other operations, and finally outputs the results to the host computer through USB. The host computer calls up the fingerprint database and compares the extracted results with the data in the fingerprint feature library, so as to match and identify the fingerprint with the feature fingerprint in the library.

  The DSP algorithm is as follows: (1) Pre-filtering. Directional filtering: A horizontal template is designed, and then the horizontal template is rotated to the direction of the required enhancement for filtering. (2) Binarization. Background separation: The standard deviation threshold tracking method is used. The fingerprint part of the image is composed of black and white textures, with a large grayscale variation and a large standard deviation, while the grayscale distribution of the background part is relatively flat and has a small standard deviation. Therefore, the standard deviation of a group of pixels centered on each point is calculated. When the standard deviation is greater than a certain threshold, it can be determined that the point is the foreground, otherwise it is the background. (3) Calculation of the direction map: A method based on the normal vector is used, which also involves smoothing and sharpening of the direction field. (4) Feature point extraction: The ridge tracking method is used. Its basic idea is to directly track the ridges of the image and detect feature points during the tracking process.

  The entire software process is shown in Figure 3.

Software Flowchart

Keywords:USB Reference address:A design of fingerprint recognition system based on USB and DSP

Previous article:Suspension motion control design based on 32-bit DSP and motor driver chip
Next article:Design of face recognition system based on DSP

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号