Door-Lock-Using-Arduino-And-Numeric-Keypad

0 0
  • 0 Collaborators

These locking systems are controlled by a keypad and are installed at the side hedge of the door. By using Arduino UNO, Keypad and Servo motor, door latch we can solve the problem and security will become more strong. ...learn more

Project status: Concept

Artificial Intelligence

Intel Technologies
Intel Python, Other

Overview / Usage

  1. The Basic requirement of security can be achieved by designing electrical or mechanical locks that are desligned with one or a few keys, but for locking a big area many locks are required.
  2. Basically traditional locks are heavy and are not protective as they can be broken down easily by using some tools. 
  3. Electronic locking systems are preferable over mechanical locks, to resolve the security problems that are associated with the mechanical locks
  4. Nowadays every device’s operation is based on digital technology. These locking systems are used to control the movement of door and are functional without requiring a key to lock or unlock the door.
  5. These locking systems are controlled by a keypad and are installed at the side hedge of the door.
  6. By using Arduino UNO, Keypad and Servo motor, door latch we can solve the problem and security will become more strong.

Methodology / Approach

#include <Servo.h>#include <Keypad.h> Servo ServoMotor;char* password = "888"; // change the password here, just pick any 3 numbersint position = 0;const byte ROWS = 4;const byte COLS = 4;char keys[ROWS][COLS] = {{'1','2','3','A'},{'4','5','6','B'},{'7','8','9','C'},{'*','0','#','D'}}; byte rowPins[ROWS] = { 8, 7, 6, 9 };byte colPins[COLS] = { 5, 4, 3, 2 };Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );int RedpinLock = 12;int GreenpinUnlock = 13; void setup(){ServoMotor.attach(11);LockedPosition(true);} void loop(){char key = keypad.getKey();if (key == '*' || key == '#'){position = 0;LockedPosition(true);}if (key == password[position]){position ++;}if (position == 3){LockedPosition(false);}delay(100);}void LockedPosition(int locked){if (locked){digitalWrite(RedpinLock, HIGH);digitalWrite(GreenpinUnlock, LOW);ServoMotor.write(11);}else{digitalWrite(RedpinLock, LOW);digitalWrite(GreenpinUnlock, HIGH);ServoMotor.write(90);}}

Comments (0)