Introduction
A Password Protected Security System is an electronic security solution that allows access only when the correct password is entered. This system replaces traditional locks with a digital authentication mechanism, improving safety and ease of use.
It is commonly used in homes, offices, lockers, and restricted areas.
Objective of the Project
- To design a secure access control system using a password.
- To prevent unauthorized access.
- To understand keypad interfacing with Arduino.
- To implement basic security logic.
Working Principle
The system works on password authentication.
Step-by-Step Operation
- User enters a password using a keypad.
- Arduino reads and stores the entered digits.
- The entered password is compared with the stored password.
- If the password matches, access is granted.
- If the password is incorrect, access is denied and alarm is triggered.
Components Required
- Arduino Uno
- 4×4 Keypad
- 16×2 LCD Display
- Buzzer
- Servo Motor / Relay
- Jumper Wires
- Breadboard
- 5V Power Supply
Circuit Diagram
Keypad Connections
R1 -> D9 C1 -> D5
R2 -> D8 C2 -> D4
R3 -> D7 C3 -> D3
R4 -> D6 C4 -> D2
Servo Motor
Signal -> D10
VCC -> 5V
GND -> GND
Arduino Code for Password Protected Security System
#include <Keypad.h>
#include <LiquidCrystal.h>
#include <Servo.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
Servo lockServo;
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] = {9, 8, 7, 6};
byte colPins[COLS] = {A0, A1, A2, A3};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
String password = "1234";
String input = "";
void setup() {
lcd.begin(16, 2);
lockServo.attach(10);
lockServo.write(0);
lcd.print("Enter Password");
}
void loop() {
char key = keypad.getKey();
if (key) {
if (key == '#') {
if (input == password) {
lcd.clear();
lcd.print("Access Granted");
lockServo.write(90);
delay(3000);
lockServo.write(0);
} else {
lcd.clear();
lcd.print("Access Denied");
}
input = "";
delay(2000);
lcd.clear();
lcd.print("Enter Password");
} else {
input += key;
lcd.setCursor(input.length() - 1, 1);
lcd.print("*");
}
}
}
Code Explanation
- Keypad captures user input.
- Password is compared with stored password.
- Servo unlocks door if password is correct.
- LCD displays system status.
Advantages
- Simple and secure
- Low cost
- Easy to implement
- No physical keys required
Applications
- Door security systems
- Locker systems
- Office access control
- Home automation
Future Enhancements
- Changeable password
- GSM alert system
- RFID + password security
- Mobile app control
Conclusion
The Password Protected Security System provides a reliable and efficient way to secure restricted areas. It is an ideal project for students to understand access control and embedded system security.
