Biometric Security Box
Biometric Security Box
Guide Contents 2
Overview 4
Parts and Preparation 5
Remove lining from Lid 6
Lay out components 6
Measure and mark cutouts 6
Cut the cable slot 7
Drill the holes 7
Cut a false lid 7
Circuitry 9
The Microcontroller 9
The Circuit 9
Pre-Assembly 10
Install the keypad and switch 10
Install Circuitry 10
Fit the false lid 11
Cover the false lid 11
Install the false lid and solenoid 11
Program and Test 13
Download Fingerprint and Keypad Libraries 13
Enroll Fingers 13
Load code 13
Test the Latch Operation 13
Final Assembly 18
Make the strike. 18
Temporarily install the strike 18
Test latch operation 19
Rivet the strike 19
Use It! 20
Turn it on 20
The Biometric Security Box uses the Adafruit Fingerprint Sensor as well as a numeric pass-code
and a mechanical key-lock to provide triple-security. This tutorial is based on a 4x6 card file
box, but can be easily adapted to larger lock-boxes – or even a full-size door!
Materials:
Lock Box - This tutorial uses a "Vaultz" 4x6" card file box. But it can be adapted to fit other
sizes or brands.
Adafruit Menta (http://adafru.it/795) - or other Arduino compatible microcontroller.
Fingerprint Sensor (http://adafru.it/751)
Membrane Keypad (http://adafru.it/419)
Lighted Switch (http://adafru.it/482)
12v power adapter (http://adafru.it/798)
Panel mount power jack (http://adafru.it/610)
MOSFET (http://adafru.it/355)
Diode (http://adafru.it/755)
Small push-pull solenoid (http://adafru.it/412)
Brass Strip - 1/2" x .032"
Pop Rivets - 1/4"
Wire (http://adafru.it/aM5)
Header strip (http://adafru.it/392)
Heat-shrink tubing (http://adafru.it/344)
Wood
Cardboard
Adhesive Felt
Misc tape, screws, cable ties as needed.
The Microcontroller
The box in the photographs uses a Menta (http://adafru.it/795) without the mint tin (i.e.
a demented Menta). However, the code and circuitry will also work with an
UNO (http://adafru.it/50), Boarduino (http://adafru.it/72) or any other Arduino compatible
microcontroller. If you are using the Menta or Boarduino, first build it according to the
appropriate tutorial.
The Circuit
Connect the components as shown in the diagram below.
If you are using a Menta, the pin locations are the same as for the UNO in the diagram, you can
mount the MOSFET and Diode and a header for the keypad connector in the prototyping area.
If you are using a Boarduino, be aware that the pin locations will be different from the diagram.
Install Circuitry
Position components inside the lid and
glue spacer blocks around them.
Use foam tape to hold the fingerprint
sensor in place.
Place extra spacer blocks in the
center under the solenoid location.
Use tape and/or cable ties to hold
wires in place.
Download the Adafruit Fingerprint Sensor Library (http://adafru.it/aRz) and install it according
to the instructions in readme.txt.
Download the Keypad Library and install according to the instructions
here (http://adafru.it/aUO).
Enroll Fingers
Load code
Load the Biometric Box sketch at the bottom of this page.
Edit the "secretCode" string to define your passcode.
Compile and upload the sketch.
/***************************************************
Biometric Box Sketch for the optical Fingerprint sensor
This sketch implements a two-level security scheme requiring the
user to enter a passcode via the keypad before scanning a fingerprint
for access.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
void setup()
{
pinMode(LedPin, OUTPUT);
pinMode(SolenoidPin, OUTPUT);
// Flash hello
for (int i = 0; i < 3; i++)
{
digitalWrite(LedPin, HIGH);
delay(100);
digitalWrite(LedPin, LOW);
delay(100);
}
void loop()
{
// Run the state machine:
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return -1;
p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK) return -1;
// found a match!
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
return finger.fingerID;
}
Turn it on
Press the power button until it clicks
in the on position.
The led in the power button will blink
three times, then start to 'breathe'.