ARDUINO SECURED DOOR LOCK
GREEN LIGHT OPTICAL FINGERPRINT SENSOR & SOLENOID BOLT

Project Overview
For this project, I designed a secured fingerprint door lock/unlock system using Arduino UNO, Greenlight optical fingerprint reader, and solenoid bolt. I am not a big fan of pin pads for entry because using a pin pad over and over and over again, you technically give clue to what numbers you are entering since the pins pad eventually wear off after some time. Then it is just determining the sequence to get access. I wanted to replace this with a better system that resolves this problem. So, I used an Arduino UNO and Adafruit fingerprint reader and came up with a design that replaces the pin pad with a system that utilizes the user's unique fingerprint to gain access to unlock and lock a door. For now, two LED shows the working order of the system.

Components

Arduino UNO

Green Light Optical Sensor

Red & Green LED
Sensor Wiring

The Fingerprint reader has four main wires, red, green, black, and white. As shown in the picture to the left, black wire is GND pin on the Arduino UNO, white goes in Pin 3 on Arduino, red goes in the 5V pin, and green goes in Pin 2 on Arduino board. A more detailed diagram is shown to the right where Yellow = white.

Circuit & Set up
Once the Fingerprint sensor is connected properly with the Arduino, I used 2 LEDs to replicate an actual solenoid lock. Rest of the wiring really depends on how you set your output pins for the two LEDs in the code. For instance, I have my Green LED connected to Pin 11 on the Arduino because that is where I have my output HIGH and LOW for that LED. Same for the Red LED, it is connected to Pin 12 on the Arduino because I set my output for that LED to be on Pin 12.

The code can be obtained from the Adafruit Fingerprint sensor library. Once you download the library and save it in the "examples" folder in the main Arduino Folder, you can set up your fingerprint with the reader and run a test fingerprint code.
I added the two LEDs to replicate the Solenoid Lock and so I edited the code a little bit so that it can simulate the idea. Initially, the red LED is on. When my fingerprint is matched, the green LED should go to a HIGH state while the red goes to LOW for 1 second. After 1 second, the green LED turns off and the red Goes to a HIGH state. To replace this with the solenoid lock, all that needs to be done is to replace the green LED with a solenoid lock. The video on the right shows how this works.

I added a regular DC motor to mimic the lock. I wrote the code on the left that controls the motor once there is a match in a fingerprint. initially, red LED is on, once a match is found, red = off, green=on then green goes off, red=on while the motor turns to unlock the door, after 5 seconds, it turns to lock it again until next match.
I added a regular DC motor to mimic the lock. I wrote the code on the left that controls the motor once there is a match in a fingerprint. initially, red LED is on, once a match is found, red = off, green=on then green goes off, red=on while the motor turns to unlock the door, after 5 seconds, it turns to lock it again until next match.



