Adding Fingerprint Recognition to Your Keyboard with Arduino

Windows Hello is a biometric login feature introduced by Microsoft in Windows 10 and later versions, including facial recognition, fingerprint scanning, iris recognition, and PIN codes. These features aim to provide a more secure and convenient login method, replacing traditional password logins. However, due to the relatively low demand for frequent unlocking on computers, compatible accessories for Windows Hello are still limited on the market.

But don’t worry! If you’re tired of typing long passwords to unlock your computer, we have a simple solution—modify your keyboard to add a fingerprint module for one-touch login. Let’s get started!

Project Background

Before diving into this DIY project, let me share my motivation and background. Since Microsoft introduced the RealSense camera, I have been very interested in Windows Hello and added facial recognition to my desktop computer.

However, when I tried to add the same feature to my work computer, I faced obstacles. Due to information security policies, company computers are restricted to password logins only and cannot use PINs. Since enabling Windows Hello’s biometric features requires setting up a PIN as an initial unlock method, this became an insurmountable barrier.

Since the software solution was not feasible, I decided on a “physical workaround”: use Arduino to simulate a HID keyboard and integrate a fingerprint module for authentication. This is the core goal of this DIY project.

Project Principle

The principle of this project is quite simple: insert a USB Hub in the middle of the keyboard’s USB cable, connect one port of the Hub to the keyboard’s original USB cable, and the other port to our Arduino, forming a relay device. The schematic is as follows:

principle of adding fingerprint recognition to the keyboard

For Arduino, we chose a serial fingerprint module, model FPM3X.

FPM3X module for keyboard fingerprint recognition project

Modifying the Keyboard

Now, let’s start with modifying the keyboard. We need to drill a hole in the keyboard that matches the size of the fingerprint sensor for installation. It’s recommended to place the hole next to the ESC key, as it’s conveniently located and easy to reach. Here are the specific steps:

  1. Disassemble the Keyboard Frame: Use tweezers or another sturdy, flat tool to gently pry off the frame along the keyboard’s edge, depending on your keyboard model.
  2. Mark the Sensor Position: Place the fingerprint sensor in the chosen position, and use a knife to outline the sensor’s shape to ensure the hole matches perfectly.
  3. Drill the Hole: Use a drill or other suitable tool to create a hole in the marked area. After drilling, smooth the edges of the hole with sandpaper or a knife.
  4. Install the Sensor: Insert the fingerprint sensor into the drilled hole and use hot glue to secure it, ensuring it stays firmly in place.

Circuit Section

Since this project is relatively simple, there’s no need to design and produce a PCB. Connect the necessary components directly to the Arduino Micro, which is suitable for this project because it supports USB simulation.

To avoid short circuits, wrap the wiring with heat shrink tubing for extra protection. Finally, carefully place the entire circuit inside the keyboard and secure it to prevent movement during use.

Circuit connection part

Programming Section

The Mega32U4 chip on the Arduino Micro comes with USB support, allowing it to easily simulate keyboard and mouse functions. In this project, we use it to simulate keyboard input, automatically entering a preset password when the correct fingerprint data is detected.

Simulate keyboard functions

Additionally, since we can register multiple fingerprints, the code can be easily configured to trigger different inputs for different fingerprints. Adding extra sensors to the Arduino can further expand functionality to trigger more custom macros.

The code includes various methods to simulate keyboard inputs, allowing customization of input logic and content. Here’s a snippet of the sample code:

				
					switch (finger_id)
{
  case 1: 
    fingerBoard.InputPassword("12345678");
    break;
  case 2:
    fingerBoard.InputPassword("123456789");
    break;
  case 3:
    fingerBoard.InputPassword("aaabbbccc");
    break;
  /* 
    You can also achieve something like this:
    // The keyboard will type the string and perform an ENTER.
    fingerBoard.TypeString("www.zhihu.com", true);
    // The keyboard will press ctrl+v and then release.
    fingerBoard.PressKey(KEY_LEFT_CTRL);
    fingerBoard.PressKey('v');
    fingerBoard.ReleaseAll();
    ...
  */
}

				
			

Ending

In this article, we solved the issue of not being able to use Windows Hello when a PIN is not available. Although it’s possible to achieve similar functionality without using an Arduino board by simply replacing the Arduino with a USB fingerprint module in the Hub, this would only address the login issue and not provide additional functionalities. If you need the Arduino code, click the link to visit GitHub.

You Might Be Interested

What is Arduino UNO
What is Arduino UNO?

Unlock the power of Arduino UNO! This versatile development board lets you build everything from automated systems to robots. Explore its features and discover how it can turn your creative

Arduino Breathing LED Project
Arduino Breathing LED Project

A breathing light is an LED lighting effect that simulates the human breathing process, gradually increasing or decreasing in brightness within a specific cycle. This project can be achieved through

How to Download and Install Arduino IDE
How to Download and Install Arduino IDE

Learn how to easily download and install the Arduino IDE on Windows, Linux, and macOS! This step-by-step guide will walk you through the entire process, from downloading the software to

DIY Touch-Activated LED Project
Arduino Touch-Activated LED Project

This article showcases a beginner-friendly project that utilizes Arduino and touch-sensitive technology to control LED lights. The project involves building a simple circuit and programming the Arduino board to detect

Arduino Temperature Alarm Project
Arduino Temperature Alarm Project

This Arduino temperature alarm project effectively demonstrates how to create a practical temperature monitoring system. By utilizing the LM35 temperature sensor and a buzzer, it warns users with an audible

arduino vibration sensor
Arduino Vibration Sensor Project

This Arduino project employs a vibration sensor, ball switch, and LED to detect tilt or collision events. The LED lights up when vibrations occur and turns off afterward. By connecting

Guide to the Arduino Loop Function
Comprehensive Guide to the Arduino Loop Function

Loops are a key concept in Arduino, enabling repeated execution of code without redundancy. This includes for, while, and do-while loops. Click the link to learn more about their concepts,

Scroll to Top