|
arduino IDEArduino
|
2 Factor Authentication Lock
WHAT IS A BANK SECURITY DIGITAL DOOR LOCK SYSTEM?
Simply it's a Digital Door Lock System that helps in the security of the door lock with the use of a digital keypad and by using the Arduino Uno Board. This idea helps in the security of the locker’s in the bank
LIST OF THE COMPONENTS REQUIRED FOR THE PROJECT
Arduino UNO
16*2 Liquid Crystal Display
Servo Motor
4*3 or 4*4 matrix keypad for the Arduino
3D printed door locker or customized door lock system
4” / 6” plastics boxes, jumper wires, nuts bolts, and plastics casing etc.
Additional components for power supply of 1 Amp 5 Volt mobile charger.
DESCRIPTION OF THE PROJECT
Firstly, the brain of the project is the Arduino UNO board. The Arduino UNO board is connected to the LCD along with a servo motor.
Here, the servo motor is used to lock or unlock the latch on the door.
The 16x2 LCD (16 columns and 2 rows) is used to display the message with the help of Arduino.
The servo motor used is a 5V Towerpro SG90. This servo motor is the basic level servo motor and that works fine with the Arduino without any external module.
A 4*4 matrix keypad is used in this project (but as a 4*4 keypad part was not available I used a 4*3 keypad in the above graphical representation), but it’s not a problem as the 4*3 matrix keypad works fine with the code I used.
We also need a keypad for the password input and for manually locking our customized door locker. The keypad consists of 16 keys totally. Out of all the keys, 4 keys in Rows (R1, R2, R3, R4) and 4 keys in Columns (C1, C2, C3, C4).
Whenever a key is pressed, a connection will be established between the corresponding rows and columns.
code
#include <Keypad.h>
#include <LiquidCrystal.h>
#include <Servo.h>
Servo myservo;
LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);
#define Password_Lenght 7 // Give enough room for six chars + NULL char
int pos = 0; // variable to store the servo position
char Data[Password_Lenght]; // 6 is the number of chars it can hold + the null char = 7
char Master[Password_Lenght] = "123456";
byte data_count = 0, master_count = 0;
bool Pass_is_good;
char customKey;
const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
{'*', '0', '#'}
};
bool door = true;
byte rowPins[ROWS] = {1, 2, 3, 4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 6, 7}; //connect to the column pinouts of the keypad
Keypad customKeypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS); //initialize an instance of class NewKeypad
void setup()
{
myservo.attach(9);
ServoClose();
lcd.begin(16, 2);
lcd.print(" Arduino Door");
lcd.setCursor(0, 1);
lcd.print("--Look project--");
delay(3000);
lcd.clear();
}
void loop()
{
if (door == 0)
{
customKey = customKeypad.getKey();
if (customKey == '#')
{
lcd.clear();
ServoClose();
lcd.print(" Door is close");
delay(3000);
door = 1;
}
}
else Open();
}
void clearData()
{
while (data_count != 0)
{ // This can be used for any array size,
Data[data_count--] = 0; //clear array for new data
}
return;
}
void ServoOpen()
{
for (pos = 180; pos >= 0; pos -= 5) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
void ServoClose()
{
for (pos = 0; pos <= 180; pos += 5) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
}
void Open()
{
lcd.setCursor(0, 0);
lcd.print(" Enter Password");
customKey = customKeypad.getKey();
if (customKey) // makes sure a key is actually pressed, equal to (customKey != NO_KEY)
{
Data[data_count] = customKey; // store char into data array
lcd.setCursor(data_count, 1); // move cursor to show each new char
lcd.print(Data[data_count]); // print char at said cursor
data_count++; // increment data array by 1 to store new char, also keep track of the number of chars entered
}
if (data_count == Password_Lenght - 1) // if the array index is equal to the number of expected chars, compare data to master
{
if (!strcmp(Data, Master)) // equal to (strcmp(Data, Master) == 0)
{
lcd.clear();
ServoOpen();
lcd.print(" Door is Open");
door = 0;
}
lcd.clear();
lcd.print(" Wrong Password");
delay(1000);
door = 1;
}
clearData();
}
Else
{}
2 Factor Authentication Lock
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Sreeram.zeno
- Esp12-F Cluster V1.0 The ESP8266 is a low-cost Wi-Fi microchip, with built-in TCP/IP networking software, and microcontro...
- TB6612FNG Motor Driver The TB6612FNG Motor Driver can control up to two DC motors at a constant current of 1.2A (3.2A peak)...
- Sunny Buddy Solar Charger v1.0 This is the Sunny Buddy, a maximum power point tracking (MPPT) solar charger for single-cell LiPo ba...
- Diy 74HC4051 8 Channel Mux Breakout Pcb The 74HC4051; 74HCT4051 is a single-pole octal-throw analog switch (SP8T) suitable for use in analog...
- Diy RFM97CW Breakout Pcb IntroductionLoRa? (standing for Long Range) is a LPWAN technology, characterized by a long range ass...
- ProMicro-RP2040 Pcb The RP2040 is a 32-bit dual ARM Cortex-M0+ microcontroller integrated circuit by Raspberry Pi Founda...
- Serial Basic CH340G Pcb A USB adapter is a type of protocol converter that is used for converting USB data signals to and fr...
- Mp3 Shield For Arduino Hardware OverviewThe centerpiece of the MP3 Player Shield is a VS1053B Audio Codec IC. The VS1053B i...
- MRK CAN Shield Arduino The CAN-BUS Shield provides your Arduino or Redboard with CAN-BUS capabilities and allows you to hac...
- AVR ISP Programmer AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology ...
- Diy Arduino mega Pcb The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital input/ou...
- Max3232 Breakout Board MAX3232 IC is extensively used for serial communication in between Microcontroller and a computer fo...
- Line Follower Pcb The Line Follower Array is a long board consisting of eight IR sensors that have been configured to ...
- HMC6343 Accelerometer Module The HMC6343 is a solid-state compass module with tilt compensation from Honeywell. The HMC6343 has t...
- RTK2 GPS Module For Arduino USBThe USB C connector makes it easy to connect the ZED-F9P to u-center for configuration and quick ...
- Arduino Explora Pcb The Arduino Esplora is a microcontroller board derived from the Arduino Leonardo. The Esplora differ...
- Diy Stepper Motor Easy Driver A motor controller is a device or group of devices that can coordinate in a predetermined manner the...
- Diy Arduino Pro Mini The Arduino Pro Mini is a microcontroller board based on the ATmega168 . It has 14 digital input/out...
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
55 0 0 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
57 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
78 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
420 0 6 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
129 0 2