Design of a Fingerprint Recognition USB Drive Based on STM32
The USB flash drive is one of the tools we frequently use in our daily life and work. It assists us in storing and copying important files and data. Its compact size makes it easy to carry around, while offering large storage capacity, affordability, and reliable performance. The USB drive's dimensions are quite small, roughly the size of a thumb, and it is very lightweight, typically around 15 grams. This makes it especially convenient for carrying with you; you can hang it around your neck, attach it to a keychain, or even slip it into your wallet. Storing crucial data on a USB drive is immensely important, but losing such a device could lead to confidential information being exposed. Hence, the security of data on USB drives is particularly vital. With advancements in technology, recent years have seen the introduction of password-protected USB drives. Nonetheless, these can still be decrypted using software and algorithms.
In recent years, as smartphones have evolved, the security of the information they contain has become increasingly critical. This has led to the implementation of technologies like voice recognition, fingerprint, facial recognition, and iris scanning in mobile applications. Among these, fingerprint unlocking is well-suited for encrypting USB drives due to fingerprint characteristics being immutable, unique, and convenient. Fingerprint recognition works by comparing detailed features of different fingerprints. This technology encompasses numerous fields, including image processing, pattern recognition, computer vision, mathematical morphology, and wavelet analysis. Since each person's fingerprints are distinct, and even the ten fingers of the same individual show significant differences, fingerprints can be used for identity verification. Given that each impression may differ slightly due to variations in angle and pressure, and considering the presence of many blurry fingerprints, accurately extracting features and achieving correct matches remains central to fingerprint recognition technology.
Thus, utilizing microcontroller technology and fingerprint recognition, I have designed and created a fingerprint-recognition USB flash drive.
I upgraded a standard USB drive to design and manufacture this fingerprint-recognition USB drive. The principle behind it is relatively straightforward. First, fingerprints are enrolled via a fingerprint recognition module on a PC. Then, the microcontroller continuously obtains and evaluates the matching results from the fingerprint module. If the match is successful, the microcontroller activates the USB drive's power by controlling transistors, enabling the computer to read and write data on the USB drive.
Power Section: The power is supplied through a USB male connector, providing a 5V voltage from the USB power source. This voltage is then regulated to 3.3V by the SPX3819 to power the microcontroller circuit. Although the SPX3819 comes in a compact SOT23-5 package, it can deliver an output current of up to 500mA. It features rapid transient response, wide input voltage range, low quiescent current, low noise, and high Power Supply Rejection Ratio (PSRR), making it an excellent choice as an LDO linear voltage regulator chip.
The USB flash drive section utilizes a black resin USB drive, as shown in the image below. The black resin USB drive is a semi-finished module that employs PIP (Plastic Interconnect Package) encapsulation technology, integrating both the USB interface and the chip. This design boasts several features: massive storage capacity akin to memory cards, high read/write speeds, robustness (withstanding pressures up to 50 Newtons), excellent waterproof and anti-static properties, and high-temperature resistance.
The microcontroller section employs the STM32F103T8U6, which has only 36 pins and uses a QFN package, resulting in a remarkably compact chip. Despite its small size, it is fully equipped with everything necessary. It integrates the Cortex-M3 core, featuring a main frequency of 72MHz, 64KB of Flash memory, 20KB of sram, two 12-bit ADCs, seven timers, two hardware I2C interfaces, three serial ports, two SPI interfaces, as well as CAN and USB 2.0 interfaces. In short, it is an exceptionally powerful device.
The power control section for the USB drive is relatively straightforward. It utilizes the I/O port of a microcontroller to regulate the conduction and interruption of an SS8550 transistor, thereby controlling the power supply of the USB drive.
For the fingerprint recognition part, a capacitive fingerprint recognition module is employed. This module acquires fingerprints by detecting changes in capacitance values. Capacitive sensors are a type of semiconductor sensor, with the semiconductor capacitive fingerprint sensor being widely used. These sensors use automatic control technology to adjust the pixel resolution of the fingerprint image and the sensitivity of local fingerprint regions. By integrating feedback information from different environments, they generate high-quality images. Thanks to the capability for localized adjustment, even low-contrast images (such as areas where the finger is pressed lightly) can be effectively detected. The sensor increases the sensitivity of these pixels at the moment of capture, producing high-quality fingerprint images.
Capacitive fingerprint sensors boast several advantages, including superior image quality with minimal distortion, compact size, and ease of integration into various devices. The electronic signals they emit penetrate the surface of the finger and the dead skin layer, reaching the live skin layer (dermis) to directly capture the fingerprint pattern, thereby significantly enhancing system security. For capacitive sensors, drier conditions are preferable, as they do not face the same issues as optical sensors. Humidity levels up to 85% are acceptable; however, excessively high humidity can interfere with the electric field because water is a conductor, so it should not exceed this threshold. Additionally, since the sensor captures the patterns in the dermis layer, superficial wear on the epidermis does not affect its sensitivity. This module employs serial communication and comes with an integrated fingerprint recognition algorithm, making it convenient for development and use. Its high integration and small size make it easy to embed in fingerprint-recognition USB drives.
Let us now proceed with the creation of the fingerprint-recognition USB drive.
1.Select an appropriate USB device casing
2.Design a circuit board with appropriate shape and dimensions according to the internal structural layout of the USB device casing.
3.Solder the circuit board.
4.Use a heat gun to solder the epoxy-coated USB drive onto the backside of the circuit board. Ensure that the USB contacts on the epoxy-coated drive are connected to the circuit board pads with solder, which serves both to establish the connection and to secure the components in place.
5.Create an opening on the upper shell cover.
6.Install the fingerprint recognition module.
7.Place the welded circuit board into the casing and connect the fingerprint recognition module properly.
8.Finally, install the outer shell, and the creation is complete.
Finally, we come to the program design for the fingerprint recognition USB drive. The principle is relatively simple: the microcontroller continuously obtains fingerprint matching results in real-time. Upon detecting a correct fingerprint match, it powers the epoxy-coated USB drive, enabling the computer to recognize the USB drive.
After using it for some time, I feel that the results are quite impressive. Even in dry weather conditions, the success rate of fingerprint recognition remains notably high.