DIY Fingerprint Lock Box
Introduction: DIY Fingerprint Lock Box
Ever wanted a box that opens in a super cool way? We thought it would be fun to create a box that can be unlocked using the correct fingerprint! If we had more time, we would make the box more secure. In the mean time, we have learned a lot and had a lot of fun.
We found several tutorials online that inspired us to make this awesome project:
How to Set Up Fingerprint Sensor With Arduino
Techatronic Arduino fingerprint security lock
DIY Fingerprint Door lock System
Although this project is recommended for the beginner to intermediate level, we personally found several parts of it very challenging, and hope this Instructable will help others have an easier time than we did. We built this project as part of Ms. <PERSON>'s Principles of Engineering class at Irvington High School.
Supplies
Materials:
Arduino UNO
Fingerprint Sensor (from Adafruit)
Solenoid Lock
Jumper Cables
One Channel Relay Module
Breadboard
Rechargeable 12V Lithium Ion Battery Pack
Male-to-male DC power cable
2 Hinges
4 M3x8 screws
2-10 M3x12 screws
Arduino USB cable
DC Power Jack Plug Adapter
Tools:
Wood glue
Adobe Illustrator/SVG editing software (Optional)
Arduino IDE
Soldering iron and solder
Laser Cutter (Optional)
Wire Cutters
Wire Strippers
Dial/Digital Calipers
CAD Software
3D printer
Screwdriver (for relay module and other electric components)
Step 1: Create the Circuit
1. Attach the ribbon cable to the fingerprint sensor. Make sure the orientation of the cables is correct (refer to the image above). The only wires we will be using for the fingerprint sensor are the RX wire, TX wire, VCC (power) wire, and GND wire (refer to image).
**Note: when referring to the diagram and comparing it to your own fingerprint sensor, make sure to hold the fingerprint sensor in the same orientation as the image! (In the image above, the fingerprint sensor is upside down). You can find more information about the fingerprint sensor and what each wire corresponds to by going to this link.
2. Once you correctly attach the wire harness to the fingerprint sensor, remove the JST connector on the other hand and strip the wires. Do the same thing for the solenoid wire: Remove the JST connector and strip the wires.
3. Since the wires of the fingerprint sensor and solenoid lock are stranded, we recommend soldering solid wires to each stranded wire and adding heat shrink (to help with connections).
4. Connect all the wires and components as per the circuit schematic above.
Step 2: Code for Fingerprint Sensor
1. Download the Arduino IDE (if you don't already have it installed) from this link.
2. Download the Adafruit Fingerprint Library from GitHub: Adafruit Fingerprint Sensor Library.
3. Then in the Arduino IDE go to Tools --> Manage Libraries. Look up the Adafruit Fingerprint Sensor Library and install it.
4. 16
Most of the code is already included in the library. To access the code to enroll the fingerprints, go to File --> Examples --> Adafruit Fingerprint Sensor Library --> enroll. This will open up the code to enroll the fingerprints.
5. Connect the Arduino to your computer and make sure that you are using the correct port. (You can check this by going to Tools --> Port.) Also, make sure you are boarding the correct Arduino by going to Tools --> Board. Then compile the code and upload it onto the Arduino.
6. To enroll your fingerprints, go to the Serial Monitor (Tools --> Serial Monitor). It will prompt you to enter an ID from 1 to 127. Type in whichever ID you want your fingerprint to have and press "send". Then follow the instructions in the Serial Monitor to correctly enroll your fingerprint. (You will need to place your finger on the sensor twice). You can enroll 127 fingerprints; however, if you type in the same index again for a different fingerprint image, the previous one will be overridden.
**Note: If you see the message "Did not find fingerprint sensor :(" when you open the Serial Monitor after uploading the code, we recommend switching the RX and TX wire (without changing the code) or resetting the Arduino. Also, make sure the baud rate for the Serial Monitor is 9600.
7. In order to see whether the fingerprint sensor will recognize your fingerprint, go to File --> Examples --> Adafruit Fingerprint Sensor Library --> "fingerprint" to open a new program. Compile this program and upload it. Right now, the solenoid lock will not work but it will say that it is waiting for a valid finger. 991