0% found this document useful (0 votes)
4 views

Access Control System

This mini project report details the development of an electronic access control system using an Arduino Uno, servo motor, and keypad to simulate a door lock mechanism. The project highlights the functionality of granting access to authorized users through password verification, showcasing the potential for further enhancements such as multi-user support and IoT integration. The report includes acknowledgments, system overview, circuit components, and Arduino code, demonstrating the feasibility of Arduino-based access control systems in various environments.

Uploaded by

thangaeswari06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Access Control System

This mini project report details the development of an electronic access control system using an Arduino Uno, servo motor, and keypad to simulate a door lock mechanism. The project highlights the functionality of granting access to authorized users through password verification, showcasing the potential for further enhancements such as multi-user support and IoT integration. The report includes acknowledgments, system overview, circuit components, and Arduino code, demonstrating the feasibility of Arduino-based access control systems in various environments.

Uploaded by

thangaeswari06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

ACCESS CONTROL SYSTEM

A MINI PROJECT REPORT

submitted by

M.Subbu Lakshmi:953023104121
S.Muthu Shivani:953023104077
M.pon Aparna :953023104084
M.Navanitha :953023104079
M.Priya Dharshini:953023104094

In partial fulfillment for the degree Of

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

ST.MOTHER THERESHA ENGINEERING COLLEGE


VAGAIKULAM-628 102,

ANNA UNIVERSITY: 600025

MAY 2025
ACKNOWLEDGEMENT

"Thanks" may be a little word but its eloquence is


magnified only when it is spelled from the depth of the
heart. At this point of time, we would like to extend our
heartfelt thanks to all those who helped us throughout
this major assignment.

First of all we would like to thank the "Almighty for


having given us the "Will and Determination" to pursue
our goal tenaciously.

We wish to thank our college Chairman Mr. Dr. S. Cletus


Babu, our Director Mr. Dr. George Klington and our
Principal Dr. K. M. Muthu Krishnan for their support in
completing the mini project work successfully.

We express our sincere thanks to our Head of the


Department of Computer Science And Engineering, Mrs.
M. Beenajan Shaheen for the support in completing the
work successfully.

With extreme sense of gratitude, we express our sincere


thanks to our project guide Mr. Selvam and all the
faculty Members of the CSE Department for giving
valuable guidance, immense help and their
encouragement throughout our mini project work.

We owe our most genuine thanks to our beloved


parents, siblings and friends for their continuous
support.
TITLE

Abstract
introduction
system overview
Circuit components
Arduino code
How to use
Conclusion
Abstract

This project presents a simulated door lock system utilizing an


Arduino Uno, a servo motor, and a keypad to demonstrate a basic
electronic access control mechanism. The system's primary
function is to grant access to authorized users by entering a
predefined password via the keypad. Upon successful password
verification, the servo motor is activated, simulating the
unlocking of a door. This project showcases the potential of
Arduino-based systems in access control applications and
provides a foundation for further development and
enhancement.

The door lock system consists of four primary components: the


Arduino Uno as the core controller, a keypad for user input, a
servo motor to simulate the door lock mechanism, and a
simulated door lock as the output. The system's operation
involves the user entering a password using the keypad, which is
then verified by the Arduino Uno. If the password is correct, the
servo motor is triggered, unlocking the simulated door lock for a
predetermined period.

This project demonstrates a fundamental example of electronic


access control and can be expanded upon for various
applications, including multi-user support, password
modification, and integration with other security systems. The
use of the Wokwi simulator enables efficient testing and
modification of the project, making it an ideal platform for
exploring Arduino-based system design.

The project's outcomes highlight the feasibility and potential of


electronic access control systems in various settings, including
residential, commercial, and industrial environments. By
leveraging the capabilities of Arduino and keypad technology,
this project provides a basic yet effective solution for access
control, paving the way for more complex and sophisticated
systems. Overall, this project showcases the versatility and
potential of Arduino-based systems in access control
applications.
Introduction

Door lock systems are a crucial aspect of securing buildings, rooms, and other
areas. Traditional lock systems rely on physical keys, which can be lost, stolen,
or copied. Modern electronic access control methods offer a more secure and
convenient alternative. This project simulates a door lock system using an
Arduino Uno, a servo motor, and a keypad, providing a basic example of
electronic access control. By leveraging the capabilities of Arduino and keypad
technology, this project demonstrates a fundamental approach to access
control, paving the way for more complex and sophisticated systems. The
project's outcomes highlight the potential of electronic access control systems
in various settings, including residential, commercial, and industrial
environments.

System Overview

The system consists of four primary components:

1. *Arduino Uno (Core Controller)*: The Arduino Uno serves as the brain of the
system, processing user input from the keypad and controlling the servo
motor.
2. *Keypad (User Input)*: The keypad allows users to enter a password, which is
then verified by the Arduino Uno.
3. *Servo Motor (Door Lock Mechanism)*: The servo motor simulates the door
lock mechanism, unlocking the door when the correct password is entered.
4. *Simulated Door Lock (Output)*: The simulated door lock represents the
output of the system, providing a visual representation of the door's locked or
unlocked state.

The system operates as follows:

1. The user enters a password using the keypad.


2. The Arduino Uno checks the password and, if correct, activates the servo
motor.
3. The servo motor unlocks the simulated door lock, allowing access.

This system provides a basic example of electronic access control and can be
enhanced for various applications, such as adding multiple users,
implementing password changes, or integrating with other security systems.
System Overview

The proposed door lock system is designed to demonstrate


basic access control functionality using embedded system
principles. Built around the Arduino Uno microcontroller, the
system integrates a servo motor to represent the locking
mechanism and a 4x4 keypad for user input. Developed and
tested within the Wokwi online simulator, the system
operates by prompting the user to enter a predefined
numeric passcode through the keypad interface.

Upon receiving user input, the Arduino processes the data


and compares it with the stored passcode. If the input
matches the predefined code, the servo motor rotates to
simulate door unlocking. Conversely, if the entered code is
incorrect, the servo remains in the locked position, thereby
denying access. This mechanism highlights core concepts of
authentication, real-time user interaction, and actuator
control.

This project exemplifies how microcontrollers can be


programmed to handle secure access systems and lays the
groundwork for more advanced security implementations
involving biometric sensors, wireless communication, or
database integration.
Multi-user authentication with EEPROM.

Alarm systems or buzzer alerts for multiple incorrect attempts.

Integration with IoT platforms for remote access and control.

LCD display for user feedback.


Circuit Components

The door lock system is composed of the following


essential hardware components, each serving a critical
role in the operation and simulation of access control:

1. Arduino Uno Microcontroller

* Serves as the central processing unit of the system.


* Responsible for reading keypad input, executing
authentication logic, and controlling the servo motor.
* Offers digital I/O pins, PWM output, and a regulated 5V
power supply.

2. 4x4 Matrix Keypad

* Functions as the primary user interface for passcode


input.
* Comprises 16 tactile switches arranged in a 4-row by 4-
column matrix.
* Connected to the Arduino's digital input pins to detect
key presses using row-column scanning logic.

3. SG90 Servo Motor

* Simulates the mechanical action of a door lock.


* Operates based on Pulse Width Modulation (PWM)
signals from the Arduino.
* Rotates to a defined angle (e.g., 90° for unlock, 0° for
lock) to represent the lock status.
4. Jumper Wires

* Used for making reliable electrical connections


between the Arduino and peripheral components.
* Ensure proper signal transmission and power
delivery in the circuit.

5. Breadboard(Optional in physical implementation)

* Facilitates non-permanent, flexible circuit assembly


during prototyping.
* Not required in the Wokwi simulation but beneficial
for real-world hardware testing.

6. Power Supply (5V via Arduino USB)

* Powers the entire system through the Arduino’s USB


interface or external DC source.
* Provides adequate current to drive both the keypad
and the servo motor
7. Wokwi Online Simulator

* A web-based simulation platform used to design,


test, and debug Arduino-based circuits virtually.
* Enables development without physical hardware,
supporting educational and prototyping use cases.
Arduino code
#include <Keypad.h>
#include <Servo.h>

const int ROW_NUM = 4;


const int COLUMN_NUM = 4;

char keys[ROW_NUM][COLUMN_NUM] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'} // Fixed the keypad definition
};

byte pin_rows[ROW_NUM] = {9, 8, 7, 6};


byte pin_column[COLUMN_NUM] = {5, 4, 3, 2};

Keypad keypad = Keypad(makeKeymap(keys), pin_rows, pin_column, ROW_NUM,


COLUMN_NUM);

Servo servo;
int servoPin = 10;
String password = "1234";
String input = "";

unsigned long unlockStartTime = 0;


const long unlockDuration = 5000; // 5 seconds
bool doorUnlocked = false;

void setup() {
Serial.begin(9600);
servo.attach(servoPin);
servo.write(0); // Lock the door initially
}

void loop() {
// Handle keypad input
char key = keypad.getKey();
if (key) {
if (key == '#') {
if (input == password) {
Serial.println("Correct password! Unlocking door...");
servo.write(90); // Unlock the door
unlockStartTime = millis(); // Record unlock time
doorUnlocked = true;
} else {
Serial.println("Incorrect password! Try again.");
}
input = ""; // Clear input after '#'
} else if (key == '*') { // Example: Add a clear input key
input = "";
Serial.println("\nInput cleared.");
}
else {
input += key;
Serial.print("*");
}
}

// Handle automatic locking after duration


if (doorUnlocked && (millis() - unlockStartTime >=
unlockDuration)) {
Serial.println("Locking door...");
servo.write(0); // Lock the door
doorUnlocked = false;
}
}
Code Overview: Arduino Keypad & Servo Door Lock

This Arduino sketch implements a simple, password-protected door


lock system using a 4x4 membrane keypad for input and a hobby
servo motor to simulate the locking/unlocking mechanism.
1. Header Includes:
- `#include <Keypad.h>`: This line brings in the Keypad library,
which greatly simplifies reading input from matrix keypads. It
handles key scanning, debouncing, and mapping physical keys to
characters.
- `#include <Servo.h>`: This line includes the Servo library,
essential for controlling servo motors. It provides functions to
attach a servo to a pin and set its angle.

2. Keypad Configuration:
- `const int ROW_NUM = 4;`: Defines the number of rows on the
keypad (4).
- `const int COLUMN_NUM = 4;`: Defines the number of columns on
the keypad (4).
- `char keys[ROW_NUM][COLUMN_NUM] = { ... };`: This 2D array
maps the physical layout of your 4x4 keypad to the characters that
each key represents. For example, `{'1','2','3','A'}` represents the top
row.
- `byte pin_rows[ROW_NUM] = {9, 8, 7, 6};`: An array specifying the
Arduino digital pins connected to the rows of the keypad.
- `byte pin_column[COLUMN_NUM] = {5, 4, 3, 2};`: An array
specifying the Arduino digital pins connected to the columns of the
keypad.
- `Keypad keypad = Keypad(makeKeymap(keys), pin_rows,
pin_column, ROW_NUM, COLUMN_NUM);`: This line creates an
instance of the `Keypad` object, initializing it with the key mapping,
row pins, column pins, and dimensions of the keypad. This object
will be used to get key presses.
3. Servo & Logic Variables:
- `Servo servo;`: Declares a `Servo` object, which will be
used to control the physical servo motor.
- `int servoPin = 10;`: Defines the Arduino digital pin to
which the servo's data line is connected (Pin 10).
- `String password = "1234";`: Stores the predefined
password that needs to be entered to unlock the "door". This
is a hardcoded password.
- `String input = "";`: A string variable used to accumulate
the characters entered by the user on the keypad before
checking the password.
- `unsigned long unlockStartTime = 0;`: (From the enhanced
version) A variable to store the `millis()` value when the door
is unlocked, used for timing the unlock duration.
- `const long unlockDuration = 5000;`: (From the enhanced
version) Defines the duration (in milliseconds, 5 seconds) for
which the door remains unlocked.
- `bool doorUnlocked = false;`: (From the enhanced version)
A boolean flag to track the current state of the door (locked
or unlocked).

4. `setup()` Function:
- `void setup() { ... }`: This function runs only once when the
Arduino board starts or resets.
- `Serial.begin(9600);`: Initializes serial communication at a
baud rate of 9600. This is crucial for printing messages to
the Serial Monitor for debugging and user feedback.
- `servo.attach(servoPin);`: Attaches the `Servo` object to
the specified `servoPin` (Pin 10). This tells the Arduino to
prepare that pin to control a servo.
- `servo.write(0);`: Sets the initial position of the servo to 0
degrees, simulating a "locked" state.
5. `loop()` Function:
- `void loop() { ... }`: This function runs repeatedly, endlessly, after the `setup()`
function completes. It's the heart of the program's logic.
- `char key = keypad.getKey();`: This is the core of the keypad interaction. It
checks if any key has been pressed and released. If a key is pressed, it returns the
character mapped to that key; otherwise, it returns 0.
- `if (key) { ... }`: This `if` block executes only when a key is pressed.
- `if (key == '#') { ... }`: Checks if the pressed key is the '#' key. This key acts as the
"Enter" or "Submit" key for the password.
- `if (input == password) { ... }`: Compares the accumulated `input` string with
the predefined `password`.
- `Serial.println("Correct password! Unlocking door...");`: Prints a success
message to the Serial Monitor.
- `servo.write(90);`: Moves the servo to 90 degrees, simulating an "unlocked"
state.
- `unlockStartTime = millis();`: (Enhanced version) Records the current time to
start the unlock timer.
- `doorUnlocked = true;`: (Enhanced version) Sets the flag to indicate the door
is unlocked.
- `else { ... }`: If the `input` does not match the `password`.
- `Serial.println("Incorrect password! Try again.");`: Prints an error message.
- `input = "";`: Clears the `input` string, whether the password was correct or
not, preparing for the next attempt.
- `else if (key == '*') { ... }`: (Enhanced version) Checks if the pressed key is the '*'
key (used as a clear/reset key).
- `input = "";`: Clears the accumulated input.
- `Serial.println("\nInput cleared.");`: Provides feedback that the input has
been cleared.
- `else { ... }`: If the pressed key is *not* '#' or '*', it means it's a digit or another
character to be part of the password.
- `input += key;`: Appends the pressed key character to the `input` string.
- `Serial.print("*");`: Prints an asterisk to the Serial Monitor for masking the
input.
- `if (doorUnlocked && (millis() - unlockStartTime >= unlockDuration)) { ... }`:
(From the enhanced version) This block continuously checks if the door is
currently unlocked (`doorUnlocked` is true) AND if the `unlockDuration` has
passed since `unlockStartTime`.
- `Serial.println("Locking door...");`: Prints a message indicating the door is being
relocked.
- `servo.write(0);`: Moves the servo back to 0 degrees (locked state).
- `doorUnlocked = false;`: Resets the flag to indicate the door is now locked.
How to use

Step-by-Step Instructions

1. *Enter the Password*: Enter the password "1234" using the keypad. As you enter
each digit, an asterisk (*) will appear in the serial monitor to mask the password.
2. *Submit the Password*: After entering the password, press the "#" key to submit
it. The Arduino Uno will then verify the password.
3. *Password Verification*: If the password is correct, the serial monitor will display
"Correct password! Unlocking door...". The servo motor will then rotate to the 90-
degree position, simulating the unlocking of the door.
4. *Door Unlocking*: The door will remain unlocked for 5 seconds, allowing access.
5. *Door Locking*: After 5 seconds, the servo motor will rotate back to the 0-
degree position, simulating the locking of the door.
6. *Incorrect Password*: If the password is incorrect, the serial monitor will display
"Incorrect password! Try again.". The door will remain locked.

Tips and Precautions

- Make sure to enter the correct password to avoid multiple incorrect attempts.
- The door will only remain unlocked for 5 seconds. If you need more time, you will
need to re-enter the password and submit it again.
- You can modify the password and other parameters in the Arduino code to suit
your needs.

System Limitations

- The system uses a simple password verification mechanism and may not be
suitable for high-security applications.
- The system assumes that the user will enter the correct password. You may want
to add additional features, such as a limited number of attempts or a timeout
period, to enhance security.

By following these steps and understanding the system's limitations, you can
effectively use the door lock system to simulate electronic access control using an
Arduino Uno, servo motor, and keypad.
conclusion
this project demonstrates a basic door lock system using an
Arduino Uno, a servo motor, and a keypad. The system
provides a simple example of electronic access control and
showcases the potential of Arduino-based systems in security
applications. The Wokwi simulator allows for easy testing and
modification of the project, making it an ideal platform for
experimenting with Arduino-based systems.

This project can be enhanced for various applications, such as


adding multiple users, implementing password changes, or
integrating with other security systems. The system's
simplicity and flexibility make it an excellent starting point for
more complex projects. By building on this foundation,
developers can create more sophisticated access control
systems that meet specific needs and requirements.

The project's outcomes highlight the potential of electronic


access control systems in various settings, including
residential, commercial, and industrial environments. As
technology continues to evolve, the demand for secure and
efficient access control systems will only increase. This
project provides a fundamental understanding of electronic
access control and serves as a stepping stone for further
innovation and development in the field. With its simplicity
and versatility, this project is an excellent resource for
developers, makers, and anyone interested in exploring
electronic access control systems.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy