Skip to main content

ARDUINO KEYPAD LOCK SECURITY SYSTEM WITH SERVO MOTOR

                   ARDUINO KEYPAD LOCK SECURITY SYSTEM WITH SERVO MOTOR


ARDUINO:


         Arduino is Basic system which is used for the controlling various system that does lots of work.The arduino develope in 2003,the arduino is basically a microcontroling unit the code return in the form 8 bit ,32 bit which is return in the language of C and C++`The RAM in arduino is SRAM.


KEYPAD LOCK:


        
             A Keypad Lock is the microcontrolled Security System in which it can be controlled which is contolled by the keypad which is 4*4 matrix and we could be secured with that.Here is the simple project with that we can do the keypad security system.


WIRING DIAGRAM:




PROCEDURE:


           Connect the keypad 4*4 matrix to the arduino as shown in the wiring diagram.Then as the same connect the buzzer,leds,servo as shown in the wiring diagram.Then upload the code from below,copy the code and paste in the arduino and just compile it and upload it.The circuit works.


SOURCE CODE:

//NBSL Commercial
#include <Password.h> //http://playground.arduino.cc/uploads/Code/Password.zip
#include <Keypad.h> //http://www.arduino.cc/playground/uploads/Code/Keypad.zip 
#include <Servo.h> //tells to use servo library


Servo myservo; //declares servo
Password password = Password( "1234" ); //password to unlock, can be changed

const byte ROWS = 4; // Four rows
const byte COLS = 4; // columns
// Define the Keymap
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = { 9, 8, 7, 6 };// Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = { 5, 4, 3 };


// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  Serial.begin(9600);
  Serial.write(254);
  Serial.write(0x01);
  delay(200);
  pinMode(11, OUTPUT);  //green light
  pinMode(12, OUTPUT);  //red light
  pinMode(1, OUTPUT);   //buzzer
  myservo.attach(13); //servo on digital pin 9 //servo
  keypad.addEventListener(keypadEvent); //add an event listener for this keypad
  }

void loop(){
  keypad.getKey();
  myservo.write(0);
  }
  void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
  case PRESSED:
 
  Serial.print("Enter:");
  Serial.println(eKey);
  delay(10);
 
  Serial.write(254);
 
  switch (eKey){
    case '*': checkPassword(); delay(1); break;
   
    case '#': password.reset(); delay(1); break;
   
     default: password.append(eKey); delay(1);
}
}
}
void checkPassword(){
 
if (password.evaluate()){ 
   
    Serial.println("Accepted");
    Serial.write(254);delay(10);
    myservo.write(150); //deg
   
        digitalWrite(11, HIGH);
    delay(5000);
    digitalWrite(11, LOW);
   
   
}else{
    Serial.println("Denied");
    Serial.write(254);delay(10);
    myservo.write(0);
    digitalWrite(12, HIGH);
    delay(500);
    digitalWrite(12, LOW);
     digitalWrite (1, HIGH);
   delay (500);
   digitalWrite (1, LOW);
  delay (500);
 digitalWrite (1, HIGH);
   delay (500);
   digitalWrite (1, LOW);
     delay (500);
 digitalWrite (1, HIGH);
   delay (500);
   digitalWrite (1, LOW);


   
}
}


CHECK HOW IT WORKS:





                                                    POWERED BY

                                                             NBSL



















































































 


               


Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

What if you could control the Internet

At present situation internet is the basic need for us, we are using the internet for many purposes from medicine to aerospace internet is used and helps in day to day life activates. Internet is spread out in all the areas and we could say it is the most powerful tool in the world, if you got a chance to control the internet what will you do.                                                Image Credit : Internet In general, more than 5 billion google searches are done all over the world and millions of hours videos are watches in facebook and YouTube daily. What if you got a chance to control the internet, whether it is possible to control the internet, the internet is actually controlled with the help of 7 keys and by 14 peoples all around the world. They maintain the DNS which helps in accessing the internet all around the world. The DNS helps in accessing ...

Dual Led Flasher

               Dual Led Flasher Using 555 IC This is an simple project to show the Dual Flashing Led With 555 IC. Let us discuss this project below. Components Required   1.       555 IC 2.       10K ohm resistor 3.       10uf capacitor 4.       LEDs 5.       BreadBoard 6.       Connecting Wires 7.       9v Battery Circuit Diagram Procedure · Insert the 555 IC in the breadboard and then connect resistors and capacitor shown in figure · Then insert an single piece wire Connecting 8 th  And 4 th  terminal of 555 IC · Then insert the another single piece wire Connecting  6 th And 2 nd terminal of the 555 IC · Next connect an LED 1 Positive end to the 3 rd pin of the 555 IC and connect Negati...

Corona Virus

In present situation our entire world is under a high alert due to the spread of the corona virus. Many lives have been lost due to this virus breakthrough. This corona virus was found on humans in 2019 and before that this is not identified in humans. It is a zoonotic, which means a virus which is spread from the animals to humans is termed as the zoonotic. Corona is not only the first zoonotic disease already Rabies, Swine flu, etc are categorized as zoonotic diseases. Why Corona Virus is so Dangerous \Till now there is no proper medicine for the corona virus, this is because we cannot find from which animal this corona virus came from, according to the report of World Health Organization this Corona virus are spread from the Civet Cat and this is an new type of virus human ever seen, so time required to find medicine for this corona virus. Symptoms of Corona Virus & Precautions The major symptoms of the corona virus are Fever, Cough, Shortness of ...