Unlock a Door with your Fingerprint

We built a biometric fingerprint-controlled lock prototype. A fingerprint scanner is used to capture and store the fingerprints of authorized users. When the scanner recognizes a user, a solenoid plunger disengages and opens the lock

Unlock a Door with your Fingerprint

Parts List:
The fingerprint scanner module is powered by an ARM Cortex M3 CPU, which controls the on-board optical sensor and fingerprint recognition. Fingerprints are stored and processed by the module, which supports a UART protocol for communicating with a host application. The solenoid is powered from Kinoma Create and controlled by a digital output pin.

Step 1: Wiring

The protoboard is connected to the solenoid and Kinoma Create back header pins. The fingerprint scanner is also connected to the back header UART TX and RX pins.

Both front pin headers are configured for +5V and pin 51 is configured as a digital output. The application programmatically configures the front pins and displays the Pins Settings dialog.

Step 2: Protoboard

Protoboard

The solenoid used to lock and unlock the door requires two additional bits of electronics: a transistor and a flyback diode. The transistor acts as a switch for the 5v power supply from Kinoma Create, allowing us to turn on and off that current to the solenoid using our 3.3v digital out pin. The diode helps to protect Kinoma Create from electrical surges generated by the solenoid, dissipating flyback energy as heat through the solenoid rather than as a power spike into the Kinoma Create’s digital output pin.

Step 3: Application Overview

Application Overview

The KinomaJS application opens to a screen that displays a list of registered fingerprints. Three buttons are provided at the bottom of the screen to interact with the scanner.

The Register button kicks off the fingerprint capture and registration flow. Once fingerprint registration is complete, the user associates his or her name with the fingerprint using the Kinoma Create on-screen keyboard. The registered fingerprint is added to the displayed list. The Authorize button is used to validate a fingerprint against the list of registered users. The door is unlocked and a success sound is played if the fingerprint scanned matches a registered user. If the fingerprint is not authorized, the door remains locked and the application plays a failure sound. The Clear button removes all registered fingerprints from the displayed list and clears the fingerprint scanner module storage.

Step 4: The Code

The project includes the KinomaJS application and BLLs to control the fingerprint scanner and solenoid.

The GT511C3.js serial BLL controls the scanner functions, including fingerprint registration, storage, recognition and the CMOS LED. The JavaScript implementation is based on the Windows SDK demo software provided by ADH technology, the manufacturer of the fingerprint scanner module. The solenoid.js digital output BLL controls the door lock by engaging and disengaging the 5V solenoid. Audible and visual feedback is provided when fingerprint authorization succeeds or fails. WAVE files are played using the KinomaJS Media object and PNG images displayed using KinomaJS Texture and Skin objects. The complete project, including code, assets and BLLs is available here on GitHub.

Step 5: Fingerprint Processing

Fingerprint Processing

The scanner module does all the work required to capture, store and match fingerprint images. The application controls the scanner by calling functions in the GT511C3.js BLL. The BLL functions in turn send commands to the module via the Kinoma Create serial pins.

A fingerprint capture requires pressing and releasing the finger on the scanner three times. The fingerprint is registered and stored after the third press. The application uses a KinomaJS Behavior instance to implement a state machine that processes each of the three fingerprint scans. To start scanning, a prompt is displayed, the LED is turned on and the code waits for acknowledgement that the finger is pressed on the scanner:

The is_finger_pressed BLL function is called every 200 milliseconds by invoking a repeated polling hardware pins request. The result is sent to the application fingerPressed handler.

The handler notifies the application by distributing the onFingerPressed and onFingerReleased events to the application behavior, which in turn advances the state machine to capture once the finger is pressed.

For more detail: Unlock a Door with your Fingerprint


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top