MikroElektronika Learn

Click Boards

Fingerprint click – the complete biometric solution

7 Dec , 2016  

Biometric security is definitely a thing of the future, from fingers to eye retinas, even earlobes can be used to uniquely identify a human being. That is why we have decided to offer our customers a platform to develop biometric systems as efficiently as possible – get familiar with the Fingerprint click.

The click carries the GTS-511E2 fingerprint module. The module has  a CMOS image sensor covered with a lens. The CMOS sensor is built smart enough to recognize whether the fingerprint is real or a 2D copy. Along with the image sensor, the click also carries the STM32F415 MCU, which is the main operating unit of this click board. The STM32F415 contains firmware developed by our engineers. The firmware is designed so that the click can be used either as a standalone USB HID with a Windows PC application or as a SPI slave communicating with a host MCU. Since the first batch of Fingerprint clicks has been released with a previous firmware, designed only for standalone use, if you have bought the click before this article, you will need to perform a firmware update.

How to update the firmware

The current Fingerprint click comes equipped with our USB HID bootloader. If your PC recognizes the bootloader, the only thing you need to do is download the firmware from Libstock and upload it onto the click using the bootloader. The instructions on how to use our bootloader can be found here.

Now that you have the new firmware uploaded, you can use the click either as a standalone device with our Fingerprint click PC application, or with a host MCU.

Using the click with the PC application

The application can be downloaded from Libstock. Here’s how to use it:

Start the application, and connect your PC with the click with a USB mini connector. For the first 5 or so seconds, the PC will recognize the click as “Mikroelektronika USB HID bootloader“. This is because our bootloader has been designed to wait 5 seconds for the PC to connect, if 5 seconds pass, the MCU will jump out of bootloader mode and proceed with the user code. Once the click is out of bootloader mode your PC should detect the click as  “Mikroelektronika FINGERPRINT“, and you should see the status “Ready” on the bottom left of the application.

Fingerprint application

Fingerprint application

Now you can fully operate your Fingerprint click! If you click on the fingerprint icon, the click will capture an image and send it to the PC. The image will be displayed on the main window. The status label should read “Fingerprint transferred”

Fingerprint scanning

Fingerprint scanning

If you want to save this image, just hit the save icon on the right.

Saving the image

Saving the image

In the settings window, you can set the different CMOS image sensor settings such as the exposure time or global gain. Once you hit SAVE, these settings will be sent from the PC to the click and stored in the clicks EEPROM.

Fingerprint click settings

Fingerprint click settings

Using the click with a host MCU

The click can also communicate with an external host over SPI. We have made a simple example that shows how to do it. Let’s look at the example in which we will interface a STM32F107 host MCU with the Fingerprint click.

We start of by initializing SPI communication and the TFT display, after which we will ping the click until we get a FP_READY byte as a response.

 

Every command sent has it’s appropriate response, therefore, all the commands will ping the click until they get the right response. If something goes wrong, the MCU will continue to ping and be stuck forever in this loop. This is the case for all the functions used here. Let’s take a look at the fingerprint_is_ready function for a clear example:

 

You can see here that we first send a FP_TEST command, once the click receives this command, the internal buffer of the click will be set to FP_READY as a response. Once we issue an SPI_Read command, we should receive this response. The same goes for all other functions: we send a command, and then the internal buffer of the click will be set to the appropriate response.

 

Let’s look at the whole code now. After we are sure that the click is ready, we send a command for the click to capture an image, and then for the click to send us the image bytes. For every SPI_Read we issue, we will get one byte of the image. Each byte is then sent to the TFT display.

 

And that’s the whole deal. Getting a fingerprint scan has never been easier. Use the images whoever you seem fit and create your unique biometric security system! All the software mentioned here can be found on Libstock or GitHub. Good luck!

References:

wikipedia.org “Biometricswikipedia 2016

wikipedia.org “CMOS” wikipedia 2016

wikipedia.org “USB Human Interface Device” wikipedia 2016

ST Microelectronics

MikroElektronika

Libstock

Products mentioned

, , , , , , , ,

By
Firmware developer at MikroElektronika and STEM enthusiast. From DNA to DMA, I want to know it all!