Microcontroller-Based Door Locking System
Microcontroller-Based Door Locking System
Abstract: This paper presents the design and development of a low-cost, microcontroller-based door locking system utilizing
an Arduino Uno, a keypad for password input, an LCD for user feedback, and a servo motor to simulate a locking
mechanism. The project serves as a practical exploration of fundamental concepts in embedded systems and access control.
The system's architecture, hardware integration, and software implementation for password entry, verification, and
actuation are detailed. Functional testing demonstrates the successful operation of the core components, highlighting the
potential for keyless entry and basic security enhancement. The paper also discusses the system's limitations, including
security vulnerabilities and the non-robust locking mechanism, and proposes avenues for future work such as enhanced
security protocols, multi-user support, and integration with smart home systems. This work contributes to the
understanding of basic electronic access control principles and the capabilities of low-cost microcontroller platforms in
security applications.
Keywords: Microcontroller-Based System, Door Locking System, Access Control, Embedded Security, Arduino.
How to Cite: Kapil Kumar Bhati; Mohit Kumar; Pankaj Maurya; Mohammad Shahzad; Vishnu Kumar Singh (2025)
Microcontroller-Based Door Locking System. International Journal of Innovative Science and Research Technology,
(RISEM–2025), 136-144. https://doi.org/10.38124/ijisrt/25jun180
I. INTRODUCTION solutions.
The increasing demand for secure and convenient Background and Motivation
access control solutions has driven significant advancements The evolution of access control from traditional
in electronic locking systems. Traditional mechanical locks, mechanical locks to sophisticated electronic systems has
while ubiquitous, suffer from limitations such as the risk of been driven by the need for enhanced security and
key loss or duplication and a lack of flexibility in access convenience. Electronic door locking systems, leveraging
management. Electronic door locking systems offer potential technologies like PIN codes, RFID, and biometrics, offer
advantages in terms of security, convenience, and the ability advantages over mechanical counterparts, including flexible
to integrate with other smart technologies. Microcontroller- access management and integration potential.
based platforms, like the Arduino, provide a cost-effective Microcontroller platforms, such as the Arduino, provide a
and versatile foundation for prototyping and developing such low-cost and accessible means for developing these systems,
systems, making them accessible for educational purposes, making them relevant for educational purposes and basic
DIY projects, and even basic commercial applications. This practical applications. This paper explores the fundamental
paper explores the design and implementation of a principles of such systems through the design and
fundamental microcontroller-based door locking system, implementation of a basic Arduino-based door lock.
highlighting its architecture, functionality, and potential for
future development. System Overview
This paper details the development of a basic electronic
This work details the development of a system door locking system centered around the Arduino Uno
employing a keypad for user input, an LCD for feedback, and microcontroller. The system incorporates a 4x4 keypad for
a servo motor as a simulated lock, all controlled by an users to input a password, a 16x2 I2C LCD module to
Arduino Uno. The project serves as a case study in applying provide visual feedback during password entry and system
embedded systems principles to access control, examining status updates, and a small servo motor to simulate the
the interplay between hardware and software components. mechanical locking and unlocking of a door. A passive
By outlining the design process, testing results, and inherent buzzer is included to provide auditory feedback for
limitations, this paper aims to contribute to the successful or unsuccessful access attempts. The Arduino
understanding of the basic principles involved in electronic Uno acts as the central processing unit, reading input from
door locking mechanisms and to identify key areas for future the keypad, controlling the LCD display, actuating the servo
research and improvement in low-cost access control motor, and generating sound through the buzzer based on the
implemented software logic for password verification. storage of passwords within the limited resources of
embedded systems is also an active area of research, with
Scope and Objectives of the Research hashing and salting algorithms being adapted for resource-
constrained environments to enhance security against data
To design and implement a basic microcontroller-based breaches [8].
door locking system using an Arduino Uno.
To develop a functional password-based access control User Interface and Experience in Electronic Locks
mechanism utilizing a keypad and a simulated locking The design of the user interface in electronic door locks
mechanism. is paramount for both security and user acceptance. While
To evaluate the system's core functionalities, including keypad-based systems offer a straightforward input method,
password entry, verification, and actuation. they can present usability challenges if not designed
To identify the limitations of this basic implementation thoughtfully [9]. Effective Human-Computer Interaction
and propose potential avenues for future development in (HCI) principles emphasize the need for clear feedback
low-cost electronic access control. mechanisms, such as visual or auditory cues confirming key
presses and the outcome of authentication attempts, to guide
II. LITERATURE REVIEW users and minimize errors [10].
Microcontroller-Based Access Control Systems Research suggests that providing temporary visual
The use of microcontrollers, particularly platforms like display of entered characters can improve accuracy
Arduino, has been widely investigated for developing access compared to solely masked input [11]. Furthermore, a
control systems due to their affordability and adaptability. consistent and intuitive design language is crucial for
Research has demonstrated the feasibility of employing enhancing memorability and reducing the cognitive load on
Arduino for creating customizable security solutions suitable users interacting with the system [12]. Ultimately, the
for various applications [1]. A significant area of exploration challenge lies in striking a balance between implementing
involves integrating Radio Frequency Identification (RFID) robust security measures and ensuring a user-friendly
technology with Arduino to achieve contactless access experience that doesn't lead to insecure workarounds [13].
control, enhancing both security and user convenience [2],
[3]. III. COMPONENTS
These systems typically utilize RFID readers to identify Arduino Uno Microcontroller:
users through unique tags, with the Arduino microcontroller At the heart of our electronic door locking system lies
verifying these credentials and subsequently controlling the Arduino Uno, a compact yet capable single-board
electronic locking mechanisms such as solenoid locks [3]. computer. This board houses the ATmega328P
Furthermore, studies have shown the potential to extend the microcontroller, which acts as the system's brain, executing
functionality of Arduino-based access control by the instructions we program into it. With a processing speed
incorporating web-based interfaces for user management and of 16 MHz, it's quick enough to handle the real-time tasks of
system monitoring, indicating a pathway towards more reading user input, updating the display, and controlling the
sophisticated and manageable security solutions [2]. locking mechanism and buzzer. The Arduino Uno provides
a set of digital input/output pins, some of which can generate
Security Considerations in Embedded Locking Systems Pulse Width Modulation signals essential for controlling the
Ensuring the security of embedded door locking servo motor's precise movements. It also features analog
systems is a critical area of research. Password-based input pins, though these aren't directly utilized in our current
authentication, while common in low-cost systems, presents password-based lock.
several security challenges. Studies have examined the
vulnerability of these systems to brute-force attacks, where The board is designed for ease of use, featuring a
an attacker systematically tries all possible password convenient USB connection that serves both for uploading
combinations [4]. Furthermore, the risk of shoulder surfing, our program code and for powering the device during
where unauthorized individuals observe the password being development. It also has a separate power jack for situations
entered, is a significant concern [5]. To mitigate these risks, where external power is needed. The Arduino's memory
researchers have explored techniques such as implementing includes flash memory for storing the program, SRAM for
lockout periods after multiple failed attempts and using non- temporary data during operation, and EEPROM for
sequential or randomly generated default passwords [6]. persistent storage if we needed to save information like the
password even when the power is off (though our basic
Hardware security is another crucial aspect, with system might not use EEPROM). The combination of its
investigations into protecting the microcontroller and processing power, versatile input/output capabilities, and the
memory from physical tampering to prevent unauthorized user-friendly Arduino development environment makes the
access to stored passwords or system control [7]. Secure Uno an excellent platform for creating and experimenting
with embedded systems like our door lock.
4x4 Membrane Keypad: electrical states of these rows and columns. To determine
The 4x4 keypad serves as the primary human interface which button has been pressed, the Arduino employs a
for our door locking system, allowing users to input their technique called row-column scanning. This involves
unique access code. This input device is structured as a grid sequentially activating each row by setting it to a high or low
of sixteen individual push-button switches, arranged in four logic level and then reading the status of the columns. If a
rows and four columns. Each button, when physically button in that row is pressed, the signal will propagate to the
pressed, creates a temporary electrical connection between a corresponding column, allowing the Arduino to pinpoint the
specific row and a specific column within this matrix. The exact button that is being held down
Arduino microcontroller continuously monitors the
.
This matrix arrangement is an efficient way to manage 16x2 I2c Lcd Module:
a relatively large number of buttons using a smaller number The 16x2 Liquid Crystal Display (LCD) module serves
of microcontroller pins. Instead of needing a dedicated pin as the primary visual output interface for our door locking
for each of the sixteen buttons, the 4x4 keypad typically system, providing essential real-time feedback to the user.
requires only eight pins (four for the rows and four for the This display has the capability to present sixteen characters
columns) to be connected to the Arduino. The Keypad.h across each of its two lines, allowing for clear and concise
library, commonly used in Arduino projects, provides pre- textual communication regarding the system's operation. In
built functions that handle the complexities of scanning the our project, the LCD is used to show the characters entered
keypad, debouncing the mechanical switches (to prevent by the user via the keypad, often masked with asterisks to
multiple readings from a single press), and returning the maintain basic password security during input. Furthermore,
character associated with the pressed key. In our door it plays a vital role in conveying the system's status,
locking system, each button on the keypad will likely be displaying messages such as a welcome screen upon startup,
assigned a specific digit (0-9) and potentially some control confirmation of a successful password entry, or an indication
characters (like '#' for enter or '*' for clear), forming the of an incorrect attempt, thus guiding the user through the
vocabulary that users can use to enter their password. The interaction.
accurate and reliable reading of these key presses by the
Arduino is fundamental to the security and usability of our
system, as it forms the basis for the password verification
process.
Fig 3 The 16x2 Liquid Crystal Display (LCD) Module Providing A Visual Interface
The control of a servo motor is typically achieved using and mechanical analogy for a door lock's function, it's
Pulse Width Modulation (PWM) signals sent from the important to remember that a small hobby servo lacks the
microcontroller, in our case, the Arduino Uno. A PWM physical strength and security of a real-world locking
signal is a series of electrical pulses where the width of each mechanism.
pulse determines the commanded angle of the servo's shaft.
A standard servo motor usually has three connection wires: Piezo Buzzer
one for power (typically +5V), one for ground, and one for The buzzer in our door locking system serves as a
the control signal that carries the PWM pulses. By varying crucial element for providing auditory feedback to the user,
the duration of the high pulse within a specific period complementing the visual cues from the LCD. This small
(usually around 20 milliseconds), the Arduino can instruct electromechanical component is capable of producing sound
the servo to rotate to a precise angular position. In our door when an electrical signal is applied to it. In our specific
lock simulation, we utilize this capability to define specific implementation, we are using a passive buzzer. Unlike active
angles that correspond to the "locked" and "unlocked" states buzzers, which contain their own internal oscillating circuit
of the door. When the Arduino verifies a correct password, and generate a tone with a simple DC voltage, a passive
it sends a PWM signal that directs the servo to move to the buzzer requires an external alternating current (AC) signal to
"unlocked" angle. Conversely, for a locked state or an produce sound waves. This means that the Arduino
incorrect password, the signal commands the servo to remain microcontroller must actively generate the oscillating signal
or move to the "locked" angle. While providing a clear visual to make the buzzer emit a tone.
The Arduino can easily achieve this by rapidly toggling The sequence of characters stored in the input buffer is
a digital output pin connected to the buzzer between a high compared, character by character, against a pre-stored
and a low logic level. The speed at which this toggling occurs correct password that resides within the Arduino's program
determines the frequency of the sound produced, and thus memory. This comparison is case-sensitive if implemented
the pitch we hear. By carefully controlling the frequency and as such in the software. The outcome of this comparison
the duration of these signals in our program, we can create determines the subsequent actions of the system.
distinct auditory patterns to signify different events within
the door locking system. Output and Feedback Mechanisms
Based on the result of the password verification, the
For example, a short, high-pitched beep might indicate system provides feedback to the user through the output
that a button on the keypad has been successfully pressed, components:
providing immediate confirmation to the user. A longer,
perhaps lower-pitched tone could signal that the entered Successful Authentication (Password Match):
password has been verified as correct and the simulated lock If the entered password matches the stored password,
has been disengaged. Conversely, a series of rapid beeps or the Arduino sends a control signal (PWM) to the servo
a distinct, unpleasant tone might be used to alert the user to motor. This signal instructs the servo to rotate to a specific
an incorrect password entry. This use of varied auditory angle representing the "unlocked" state. Simultaneously, the
feedback enhances the user experience by providing an buzzer emits a distinct auditory signal (e.g., a long beep), and
additional layer of information about the system's state and the LCD displays a positive confirmation message such as
the outcome of their interactions, making the system more "Password Accepted" or "Unlocked."
intuitive to use.
Failed Authentication (Password Mismatch):
IV. WORKING PRINCIPLE If the entered password does not match the stored
password, the Arduino does not actuate the servo to the
System Initialization and user Input "unlocked" position. Instead, the buzzer produces a different
Upon power-up, the Arduino Uno initializes the auditory signal (e.g., a series of short beeps or a low-pitched
connected components, primarily the LCD and the keypad. tone), and the LCD displays an error message like "Wrong
The LCD typically displays an initial message, prompting Password" or "Access Denied." Following a failed attempt,
the user for input. The system then enters a state where it the system may reset, prompting for a new password entry,
continuously monitors the 4x4 keypad for any button or it might implement a security lockout for a certain period
presses. When a user presses a key, the Arduino detects this after multiple incorrect attempts.
using row-column scanning and registers the corresponding
character. Circuit Diagram and Component Interconnection
The functional operation of the microcontroller-based
For each valid input, the Arduino updates the LCD to door locking system is directly enabled by the specific
show a masked character (like an asterisk), providing visual electrical connections between its constituent components,
confirmation of input without revealing the actual password. as illustrated in Figure 1. The 4x4 keypad's row and column
Optionally, a short auditory beep from the buzzer may pins are wired to designated digital input pins on the Arduino
accompany each key press. The entered characters are stored Uno, allowing the microcontroller to scan for button presses
sequentially in a temporary memory buffer within the and identify user input. The 16x2 I2C LCD module is
Arduino. connected to the Arduino via the I2C interface, utilizing the
Arduino's analog pins A4 (SDA) and A5 (SCL) for serial
Password Verification data communication, which simplifies the wiring required
Once the user signals the completion of their password for displaying system feedback.
entry (either by pressing a designated "enter" key or after a
predefined number of characters), the Arduino initiates the
password verification process.
The servo motor, responsible for simulating the door duration of lockout periods (if implemented), and the
lock, is connected with its control signal wire to a specific specific visual and auditory feedback provided to the user at
digital pin on the Arduino that supports Pulse Width each stage of interaction.
Modulation (PWM) output, enabling precise angular control.
Finally, the passive buzzer is connected to another digital V. MERITS
output pin on the Arduino, which the microcontroller can
rapidly toggle to generate the necessary oscillating signal for The "Microcontroller-Based Door Locking System"
producing sound. Power and ground connections are offers several key benefits, particularly in the context of
established from the Arduino's 5V and GND pins to each of learning, basic security awareness, and cost-effectiveness:
the peripheral components, ensuring they receive the
necessary electrical supply to operate. These Demonstration of Fundamental Concepts:
interconnections form the physical pathways through which The project serves as a clear and tangible illustration of
signals and power are exchanged, allowing the Arduino to core principles in embedded systems, digital logic, and basic
sense user input and control the output devices according to security implementation. It allows learners to understand the
the programmed logic that defines the system's working interaction between hardware components (microcontroller,
principle. input/output devices) and software programming for access
control.
System Control Flow
The entire operation of the door locking system is Cost-Effectiveness:
governed by the program logic implemented on the Arduino Utilizing a low-cost microcontroller platform like the
Uno. The microcontroller continuously cycles through the Arduino Uno and readily available peripherals (keypad,
process of reading keypad input, updating the LCD, LCD, servo, buzzer) makes the system relatively
performing password verification when a complete entry is inexpensive to build. This affordability makes it accessible
detected, and controlling the servo motor and buzzer based for educational purposes, hobbyist projects, and basic DIY
on the verification outcome. The software defines the correct security applications.
password, the number of allowed attempts (if any), the
Customizability and Expandability: power source. In the event of a power outage, the locking
The open-source nature of the Arduino platform allows mechanism might become inoperable unless a backup power
for easy modification and expansion of the system's supply is implemented.
functionality. The password can be readily changed in the
code, and additional features like logging attempts or VII. CONCLUSION
different unlocking mechanisms could be explored.
This paper presented the design and implementation of
Enhanced Convenience (Basic): a basic microcontroller-based door locking system utilizing
Even in its basic form, the system offers a level of an Arduino Uno, a keypad for input, an LCD for feedback,
convenience over traditional key-based locks by providing and a servo motor to simulate a locking mechanism. The
keyless entry. Users do not need to carry physical keys that project served as a practical exploration of fundamental
can be lost or duplicated. principles in embedded systems and access control. The
system successfully demonstrated the core functionalities of
Foundation for Security Awareness password-based entry, verification, and simulated actuation,
Building and understanding this system can raise highlighting the potential of low-cost microcontroller
awareness about the fundamental principles and potential platforms for creating functional prototypes of electronic
vulnerabilities of electronic access control systems. It security systems.
provides a hands-on introduction to security considerations
that are crucial in more complex systems. The merits of this approach include its value as an
educational tool for understanding embedded security
VI. DEMERITS concepts, its cost-effectiveness due to the use of readily
available components, and its potential for customization
The "Microcontroller-Based Door Locking System," in and expansion. However, the current implementation also
its current basic implementation, also presents several exhibits limitations, notably in its basic security features,
limitations and potential drawbacks: single-user support, and the use of a simulated locking
mechanism. These demerits underscore the need for further
Limited Security: development to enhance the system's robustness and
The security of the system is rudimentary. The suitability for real-world security applications.
password is typically stored in the microcontroller's code,
making it potentially vulnerable to reverse engineering or Future work could focus on addressing the identified
unauthorized access if the hardware is compromised. It lacks vulnerabilities through more sophisticated security
advanced security features like encryption or protection protocols, implementing multi-user management,
against sophisticated attacks. integrating more secure locking hardware, and exploring
features such as access logging and tamper detection. This
Single User Limitation: foundational project provides a valuable stepping stone for
The current design typically supports only a single, further investigation into the design and implementation of
pre-programmed password. It does not inherently handle more advanced and secure microcontroller-based access
multiple users with different access privileges or the ability control solutions.
to easily change or manage user access.
REFERENCES
Simulated Locking Mechanism:
The use of a hobby servo motor to simulate a door lock [1]. S. Ahmed and M. A. Khan, "Design and
provides a good demonstration of the concept but lacks the Implementation of a Low-Cost Password-Based Door
physical strength and security of a real-world locking Locking System Using Arduino," Int. J. of Electrical
mechanism like a solenoid bolt or a motorized deadbolt. It and Computer Engineering (IJECE), vol. 8, no. 3, pp.
would be easily bypassed in a real security scenario. 1546-1553, 2018.
[2]. R. Sureshkumar, S. Gokulakrishnan, and R.
Vulnerability to Brute-Force Attacks: Senthilkumar, "Arduino Based Smart Door Locking
Without implemented countermeasures, the system System," International Journal of Innovative
could be susceptible to brute-force attacks, where an attacker Research in Computer and Communication
tries numerous password combinations in an attempt to gain Engineering, vol. 5, no. 3, pp. 488-493, 2017.
unauthorized access. [3]. N. Kumar, A. Goyal, and S. Sharma,
"Microcontroller Based Door Locking System with
Lack of Audit Trail: Password Protection," International Journal of
The basic system does not typically include any Engineering Research and Technology (IJERT), vol.
mechanism for logging access attempts, successful or failed. 4, no. 03, 2015.
This lack of an audit trail can be a significant limitation in [4]. S. A. Abbasi, M. A. Shaikh, and F. A. Memon,
security-sensitive applications. "Development of a Secure Door Locking System
Using Microcontroller," Engineering, Technology &
Potential for Power Dependency: Applied Science Research, vol. 8, no. 1, pp. 2645-
As an electronic system, it is dependent on a reliable 2649, 2018.