Introduction: Finger Print Protected Hard Disk

Protecting your hard disk's data is a crucial task and whats a better way to protect your data than using fingerprints.

In this Instructable we will add biometric lock to a simple hard disk and show you how you can improve security of your digital data using a finger print sensor and an arduino. Then only fingerprints stored in the arduino can access your data providing you utmost security.

We will be using an arduino a fingerprint sensor and a relay.

Step 1: Hardware Components

We will need the following components for this project:

Micro USB 3.0 Connector https://amzn.to/2M6s0Q8

SparkFun Arduino Pro Mini 328 - 5V/16MHz https://bit.ly/1bDgF1X

R301T Semiconductor Fingerprint Module https://amzn.to/2FvhkJx

1 Channel 5V SSR Solid State Relay https://amzn.to/2spVnDZ

5mm RGB Tri-color 4Pin LED https://amzn.to/2Rp0nru

Step 2: Connections With the Arduino

Here we will connect the fingerprint sensor to the arduino pro mini and the arduino to our relay which will control data flow to the hard disk.

We have also used a RGB led indicate if the fingerprint is approved or not and connected the led to arduino via a resistor so as to limit the current flow and protect it from shorting.

Make the connections as shown in the above image.

Step 3: Code for Arduino

Here we will be using adafruit's library for the fingerprint sensor given below.

#include "Adafruit_Fingerprint.h"
#include "SoftwareSerial.h" SoftwareSerial mySerial(2, 3); Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); int cc=0; void setup() { Serial.begin(9600); while (!Serial); // For Yun/Leo/Micro/Zero/... delay(100); Serial.println("\n\nAdafruit finger detect test"); // set the data rate for the sensor serial port finger.begin(57600); if (finger.verifyPassword()) { Serial.println("Found fingerprint sensor!"); } else { Serial.println("Did not find fingerprint sensor :("); while (1) { delay(1); } pinMode(13,OUTPUT); digitalWrite(13,LOW); pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(11,OUTPUT); digitalWrite(9,HIGH); } finger.getTemplateCount(); Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates"); Serial.println("Waiting for valid finger..."); } void loop() // run over and over again { getFingerprintIDez(); delay(50); //don't ned to run this at full speed. } uint8_t getFingerprintID() { uint8_t p = finger.getImage(); switch (p) { case FINGERPRINT_OK: Serial.println("Image taken"); break; case FINGERPRINT_NOFINGER: Serial.println("No finger detected"); return p; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); return p; case FINGERPRINT_IMAGEFAIL: Serial.println("Imaging error"); return p; default: Serial.println("Unknown error"); return p; } // OK success! p = finger.image2Tz(); switch (p) { case FINGERPRINT_OK: Serial.println("Image converted"); break; case FINGERPRINT_IMAGEMESS: Serial.println("Image too messy"); return p; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); return p; case FINGERPRINT_FEATUREFAIL: Serial.println("Could not find fingerprint features"); return p; case FINGERPRINT_INVALIDIMAGE: Serial.println("Could not find fingerprint features"); return p; default: Serial.println("Unknown error"); return p; } // OK converted! p = finger.fingerFastSearch(); if (p == FINGERPRINT_OK) { Serial.println("Found a print match!"); } else if (p == FINGERPRINT_PACKETRECIEVEERR) { Serial.println("Communication error"); return p; } else if (p == FINGERPRINT_NOTFOUND) { Serial.println("Did not find a match"); return p; } else { Serial.println("Unknown error"); return p; } digitalWrite(9,LOW); // found a match! for (int i=0;i>5;i++) {digitalWrite(10,LOW); delay(10); digitalWrite(10,HIGH); delay(10);} Serial.print("Found ID #"); Serial.print(finger.fingerID); Serial.print(" with confidence of "); Serial.println(finger.confidence); for (int i=255;i>1;i--) {analogWrite(11,i); delay(10);} digitalWrite(13,HIGH); return finger.fingerID; } // returns -1 if failed, otherwise returns ID # int getFingerprintIDez() { uint8_t p = finger.getImage(); if (p != FINGERPRINT_OK) return -1; 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; }

Step 4: Finishing Up

We will power the Hard Disk only when the fingerprints are verified and hence it can be accessed only when the fingerprints are verified.

First, Make a small cable connector by micro USB 3 socket. To find out the pin map of socket, use board of Hard Drive. Refer the the images given above.

Also separate relay from the board and connect it directly so as to save space and make our final structure more compact.