loading

The innovation that has been displayed is a gun control mechanism that is meant to help with the issue of gun safety. Its purpose is to further prevent any gun accidents within the household and beyond by putting the gun in a lock that only the gun owner may open, via a fingerprint sensor. The user must first register his or her desired fingerprints into the system, and then afterwards they are able to use the registered fingerprint to open and close the gun lock. This system prevents from others, including children, from opening and then using the firearm which will increase overall safety. Furthermore, this innovation acts as a stand as the owner of the firearm is able to comfortably fit the firearm into the holding slot and rest it there. The entire case is transportable and very easy to maintain making it convenient for the user. This design is also able to, if the owner desires, hold even more firearms than what is shown. The owner may simply create another slot, with the appropriate size to fit the said firearm, and with a few components easily connect to the main circuitry allowing for another slot to be opened up. This allows for further modifiability and use. Overall, the intended goal for this innovation is to give the firearm owner a safe place to store their equipment and give assurance that it is in a good safe place.

Step 1: Planning the S.G.R.

The first step in creating this innovation was to create a plan of action and create early sketches of prototypes. Along with those sketches, other plans were needed in order to accurately predict how the layout of all the electronic components should be placed and how they each are going to be connected. Several drawing were created in order to get an example visual of what the final product may look like.

Step 2: Materials List/Cost

The next step in this process was to research exactly what materials were required. This included Arduino's, breadboards, and the fingerprint sensor. The cost of each product individually and the total cost of all parts was noted in order to see the cost range of project. Furthermore, once the necessary materials were found, we had to obtain the materials. This was done through placing online orders and receiving the materials in the coming days.

Step 3: Electronics

The following step in the creation of the final product was the connection of all electrical components. Once all of the required materials were obtained, the next task was to connect up all of the electrical components together so that they were efficient and effective. This step included connecting the fingerprint sensor through a motor shield, which would help with connecting the hardware and linear actuators. In order to do this, the wires had to be soldered in order to elongate them and to make sure they were firmly in place. The motor shield itself, was easily attached onto the arduino, from which the code would run the system. In this step, the drilling of holes for the USB jack was required so there would be a way to connect to the Arduino.

Step 4: Mechanical Hardware Installation

After completely connecting all the electrical components and having a layout and a greater idea of the size and spacing required, I went on to connect the hardware aspect, which included the main components, the linear actuators. The linear actuators used were originally meant for vehicular use but I was able to adjust them properly to fit comfortably into the external casing for the final result. During this step, I had to modify the wires for the linear actuators, connect them to motors one and two in the motor shield and finally drilling holes in the casing and screwing the linear actuators into place.

Step 5: Exterior Assembly

Following the connection of the linear actuators, the next step was to finish up any exterior design and place every component into the casing. First off many holes were drilled and then smoothed in order to accommodate space for several screws and wired connection to take place, such as the fingerprint sensor connecting to the motor shield. Next the two main holes for the firearm were cut out, one slightly smaller and one slightly larger than the other. Lastly, the casing was then taken out and coated with a silver spray paint to create a nicer texture and aesthetic for the buyer.

Step 6: Code

The very final step in this process would be the most time consuming. I had to create a code that would allow the user to input their fingerprint into the memory of the fingerprint sensor, make sure the fingerprint sensor actually recognized the fingerprints, and also open/close the linear actuators whenever the fingerprint sensor recognized the fingerprint. I also had to test with another individual to make sure that the fingerprint sensor would not unlock the linear actuator to another individual that had not saved the image of their fingerprint on the device.

CODE:

#include
#include

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #include #include #include "utility/Adafruit_MS_PWMServoDriver.h" // Create the motor shield object with the default I2C address Adafruit_MotorShield AFMS = Adafruit_MotorShield(); // Or, create it with a different I2C address (say for stacking) // Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); // Select which 'port' M1, M2, M3 or M4. In this case, M1 Adafruit_DCMotor *myMotor = AFMS.getMotor(1); // You can also make another motor on port M2 //Adafruit_DCMotor *myOtherMotor = AFMS.getMotor(2);

int getFingerprintIDez();

//!!!!!!!!!!!!!!!!!!! boolean open = false;

// pin #2 is IN from sensor (GREEN wire) // pin #3 is OUT from arduino (WHITE wire) SoftwareSerial mySerial(2, 3); Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

// On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white //Adafruit_Fingerprint finger = Adafruit_Fingerprint(&Serial1);

void setup() { while (!Serial); // For Yun/Leo/Micro/Zero/... Serial.begin(9600); Serial.println("Adafruit 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); } Serial.println("Waiting for valid finger...");

//!!!!!!!!!!!!!!! // RESET MOTOR TO CLOSED AFMS.begin(); // create with the default frequency 1.6KHz uint8_t i; Serial.println("CLOSED"); myMotor->run(FORWARD); for (i=0; i<255; i++) { myMotor->setSpeed(i); delay(2); } for (i=255; i!=0; i--) { myMotor->setSpeed(i); delay(2); }

}

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; } // found a match! Serial.print("Found ID #"); Serial.print(finger.fingerID); Serial.print(" with confidence of "); Serial.println(finger.confidence); }

// 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);

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // if lock is open, close the lock uint8_t i; if (open){ open = false; Serial.println("OPEN"); myMotor->run(FORWARD); for (i=0; i<255; i++) { myMotor->setSpeed(i); delay(2); } for (i=255; i!=0; i--) { myMotor->setSpeed(i); delay(2); } } // If lock is closed, open the lock else { open = true; Serial.println("CLOSED"); myMotor->run(BACKWARD); for (i=0; i<255; i++) { myMotor->setSpeed(i); delay(2); } for (i=255; i!=0; i--) { myMotor->setSpeed(i); delay(2); } } delay(3000); return finger.fingerID; }

<p>a very interesting project but there may be room for improvement/ refinement.</p><p>I have some questions:</p><p>how exactly does the gun interface with the lock system? do you insert the trigger guard and trigger into the hole?</p><p>if so, to prevent accidental firing of a locked gun, what tolerances are you using for the opening?</p><p>is this design only intended for pistols, or will it accommodate long guns as well?</p><p>what is the external housing made out of?</p><p>It looks like the external housing is bolted together using Allen head screws, and the linear motors are held on with phillips head screws. Are there any safety measures to prevent the system from being disassembled to gain access to the firearms?</p><p>Looking forward to hearing from you.</p>
<p>That's a neat setup, when we pick up my husbands' shotgun from his grandfather we'll need a case too. I'd prefer a fingerprint case or something like it to make sure the kids don't get to it.</p>

About This Instructable

224views

3favorites

License:

Bio: The BCAMRL is a Mechatronics Research Lab, found on the campus of Bergen County Academies a magnet high school within the Bergen County Technical School ... More »
More by bcamrl:Arthritis Assisting Mouse  S.G.R-1 (Safety Gun Rack) Nautilus -1 Exploration Mini Submarine  
Add instructable to: