Beginner
10 min

Integrate advanced fingerprint capture into embedded designs with FPC2530 (100026222) and ATmega328

Fast, secure, and standalone biometric authentication solution for embedded applications

Fingerprint 5 Click with Arduino UNO Rev3

Published Oct 02, 2025

Click board™

Fingerprint 5 Click

Dev. board

Arduino UNO Rev3

Compiler

NECTO Studio

MCU

ATmega328

Add secure authentication to door locks, access systems, and digital wallets with fast and secure fingerprint capture, matching, and verification

A

A

Hardware Overview

How does it work?

Fingerprint 5 Click is based on the FPC2530 (100026222), a fingerprint sensor from Fingerprints that brings reliable biometric identification into embedded applications by using the advanced fingerprint recognition technology. This sensor provides a complete biometric system with onboard authentication software, enabling fast and accurate fingerprint capture, matching, and verification directly on the device without the need for external processing. The sensor automatically creates fingerprint templates that are securely stored in its internal flash memory, while encrypted template storage ensures data privacy and protection against unauthorized access. Designed with navigation support for intuitive operation, the FPC2530 is enhanced by its durable black coating and a built-in hidden discharge node (bezel), offering robust protection against electrostatic discharge, scratches, impacts, and everyday wear and tear. The Fingerprint 5 Click is an excellent

choice for advanced biometric applications such as access control systems, door locks, crypto wallets, FIDO authenticators, secure tokens, digital access devices, as well as time and attendance systems where security, reliability, and long-term durability are essential. This Click board™ is designed in a unique format supporting the newly introduced MIKROE feature called "Click Snap." Unlike the standardized version of Click boards, this feature allows the main sensor/IC/module area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the FPC2530 can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location. This board supports communication with the host MCU through either SPI or UART interfaces, with SPI being the default

option. The communication interface is selected by adjusting the COMM SEL jumper to the desired position. To enhance flexibility, particularly with the detachable Snap section of the Click Snap format, an additional COMM SEL jumpers are available. These jumpers functions the same as the COMM SEL, allowing for independent communication interface selection when the Snap section is used independently. To ensure proper functionality, all COMM jumpers must be set to the same interface. In addition to the interface pins, the board also includes IRQ pin that serves as interrupt request in SPI interface or as host wake-up signal in both SPI and UART interfaces. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. It also comes equipped with a library containing functions and example code that can be used as a reference for further development.

Fingerprint 5 Click hardware overview image

Features overview

Development board

Arduino UNO is a versatile microcontroller board built around the ATmega328P chip. It offers extensive connectivity options for various projects, featuring 14 digital input/output pins, six of which are PWM-capable, along with six analog inputs. Its core components include a 16MHz ceramic resonator, a USB connection, a power jack, an

ICSP header, and a reset button, providing everything necessary to power and program the board. The Uno is ready to go, whether connected to a computer via USB or powered by an AC-to-DC adapter or battery. As the first USB Arduino board, it serves as the benchmark for the Arduino platform, with "Uno" symbolizing its status as the

first in a series. This name choice, meaning "one" in Italian, commemorates the launch of Arduino Software (IDE) 1.0. Initially introduced alongside version 1.0 of the Arduino Software (IDE), the Uno has since become the foundational model for subsequent Arduino releases, embodying the platform's evolution.

Arduino UNO Rev3 double side image

Microcontroller Overview

MCU Card / MCU

default

Architecture

AVR

MCU Memory (KB)

32

Silicon Vendor

Microchip

Pin count

32

RAM (Bytes)

2048

You complete me!

Accessories

Click Shield for Arduino UNO has two proprietary mikroBUS™ sockets, allowing all the Click board™ devices to be interfaced with the Arduino UNO board without effort. The Arduino Uno, a microcontroller board based on the ATmega328P, provides an affordable and flexible way for users to try out new concepts and build prototypes with the ATmega328P microcontroller from various combinations of performance, power consumption, and features. The Arduino Uno has 14 digital input/output pins (of which six can be used as PWM outputs), six analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header, and reset button. Most of the ATmega328P microcontroller pins are brought to the IO pins on the left and right edge of the board, which are then connected to two existing mikroBUS™ sockets. This Click Shield also has several switches that perform functions such as selecting the logic levels of analog signals on mikroBUS™ sockets and selecting logic voltage levels of the mikroBUS™ sockets themselves. Besides, the user is offered the possibility of using any Click board™ with the help of existing bidirectional level-shifting voltage translators, regardless of whether the Click board™ operates at a 3.3V or 5V logic voltage level. Once you connect the Arduino UNO board with our Click Shield for Arduino UNO, you can access hundreds of Click boards™, working with 3.3V or 5V logic voltage levels.

Click Shield for Arduino UNO accessories 1 image

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
Reset / ID SEL
PD2
RST
SPI Select / ID COMM
PB2
CS
SPI Clock
PB5
SCK
SPI Data OUT
PB4
MISO
SPI Data IN
PB3
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
NC
NC
PWM
Interrupt Request
PC3
INT
UART TX
PD0
TX
UART RX
PD1
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

Fingerprint 5 Click Schematic schematic

Step by step

Project assembly

Click Shield for Arduino UNO front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Arduino UNO Rev3 as your development board.

Click Shield for Arduino UNO front image hardware assembly
Arduino UNO Rev3 front image hardware assembly
Charger 27 Click front image hardware assembly
Prog-cut hardware assembly
Charger 27 Click complete accessories setup image hardware assembly
Board mapper by product8 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Arduino UNO MCU Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Software Support

Library Description

Fingerprint 5 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.

Example Description
This example demonstrates how to use the Fingerprint 5 Click board to enroll and identify fingerprints. The application cycles through several states: checking firmware readiness, reading version info, deleting existing templates, enrolling new fingerprints, and continuously identifying them.

Key functions:

  • fingerprint5_cfg_setup - This function initializes Click configuration structure to initial values.

  • fingerprint5_init - This function initializes all necessary pins and peripherals used for this Click board.

  • fingerprint5_enroll_finger - This function sends the enroll command for fingerprint registration.

  • fingerprint5_identify_finger - This function sends the identify command to compare the input fingerprint with existing templates.

  • fingerprint5_read_cmd - This function reads a response or event frame from the device.

Application Init
Initializes the logger and the Click board, resets the device and sets up the application state machine.

Application Task
Handles command processing and application state transitions, enabling fingerprint enrollment and identification.

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * @file main.c
 * @brief Fingerprint 5 Click Example.
 *
 * # Description
 * This example demonstrates how to use the Fingerprint 5 Click board to enroll and identify fingerprints.
 * The application cycles through several states: checking firmware readiness, reading version info, 
 * deleting existing templates, enrolling new fingerprints, and continuously identifying them.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes the logger and the Click board, resets the device and sets up the application state machine.
 *
 * ## Application Task
 * Handles command processing and application state transitions, enabling fingerprint enrollment and identification.
 *
 * @note
 * Make sure to place your finger on the sensor when prompted during enrollment and identification.
 * The example registers 2 fingerprints by default.
 *
 * @author Stefan Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "fingerprint5.h"

#define NUMBER_OF_FINGERPRINTS  2   // Number of fingerprints to register.

static fingerprint5_t fingerprint5;
static log_t logger;

/**
 * @brief Example states.
 * @details Predefined enum values for application example state.
 */
typedef enum
{
    FINGERPRINT5_APP_STATE_WAIT_READY = 0,
    FINGERPRINT5_APP_STATE_VERSION,
    FINGERPRINT5_APP_STATE_DELETE_TEMPLATES,
    FINGERPRINT5_APP_STATE_ENROLL,
    FINGERPRINT5_APP_STATE_IDENTIFY

} fingerprint5_app_state_t;

/**
 * @brief Application example variables.
 * @details Variables used in application example.
 */
static fingerprint5_app_state_t app_state = FINGERPRINT5_APP_STATE_WAIT_READY;
static fingerprint5_status_t status;
static fingerprint5_version_t version;
static fingerprint5_list_templates_t templates;
static fingerprint5_enroll_t enroll;
static fingerprint5_identify_t identify;

/**
 * @brief Fingerprint 5 parse command.
 * @details This function parses the received command response from the device and updates
 * the relevant global structures such as status, version, templates, enroll, or identify.
 * @param[in] ctx : Fingerprint 5 Click context object.
 * See #fingerprint5_t object definition for detailed explanation.
 * @note None.
 * @return None.
 */
static void fingerprint5_parse_cmd ( fingerprint5_t *ctx );

/**
 * @brief Fingerprint 5 main process handler.
 * @details This function handles the application state machine for enrolling and identifying fingerprints.
 * It sends commands based on the current state and received data, allowing multiple enrollments and continuous identification.
 * @param[in] ctx : Fingerprint 5 Click context object.
 * See #fingerprint5_t object definition for detailed explanation.
 * @note None.
 * @return None.
 */
static void fingerprint5_process ( fingerprint5_t *ctx );

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    fingerprint5_cfg_t fingerprint5_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    fingerprint5_cfg_setup( &fingerprint5_cfg );
    FINGERPRINT5_MAP_MIKROBUS( fingerprint5_cfg, MIKROBUS_1 );
    if ( UART_ERROR == fingerprint5_init( &fingerprint5, &fingerprint5_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    
    fingerprint5_reset_device ( &fingerprint5 );

    log_info( &logger, " Application Task " );
    
    app_state = FINGERPRINT5_APP_STATE_WAIT_READY;
    log_printf ( &logger, "\r\nAPP STATE: WAIT READY\r\n" );
}

void application_task ( void ) 
{
    if ( FINGERPRINT5_OK == fingerprint5_read_cmd ( &fingerprint5 ) )
    {
        fingerprint5_parse_cmd ( &fingerprint5 );
        fingerprint5_process ( &fingerprint5 );
    }
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

static void fingerprint5_parse_cmd ( fingerprint5_t *ctx )
{
    switch ( ctx->cmd.cmd_id )
    {
        case FINGERPRINT5_CMD_STATUS:
        {
            status.evt = ( ( ( uint16_t ) ctx->cmd.payload[ 1 ] << 8 ) | ctx->cmd.payload[ 0 ] );
            status.state = ( ( ( uint16_t ) ctx->cmd.payload[ 3 ] << 8 ) | ctx->cmd.payload[ 2 ] );
            status.app_fail = ( ( ( uint16_t ) ctx->cmd.payload[ 5 ] << 8 ) | ctx->cmd.payload[ 4 ] );
            if ( status.app_fail )
            {
                log_error ( &logger, "APP FAIL: %.4X\r\n", status.app_fail );
            }
            break;
        }
        case FINGERPRINT5_CMD_VERSION:
        {
            version.unique_id[ 0 ] = ( ( ( uint32_t ) ctx->cmd.payload[ 3 ] << 24 ) | 
                                       ( ( uint32_t ) ctx->cmd.payload[ 2 ] << 16 ) | 
                                       ( ( uint16_t ) ctx->cmd.payload[ 1 ] << 8 ) | 
                                                      ctx->cmd.payload[ 0 ] );
            version.unique_id[ 1 ] = ( ( ( uint32_t ) ctx->cmd.payload[ 7 ] << 24 ) | 
                                       ( ( uint32_t ) ctx->cmd.payload[ 6 ] << 16 ) | 
                                       ( ( uint16_t ) ctx->cmd.payload[ 5 ] << 8 ) | 
                                                      ctx->cmd.payload[ 4 ] );
            version.unique_id[ 2 ] = ( ( ( uint32_t ) ctx->cmd.payload[ 11 ] << 24 ) | 
                                       ( ( uint32_t ) ctx->cmd.payload[ 10 ] << 16 ) | 
                                       ( ( uint16_t ) ctx->cmd.payload[ 9 ] << 8 ) | 
                                                      ctx->cmd.payload[ 8 ] );
            version.fw_id = ctx->cmd.payload[ 12 ];
            version.fw_fuse_lvl = ctx->cmd.payload[ 13 ];
            version.ver_str_len = ( ( ( uint16_t ) ctx->cmd.payload[ 15 ] << 8 ) | ctx->cmd.payload[ 14 ] );
            if ( version.ver_str_len <= FINGERPRINT5_MAX_VERSION_SIZE )
            {
                memcpy ( version.ver_str, &ctx->cmd.payload[ 16 ], version.ver_str_len );
                log_printf ( &logger, "Device ID: %.8X %.8X %.8X\r\n", 
                             version.unique_id[ 0 ], 
                             version.unique_id[ 1 ], 
                             version.unique_id[ 2 ] );
                log_printf ( &logger, "Version: %s\r\n", version.ver_str );
            }
            else
            {
                version.ver_str_len = 0;
            }
            break;
        }
        case FINGERPRINT5_CMD_LIST_TEMPLATES:
        {
            templates.num_templates = ( ( ( uint16_t ) ctx->cmd.payload[ 1 ] << 8 ) | ctx->cmd.payload[ 0 ] );
            if ( templates.num_templates <= FINGERPRINT5_MAX_NUM_TEMPLATES )
            {
                log_printf ( &logger, "Number of templates found: %u\r\n", templates.num_templates );
                for ( uint16_t cnt = 0; cnt < templates.num_templates; cnt++ )
                {
                    templates.template_ids[ cnt ] = ( ( uint16_t ) ctx->cmd.payload[ cnt * 2 + 3 ] ) | 
                                                                   ctx->cmd.payload[ cnt * 2 + 2 ];
                    log_printf ( &logger, "ID: %.4X\r\n", templates.template_ids[ cnt ] );
                }
            }
            break;
        }
        case FINGERPRINT5_CMD_ENROLL:
        {
            enroll.id = ( ( ( uint16_t ) ctx->cmd.payload[ 1 ] << 8 ) | ctx->cmd.payload[ 0 ] );
            enroll.feedback = ctx->cmd.payload[ 2 ];
            enroll.samples_remaining = ctx->cmd.payload[ 3 ];
            log_printf ( &logger, "Enroll samples remaining: %u, feedback: ", 
                         ( uint16_t ) enroll.samples_remaining );
            switch ( enroll.feedback ) 
            {
                case FINGERPRINT5_ENROLL_FEEDBACK_DONE: 
                {
                    log_printf ( &logger, "Done" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_PROGRESS: 
                {
                    log_printf ( &logger, "Progress" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_REJECT_LOW_QUALITY: 
                {
                    log_printf ( &logger, "Reject.LowQuality" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_REJECT_LOW_COVERAGE: 
                {
                    log_printf ( &logger, "Reject.LowCoverage" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_REJECT_LOW_MOBILITY: 
                {
                    log_printf ( &logger, "Reject.LowMobility" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_REJECT_OTHER: 
                {
                    log_printf ( &logger, "Reject.Other" );
                    break;
                }
                case FINGERPRINT5_ENROLL_FEEDBACK_PROGRESS_IMMOBILE: 
                {
                    log_printf ( &logger, "Progress.Immobile" );
                    break;
                }
                default:
                {
                    log_printf ( &logger, "Unknown" );
                    break;
                }
            }
            log_printf ( &logger, "\r\n" );
            break;
        }
        case FINGERPRINT5_CMD_IDENTIFY:
        {
            identify.match = ( ( ( uint16_t ) ctx->cmd.payload[ 1 ] << 8 ) | ctx->cmd.payload[ 0 ] );
            identify.type = ( ( ( uint16_t ) ctx->cmd.payload[ 3 ] << 8 ) | ctx->cmd.payload[ 2 ] );
            identify.id = ( ( ( uint16_t ) ctx->cmd.payload[ 5 ] << 8 ) | ctx->cmd.payload[ 4 ] );
            identify.tag = ( ( ( uint16_t ) ctx->cmd.payload[ 7 ] << 8 ) | ctx->cmd.payload[ 6 ] );
            if ( FINGERPRINT5_IDENTIFY_RESULT_MATCH == identify.match )
            {
                log_printf ( &logger, "Identify MATCH on ID: %u\r\n", identify.id );
            }
            else
            {
                log_printf ( &logger, "Identify NO MATCH\r\n" );
            }
            break;
        }
        default:
        {
            log_printf ( &logger, "\r\nCMD ID: %.4X\r\n", ctx->cmd.cmd_id );
            log_printf ( &logger, "Payload Len: %u\r\n", ctx->cmd.payload_len );
            if ( ctx->cmd.payload_len )
            {
                log_printf ( &logger, "Payload:\r\n    " );
            }
            for ( uint16_t cnt = 0; cnt < ctx->cmd.payload_len; cnt++ )
            {
                log_printf ( &logger, "%.2X ", ctx->cmd.payload[ cnt ] );
                if ( 15 == cnt % 16 )
                {
                    log_printf ( &logger, "\r\n    " );
                }
            }
            if ( ctx->cmd.payload_len )
            {
                log_printf ( &logger, "\r\n" );
            }
            break;
        }
    }
}

static void fingerprint5_process ( fingerprint5_t *ctx )
{
    static uint8_t num_fingers_to_enroll = NUMBER_OF_FINGERPRINTS;
    switch ( app_state )
    {
        case FINGERPRINT5_APP_STATE_WAIT_READY:
        { 
            if ( status.state & FINGERPRINT5_STATE_APP_FW_READY )
            {
                log_printf ( &logger, "\r\nAPP STATE: VERSION\r\n" );
                app_state = FINGERPRINT5_APP_STATE_VERSION;
                fingerprint5_get_version ( ctx );
            }
            break;
        }
        case FINGERPRINT5_APP_STATE_VERSION:
        {
            if ( version.ver_str_len )
            {
                log_printf ( &logger, "\r\nAPP STATE: DELETE TEMPLATES\r\n" );
                app_state = FINGERPRINT5_APP_STATE_DELETE_TEMPLATES;
                fingerprint5_delete_templates ( ctx );
            }
            break;
        }
        case FINGERPRINT5_APP_STATE_DELETE_TEMPLATES:
        {
            log_printf ( &logger, "\r\nAPP STATE: ENROLL\r\n" );
            log_printf ( &logger, "\r\nEnrolling finger %u of %u...\r\n", 
                         ( uint16_t ) ( NUMBER_OF_FINGERPRINTS - num_fingers_to_enroll + 1 ), 
                         ( uint16_t ) NUMBER_OF_FINGERPRINTS );
            app_state = FINGERPRINT5_APP_STATE_ENROLL;
            fingerprint5_enroll_finger ( ctx );
            break;
        }
        case FINGERPRINT5_APP_STATE_ENROLL:
        {
            if ( FINGERPRINT5_STATE_ENROLL != ( status.state & FINGERPRINT5_STATE_ENROLL ) )
            {
                num_fingers_to_enroll--;
                if ( num_fingers_to_enroll > 0 )
                {
                    log_printf ( &logger, "\r\nEnrolling finger %u of %u...\r\n", 
                                 ( uint16_t ) ( NUMBER_OF_FINGERPRINTS - num_fingers_to_enroll + 1 ), 
                                 ( uint16_t ) NUMBER_OF_FINGERPRINTS );
                    fingerprint5_enroll_finger ( ctx );
                }
                else
                {
                    log_printf ( &logger, "\r\nAPP STATE: IDENTIFY\r\n" );
                    log_printf ( &logger, "\r\nIdentifying fingerprint...\r\n" );
                    app_state = FINGERPRINT5_APP_STATE_IDENTIFY;
                    fingerprint5_identify_finger ( ctx );
                }
            }
            break;
        }
        case FINGERPRINT5_APP_STATE_IDENTIFY:
        {
            if ( FINGERPRINT5_STATE_IDENTIFY != ( status.state & FINGERPRINT5_STATE_IDENTIFY ) )
            {
                log_printf ( &logger, "\r\nIdentifying fingerprint...\r\n" );
                fingerprint5_identify_finger ( ctx );
            }
            break;
        }
        default:
        {
            log_error ( &logger, "APP STATE: UNKWNOWN\r\n" );
            break;
        }
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.