Professional Documents
Culture Documents
FYP2 Final
FYP2 Final
By
Supervisor
(Dr. Munawar Iqbal)
The candidate confirms that the work submitted is their own and appropriate
credit has been given where reference has been made to the work of others.
1
Institute of Information Technology
Quaid-i-Azam University Islamabad
A project presented to
Institute of Information Technology
Quaid-i-Azam University, Islamabad
In partial fulfillment
of the requirement for the degree of
By
2
DECLARATION
We hereby declare that this software, neither whole nor as a part has been copied out from any
source. It is further declared that we have developed this software and accompanied report
entirely on the basis of our personal efforts. If any part of this project is proved to be copied out
from any source or found to be reproduction of some other, we will stand by the consequences.
No Portion of the work presented has been submitted of any application for any other degree or
qualification of this or any other university or institute of learning.
3
CERTIFICATE OF APPROVAL
It is to certify that the final year project of BS (IT) “Automatic Secure Door Lock using Orange
Pi” was developed by Muhammad Ehsan ul Haq Khan (09162013005) and Muhammad
Shoaib Asghar (09162013012) under the supervision of “Dr Munawar Iqbal” that in
(their/his/her) opinion; it is fully adequate, in scope and quality for the degree of Bachelors of
Information Technology.
Supervisor
External Examiner
Head of Department
(Institute of Information technology)
4
Executive Summary
An automatic secure door lock based on the web using Orange Pi is a cutting-edge security
solution that utilizes the power of the internet and a single-board computer to control and secure
access to a door. The system consists of an Orange Pi board, which is connected to the internet,
and an electronic door lock mechanism. The Orange Pi is programmed to interact with the lock
and control access based on various inputs, such as a user inputting a correct code, a biometric
scan, or a remotely generated request.
The system can be controlled through a web interface, which can be accessed from any device
with internet access, such as a smartphone, tablet, or computer. This allows users to remotely
grant or revoke access to the door, making it ideal for use in homes, offices, and secure facilities.
The web interface is designed to be user-friendly, with a simple and intuitive interface that
makes it easy for users to manage access to the door.
The system is designed to be highly secure, with features such as encrypted communications,
secure user authentication, and the ability to log and track access attempts. This ensures that
unauthorized access to the door is prevented, and that sensitive information, such as user codes
and biometric data, is protected.
In summary, the automatic secure door lock based on the web using Orange Pi is a powerful and
convenient security solution that offers a secure and convenient alternative to traditional
mechanical locks. With its internet-based control and user-friendly interface, it is an ideal
solution for homes, offices, and secure facilities looking to upgrade their security systems.
5
Acknowledgement
All praise is to Almighty Allah who bestowed upon us a minute portion of His boundless
knowledge by virtue of which we were able to accomplish this challenging task.
We are greatly indebted to our project supervisor “Dr Munawar Iqbal”. Without their
personal supervision, advice and valuable guidance, completion of this project would have been
doubtful. We are grateful to them for their encouragement and continual help during this work.
And we are also thankful to our parents and family who have been a constant source of
encouragement for us and brought us with the values of honesty & hard work.
6
Table of Contents
1 Introduction ........................................................................................................................... 12
1.1 Vision Statement ......................................................................................................................... 12
1.2 Related System Analysis/Literature Review............................................................................... 13
1.3 Project Deliverables .................................................................................................................... 14
1.4 System Limitations/Constraints .................................................................................................. 14
1.5 Tools and Technologies .............................................................................................................. 15
1.6 Relevance to Course Modules..................................................................................................... 15
2 Problem Definition................................................................................................................ 17
2.1 Problem Statement ...................................................................................................................... 17
2.2 Problem Solution ........................................................................................................................ 17
2.3 Objectives of the Proposed System ............................................................................................. 17
2.4 Scope ........................................................................................................................................... 18
2.5 Modules....................................................................................................................................... 18
2.5.1 Module 1 ............................................................................................................................... 19
2.5.2 Module 2 .............................................................................................................................. 19
2.5.3 Module 3 .............................................................................................................................. 19
2.5.4 Module 4 .............................................................................................................................. 20
2.5.5 Module 5 .............................................................................................................................. 20
3 Requirement Analysis ........................................................................................................... 22
3.1 User classes and characteristics................................................................................................... 22
3.2 Requirement Identifying Technique ........................................................................................... 23
3.3 Functional Requirements ............................................................................................................ 26
3.3.1 Functional Requirement X .................................................................................................... 27
3.4 Non-Functional Requirements .................................................................................................... 28
3.4.1 Reliability .............................................................................................................................. 28
3.4.2 Usability ................................................................................................................................ 29
3.4.3 Performance .......................................................................................................................... 29
3.4.4 Security ................................................................................................................................. 30
3.5 External Interface Requirements ................................................................................................. 31
3.5.1 User Interfaces Requirements ............................................................................................... 31
3.5.2 Hardware interfaces............................................................................................................... 31
3.5.3 Communications interfaces ................................................................................................... 31
4 Design and Architecture ....................................................................................................... 33
4.1 Architectural Design ................................................................................................................... 34
4.2 Design Models ............................................................................................................................ 34
4.3 Data Design................................................................................................................................. 35
4.3.1 Data Dictionary ..................................................................................................................... 36
4.4 Human Interface Design ............................................................................................................. 36
4.4.1 Log In Screen ........................................................................................................................ 37
4.4.2 Door Lock Management Screen ............................................................................................ 37
4.4.3 Screen Objects and Actions .................................................................................... 38
5 Implementation ..................................................................................................................... 40
5.1 Algorithm .................................................................................................................................... 40
7
5.2 User Interface .............................................................................................................................. 42
5.2.1 Login Screen ......................................................................................................................... 42
5.2.2 Door Lock Action Screen ......................................................................................... 43
5.3 Deployment ................................................................................................................................. 44
6 Testing and Evaluation ......................................................................................................... 46
6.1 Module Testing ........................................................................................................................... 46
6.2 Integration Testing ...................................................................................................................... 46
6.3 Approval Testing ....................................................................................................................... 46
6.4 Hardware Testing ........................................................................................................................ 46
7 Conclusion and Future Work ................................................................................................ 48
7.1 Conclusion .................................................................................................................................. 48
7.2 Future Work ................................................................................................................................ 48
8. References ............................................................................................................................. 51
8
List of Figures
Figure 1 Login Screen ................................................................................................................... 37
Figure 2 Door Lock Management Screen ..................................................................................... 37
9
Chapter 1
Introduction
10
1 Introduction
Nowadays, technology plays an essential role in our life in which different domain of interests
are taking advantage of technology. Recently, computers and smart phones have significantly
contributed our daily life where numerous computations and adjustments are being accomplished
by such technologies. Securing homes has become one of the concerning issues that facing many
people. With the expanded duration of leaving the home due to work, study and other duties,
homes are being more vulnerable for several threats especially being burgled. Apart from the
threats, there are different cases where securing or monitoring the house is very critical such as
the existence of elderly individuals or kids with baby sitter. For this manner, home security
system or so-called Home OS has been proposed in order to provide more secure arrangements.
Such concept aims to turn the home into a smart in which different tasks especially monitoring
can be performed remotely. Monitoring and controlling some tasks inside the house would have
the ability to provide maximum safety. Home automation system is a computer-based application
that has the ability to connect different electronic devices for the sake of monitoring and
controlling the door locks. Home automation system is an area that has caught several attentions
by both the academic and business fields. The earliest effort of home security system was relied
on wired home networks however, due to the appropriate planning and construction works
required to offer a wired home, such effort tend to be insufficient. As a solution for this problem,
wireless communication has been emerged to provide more flexible platform where the
installation cost is significantly lower than the wired one. Therefore, it has been applied for
different security home systems in order to provide an alarm for critical threats such as intrusions
or other environmental risks such as gas leaking or fire. Recently, electronic door lock systems
are one of the most popular security systems that is being installed for many residents and
business places. The key characteristic behind such systems lies on the reliability in which the
authorized individuals can gain the permission to access the doors throughout a secure system
that has an interactive interface.
Our vision is to provide a seamless, secure, and accessible solution for managing door locks
through technology, empowering individuals and organizations to protect their assets and
enhance their lifestyle with peace of mind.
Our product vision is to create a world where homeowners can live confidently and worry-free,
knowing that their property is protected by the best technology available. We believe in the
power of technology to simplify and improve our daily lives, and we are committed to creating a
product that reflects that belief.
Our door lock system not only offers the convenience of remote access, but also the peace of
mind of robust security measures. We are dedicated to ensuring that our product meets the
highest standards for security, reliability, and ease of use, to provide a well-rounded home
automation solution that exceeds the expectations of our customers.
11
The following keyword template works well for crafting a product vision statement:
There are several existing online door lock systems that use Raspberry Pi. These systems
typically use the Raspberry Pi as a central control unit, communicating with the lock mechanism
and other components over the network. Some popular systems include:
RaspiLock: An open-source project that allows users to control a door lock using a Raspberry Pi
and a mobile app.
Pi-Locker: A Raspberry Pi-based door lock system that can be controlled remotely using a web
interface.
HomeBridge: A platform that allows users to integrate various smart home devices, including
door locks, with Apple HomeKit.
OpenHAB: An open-source home automation platform that supports a wide range of devices,
including door locks, and can run on a Raspberry Pi.
12
1.3 Project Deliverables
1. Orange Pi Device
2. 12 V Lock
3. 12 Volt Relay single switch
4. 3 Meter ethernet cable
1. Internet connectivity requirement: The proposed door lock system requires a stable and
reliable internet connection for remote access and control, which may not be available in
all locations.
2. Compatibility with existing locks: The proposed system may not be compatible with all
types of existing door locks and may require additional hardware for installation.
3. Technical skill requirement: Installation and set up of the system may require technical
skill and knowledge, making it difficult for some users to install and use.
4. Cost: The cost of the proposed system may be higher compared to traditional keyed locks
or simple electronic locks.
5. Security risks: The proposed system relies on secure web-based access and control,
which can be vulnerable to cyber threats such as hacking and malicious software.
6. Privacy concerns: The collection and storage of user data, including access logs, may
raise privacy concerns for some users.
7. Power outages: The proposed system may be impacted by power outages, rendering it
temporarily inoperable.
13
1.5 Tools and Technologies
Hardware:
The hardware used for this project is Orange Pi similar to Raspberry PI it is a micro-computer
with its own microprocessor and micro controllers and an interface for outputting signals.
Software:
We use non-GUI base Ubuntu version and installed it on the Orange Pi PC. Most of the code is
done using Visual Studio Code.
Table 2 Tools and Technologies for Proposed Project
Our Project using programming and other computer science tools that are related to our dgree
like Database computer architecture etc.
Web Development: The project involves the development of a web-based user interface for
remote control and monitoring of the door lock, which is a key component of web development.
Database Management: The project may require the use of databases to store user information,
access logs, and other data, making it related to database management courses.
Network Security: The project requires secure authentication and authorization mechanisms to
ensure the privacy and security of user data, making it related to network security courses.
Software Engineering: The project involves the design, development, and testing of software for
the door lock system, making it related to software engineering courses.
14
Chapter 2
Problem Definition
15
2 Problem Definition
This chapter discusses the precise problem to be solved. It should extend to include the outcome.
• No stressing if we miss keys at home or forget to lock the door while leaving
• Providing a safe and secure way to lock and unlock doors
• To provide a secure and convenient means of remote access and control for door locks.
16
• To design a user-friendly web-based interface for accessing and controlling door locks.
• To develop a reliable and scalable system that can support a large number of door locks
and users.
2.4 Scope
Online Secure Door Lock is created to provide user ease of use in their daily life by simply
providing them a secure and safe way to lock and unlock their doors from anywhere this project
is developed as the final requirement of BSCS degree and will be completed in 2 semester period
meaning 8 months.
The scope of the proposed project the design and implementation of a secure, scalable, and user-
friendly software system for remote access and control of door locks.
2.5 Modules
The proposed project, the automated secure door lock based on a web application, consists of the
following modules:
User Login/Registration: Users can create an account and log in to the system to access and
control their door locks.
Door Lock Management: Users can view the status of their door locks and lock/unlock them
remotely through the web interface.
Event Logs: Users can view a log of events related to their door locks, including lock/unlock
events and unauthorized access attempts.
Access Management: Users can grant and revoke access permissions to others, enabling flexible
management of who has access to the premises.
17
Notifications: Users will receive real-time notifications of events related to their door locks,
including alerts for unauthorized access attempts.
User Management: The administrator can manage users, including adding new users, editing user
information, and deactivating accounts.
Access Management: The administrator can manage access permissions for users, including
granting and revoking access to door locks.
Event Logs: The administrator can view a log of all events related to the door locks, including
lock/unlock events and unauthorized access attempts.
Notifications: The administrator will receive notifications of events related to the door locks,
including alerts for unauthorized access attempts.
2.5.1 Module 1:
2.5.2 Module 2:
2.5.3 Module 3:
18
2.5.4 Module 4:
4: Notification Module:
Module 5:
19
Chapter 3
Requirement Analysis
20
3 Requirement Analysis
Introduction:
The requirement analysis is an important phase in the software development life cycle as it helps
to identify and understand the needs of the stakeholders and users. This chapter provides an in-
depth analysis of the requirements for the automated secure door lock based on web application.
It outlines the functional and non-functional requirements, user needs and expectations, and
technical requirements necessary to develop a high-quality and effective solution. The
requirements are analyzed to ensure that the project meets the desired objectives and delivers the
desired outcomes. The result of the requirement analysis will be used to guide the design and
development of the system.
Guests Guests are visitors who are given temporary access to the property by
the homeowners. They may include friends, family members, and
service providers such as delivery personnel, cleaners, or maintenance
workers.
Property managers Property managers are individuals who manage multiple properties and
are responsible for granting access to guests and maintenance
personnel.
21
3.2 Requirement Identifying Technique
There are various requirement identifying techniques that can be used. Some of the popular ones
are Use case analysis, Event-Response Table, Functional Requirements, For instance,
Login
User
Add User
Lock Door
View Status
Delete User
Unlock Door
22
Use Case ID: Enter a unique numeric identifier for the Use Case. e.g. UC-1
Use Case Name: A descriptive name for the use case, such as "Unlock Door".
Actors: The actor or user that initiates the request to the system.
Trigger: The event that starts the use case, such as a user approaching a door and requesting
access.
Preconditions: Any conditions that must be met before the use case can start.
• The user must have an active account with the system.
• The user must have the necessary credentials to access the system.
• The door lock must be properly installed and configured.
• The user's device must have an active internet connection.
Postconditions:
Any changes to the system or conditions that result from the completion of the use
case.
• Successful authentication of the user.
• Unlocking of the door.
• Recording of the user's access and time of entry.
• Secure storage of all access logs.
• Generation of reports on user activity.
• Provision of real-time notifications for authorized personnel.
• Maintenance of the system's security and privacy protocols
Normal Flow: The step-by-step description of the actions taken by the system and the user to
complete the use case.
• User accesses the door lock system through the web application.
• User enters their login credentials to authenticate their identity.
• The system verifies the user's credentials and grants access if they are valid.
• The user selects the door lock they want to control from the list of available
locks.
• The user selects the desired action, such as locking or unlocking the door.
• The system carries out the requested action and displays a confirmation
message to the user.
• The user logs out of the system.
24
Alternative Flows: Any alternate paths the use case may take, such as a user being denied access.
• If the user enters an incorrect password, the system will prompt the user to re-
enter the password.
• If the user exceeds the maximum number of attempts, the system will lock the
user out for a specified amount of time.
• If the user tries to access the door without being authorized, the system will
deny access and notify the administrator.
• If the door is not able to be locked or unlocked due to a technical malfunction,
the system will notify the administrator for manual intervention.
• If the internet connection is lost, the system will switch to offline mode and
allow access based on pre-authorized credentials stored on the device
Exceptions: Any exceptional or error conditions that may occur during the use case.
• Incorrect or invalid user credentials
• Network connectivity issues
• Lack of sufficient permissions to perform the desired action
• Technical failures or errors in the system
• User attempting to access restricted areas without proper authorization
• Exceeding the maximum number of allowed login attempts
• Power failure or system shutdown
• User attempting to perform actions that are outside the scope of the system.
Assumptions: • The system assumes that users have access to the internet to use the web
application
• The system assumes that users have a device capable of accessing the web
application (e.g. smartphone, computer, tablet)
• The system assumes that the user has a valid account to access the secure door
lock functionality
• The system assumes that users have the necessary privileges to perform
specific use cases (e.g. administrator privileges for managing users)
• The system assumes that the secure door lock hardware is installed and
functioning properly
• The system assumes that users understand how to use the web application and
secure door lock system.
25
• Event- response table:
An event-response table for the automated secure door lock based on a web application would
outline the various events that can occur in the system and the corresponding responses from the
system.
Functional Requirements are a set of requirements that describe the functionality that the
automated secure door lock system must provide. It defines what the system should do and how
it should perform its tasks.
User-friendly Interface: The system must provide a user-friendly interface for both the
administrator and the end-users to interact with the system. The interface should be intuitive and
easy to use.
Door Lock Management: The system must provide a door lock management module to manage
the door locks connected to the system. The module should allow the administrator to add, edit,
and delete door locks.
User Authentication: The system should support multiple users and provide secure
authentication methods, such as passwords, biometric authentication, or smart cards.
Remote Access: The system should allow users to remotely unlock or lock the door using a web
interface or mobile app.
Event Logging: The system should log all access events, including the date, time, and identity of
the user who unlocked or locked the door.
Multiple Door Support: The system should support multiple doors and allow users to manage
access to each door separately.
26
Power Management: The system should be designed to be power efficient and have backup
power options, such as a battery backup, to ensure that the lock remains operational even in case
of power outages.
Data Security: The system should secure all sensitive information, such as user credentials, and
use encryption for communication to prevent unauthorized access.
Alerts and Notifications: The system must provide a mechanism to generate alerts and
notifications based on specific events. For example, the system should send an alert if an
unauthorized access attempt is made.
Identifier FR-1
Title User Authentication
Requirement App provides user authentication via username and password method
Only the authorized user can access door lock system
Source End User
Rationale Authentication is a required process for door lock system to avoid any
unauthorized access
Business Rule User name password must be entered
(if required)
Dependencies 1
Priority High
Identifier FR-2
Title Remote Access
Requirement The App Provides remote access for user to access it from anyhere in the
world
Source End User
Rationale Authentication is a required process for door lock system to avoid any
unauthorized access
Business Rule User name password must be entered
(if required)
Dependencies 1
Priority High
27
Table 4 Description of FR-3
Identifier FR-3
Title Event Logging
Requirement app loges event every time user log’s in or log’s out and when user locks
and un locks the system
Source End User
Rationale App must be connected to internet
Business Rule
(if required)
Dependencies 3
Priority Medium
Non-functional requirements, also known as quality attributes, are system characteristics that are
not related to the specific functions performed by the system but are concerned with the overall
attributes of the system. For the automated secure door lock, some of the non-functional
requirements could include:
3.4.1 Reliability: The system should be highly reliable, with minimal errors and a high level
of data accuracy. Reliability requirements may include:
o Hardware Selection: The Orange Pi and other hardware components should be selected
based on their reliability and the manufacturer's track record for producing quality
products.
o System Redundancy: The system should be designed with redundant components, such as
multiple power supplies, to ensure that it continues to function even in the event of a
component failure.
o Automatic Failover: The system should be designed with automatic failover mechanisms
in place, to ensure that it continues to function even in the event of a software or hardware
failure.
28
o Monitoring and Diagnostics: The system should be designed with built-in
monitoring anddiagnostic tools, which can be used to detect and resolve issues quickly and
efficiently.
o Data Backup: The system should have a data backup mechanism in place, to
ensure thatimportant information, such as user credentials, is not lost in case of a failure.
o Testing: The system should undergo extensive testing, including stress testing and
securitytesting, to identify and resolve any potential issues before deployment.
3.4.2 Usability: The system should be easy to use, with a user-friendly interface and intuitive
navigation. Usability requirements may include:
o User-friendly interface: The system should have a simple, intuitive and easy-to-use
interfacefor users.
o Consistent user interface: The system should have a consistent user interface that
provides aunified and predictable experience for users.
o Accessibility: The system should be accessible to users with disabilities and comply with
relevant accessibility standards.
o Error prevention and recovery: The system should have mechanisms to prevent errors
andprovide clear and appropriate recovery options in case of errors.
o User training: The system should provide appropriate training materials and resources to
support user learning and training.
3.4.3 Performance: The system should be fast, responsive, and able to handle a large
number of concurrent users. Performance requirements may include:
o Response time: The time it takes for the system to respond to a user's request and
display theresults.
o Latency: The amount of time it takes for the system to process a user's request and
provide theresults.
o Throughput: The number of transactions that can be processed by the system per unit of time.
29
o Scalability: The ability of the system to accommodate increasing workloads without a
significant degradation in performance.
o Availability: The amount of time the system is available for use by its users.
o Concurrent user support: The maximum number of users who can use the system at the
same time.
o Load capacity: The maximum amount of load that the system can handle before
performance begins to degrade
3.4.4 Security: The system secure itself using username and password authentication which
is encrypted.
o Confidentiality: The system must protect sensitive information from unauthorized access,
such as user credentials, access codes, and lock configuration data.
o Authentication: The system must authenticate users to prevent unauthorized access to the
door lock and its features.
o Authorization: The system must enforce access controls, allowing only authorized users to
perform specific actions, such as unlocking the door, creating new codes, and modifying
lock settings.
o Data integrity: The system must ensure that data transmitted between the web application
and the door lock is not altered during transit.
o Encryption: The system must use encryption to secure data transmitted between the web
application and the door lock, as well as for storing sensitive data on the device.
o Access logging: The system must log all attempts to access the door lock, including the date,
time, user identity, and outcome of the attempt.
o Physical security: The system must prevent physical access to the door lock mechanism and
ensure that the lock cannot be tampered with.
30
3.5.1 User Interfaces Requirements
User interface (UI) requirements for an online door lock system using Orange Pi may include:
Easy Navigation: The UI should be intuitive and easy to navigate, with clear labeling and well-
organized menus.
Responsive Design: The UI should be responsive, with a responsive design that adjusts to
different screen sizes and devices.
User Customization: The UI should allow users to customize the appearance and functionality
of the system, such as setting preferences for notification types and scheduling options.
Supported device types: The Orange Pi supports a wide range of devices including keyboards,
mice, displays, storage devices, and others. The software components need to be designed to
work with the specific types of devices supported by the Orange Pi.
31
Chapter 4
32
4 Design and Architecture
Introduction
System analysis and architecture entails learning a defining in depth what system can
achieve as well as how the subsystem elements should be implemented and interact.
System Design:
System design is the process of defining the elements of a system such as the architecture,
modules and components, the different interfaces of those components and the data that goes
through that system. It is meant to satisfy specific needs and requirements of a business or
organization through the engineering of a coherent and well running system.
System Architecture:
System architecture is conceptual modal the describes a system’s configuration and actions. It
describes who system works and what is the environment of the system in a way it is the
representation of a system’s structure.
33
4.1 Architecture Diagram
Api
Secure Site
UI
Context Diagram:
The context diagram of the above project using Orange Pi would provide an overview of the
system, showing the relationships between the Orange Pi, the automated secure door lock, and
other external entities such as the web application and any other hardware components that may
be involved. The context diagram would also indicate the flow of data between these entities and
the inputs and outputs that the system would receive and generate. The purpose of the context
diagram is to give an overall understanding of the system and its interactions with its
environment.
34
Context Diagram
In the data design of the automated secure door lock based on the web application project using
the Orange Pi, the following databases or data storage items are used:
User database: This database stores information about the users who have access to the secure
door lock system, including their user names, passwords, access levels, and other relevant
details.
Access logs database: This database stores a log of all door lock access events, including the
date and time of the event, the user who accessed the lock, and the status of the lock (locked or
unlocked).
Door lock status database: This database stores the current status of each door lock, including
whether it is locked or unlocked, and the date and time of the last change in status.
Door lock configuration database: This database stores the configuration settings for each door
lock, including the access codes or keys required to unlock the lock, and other relevant details.
35
4.3.1 Data dictionary:
A data dictionary is a centralized repository that stores information about data elements used in a
system, including the definition, characteristics, and relationships with other data elements. In
the project using the Orange Pi, the data dictionary can provide information about the data
elements that are used to support the secure door lock system. Some of the data elements that
could be documented in the data dictionary include:
• User information: Name, username, password, and any other relevant user information.
• Door lock information: Serial number, location, and lock status (locked/unlocked).
• Access logs: Date, time, user, and action (lock/unlock).
• Error logs: Date, time, and error description.
Login/Registration Screen: A secure and user-friendly login and registration process that
enables users to access their account and manage their door lock settings.
Door lock Management Screen: A screen that provides users with an overview of the door
lock's current status and allows them to control the lock remotely, such as locking and unlocking
the door.
User Management Screen: A screen that allows administrators to manage user accounts, such
as adding, editing, or removing users.
Notifications: A mechanism that informs users of any relevant events, such as a door being
locked or unlocked, and provides alerts in case of any security breaches.
36
4.4.1 LOGIN SCREEN
37
4.4.3 Screen Objects and Actions:
The screen objects and actions in the above project using Orange Pi refer to the graphical user
interface (GUI) elements and user interactions with them.
Some common screen objects for a secure door lock system might include:
Login screen: A user must enter their credentials (username and password) to access the system.
Door lock management screen: Allows users to view the status of the locks and perform
actions such as locking/unlocking doors.
User management screen: Allows administrators to add/remove users, assign roles, and manage
user privileges.
Login: User inputs their credentials and clicks the login button. The system checks the
credentials and grants access if they are valid.
Lock/unlock door: User clicks the lock or unlock button next to a door to perform the
corresponding action.
Add/remove user: Administrator inputs user details such as name and password and clicks the
add/remove button.
38
Chapter 5
Implementation
39
5 Implementation
Implementation Phase:
While implementing Secure Door Lock System we used an Orange Pi Module 12 Volt power
supply for the magnetic lock and a power adapter for orange pi of 3.1 Volt. The magnetic lock is
connected to orange pi interface using a 5V DC relay which is connected through a 1K OHM
and 222c Transistor
The orange pi System is connected with internet which provides a public site that user can sign
in with their credentials the server is will be hosted inside the orange pi module and then made
available to the public domains. We will use Apache to implement server in orange pi
microcomputer.
Magnetic Door Lock: We use 5V Magnetic Door lock which is connected to Orange Pi
Interface
5V DC Relay: 5V DC Relay Connects the door lock and orange pi module to switch it on and
off
1K OHM and 222C Transistor: 1K OHM and a 222C Transistor is used to interlink relay
signal wire to orange pi for stability of signal Volts
Storage:
64GB SD Storage is used to hold the Ubuntu Operating System and server as well as the server
code, Bash Script And C++ scripts which is used to handle user request and issue relevant
command from orange pi interface to magnetic lock
5.1 Algorithm
Mention the algorithm(s) used in your project to get the work done with regards to major
modules. Provide a pseudocode explanation regarding the functioning of the core features. Be
sure to use the correct syntax and semantics for algorithm representations. Following are few
examples of algorithms/pseudocode:
40
Table 5 Example of Algorithm
Algorithm 1 Authenticate User
Input: User name and password
Output: Login Status
<?php
$con = getConnection();
$name = $_POST[‘username’];
$password = $_POST[‘password’];
if($con != null){
if($result->fetchColumn() == 1){
session_start();
$_SESSION[‘username’]=$name;
header(“Location: switch_page.php”);
}
else {
echo “Invalid User Or Password”;
}
}
function getConnection(){
}
?>
#!/bin/bash
if [ “$1” = “stop” ]; then
echo “stop”
echo “41hippuden” | /usr/bin/sudo -S python stop.py
elif [ “$1” = “start” ]; then
python start.py
echo “start from mys script”
fi
41
5.2 User Interface:
In Fig 1.0 login in screen shown from where user can login into secure system using their
credentials
Fig 1.0
42
5.2.2 Door Lock Action Screen:
In Fig 1.1 Interface is shown that provide user a way to access their system and lock /unlock
door
The door status will be shown in status label if its is open then it will show Open in Green color
And if it is locked then it will show in red label Locked.
Fig 1.1
43
5.3 Deployment:
The deployment environment for an online door lock system using Orange Pi will depend on various
factors, including the scope and complexity of the system, the target audience, and the resources
available. Some possible deployment environments include:
On-Premises Deployment: The system could be deployed on-premises, where the hardware and
software components are installed and maintained within the organization’s own facilities.
Cloud Deployment: The system could be deployed in the cloud, using a cloud service provider such as
Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP). This can provide
scalable resources, off-site data storage, and improved reliability.
Hybrid Deployment: The system could be deployed in a hybrid environment, where some components
are deployed on-premises and others are deployed in the cloud.
Edge Deployment: The system could be deployed at the edge, where the Orange Pi is installed directly at
the door and communicates with the cloud or on-premises server over a low-latency, high-bandwidth
connection.
Embedded Deployment: The system could be embedded within other systems, such as building
management systems, security systems, or access control systems, to provide a more integrated and
streamlined solution.
44
Chapter 6
45
6 Testing and Evaluation
Testing of the system's software is compulsory and much needed to clear out all errors. It helps
us to clear out all existing errors from systems software by checking them and by making
necessary changes to clear out all factors It assists us in preventing device program failure.
Sometimes it may take much time to clear out all the errors, but after a successful testing it will
make our system to run smooth and accurate.
Basically, in modules testing we divide the system's software into its subparts to check whether
all the modules working properly or not and to detect which part is disturbing the system's
software environment. It is also called unit testing or component testing. So, by this we easily
detect the errors from our sub modules by checking them separately. It saves time rather to check
whole system's software we only just check the sub module that is not working due to some
systematically errors and failure.
After the integration testing of the system, we perform approval testing. In approval testing, we
mainly check that the system is working correctly in the user interface or
Every Piece of hardware is test through stress test to ensure that everything will work properly
after integration we fuses will be used to protect the devices from over electricity flow.
46
Chapter 7
47
7 Conclusion and Future Work
This chapter concludes the project and highlights future work.
7.1 Conclusion
In conclusion, an online door lock system using Orange Pi has the potential to provide a flexible,
reliable, and secure solution for controlling access to buildings and facilities. The Orange Pi is a
low-cost, low-power single-board computer that provides the processing power and connectivity
needed to implement an online door lock system.
By taking into account factors such as reliability, user interface, and deployment environment,
the system can be designed to meet the specific needs of the target audience. Additionally, by
leveraging cloud or edge computing, the system can be scalable and provide improved reliability,
as well as allowing remote access control and monitoring.
Overall, an online door lock system using Orange Pi can provide a cost-effective, secure, and
flexible solution for managing access control. As technology continues to evolve and the Internet
of Things becomes increasingly prevalent, it is likely that similar solutions will become more
common and more widely used in the future.
Future work for an online door lock system using Orange Pi could involve several areas of
improvement and enhancement, such as:
Integration with Other Systems: The system could be integrated with other systems, such as
building management systems, security systems, or access control systems, to provide a more
integrated and streamlined solution.
Real-time Monitoring: The system could be enhanced to provide real-time monitoring and
alerting, allowing administrators to receive notifications in case of security incidents or other
events.
48
Predictive Maintenance: The system could be enhanced to provide predictive maintenance,
allowing administrators to proactively address potential issues before they become major
problems.
User Analytics: The system could be enhanced to provide user analytics, allowing
administrators to gain insights into usage patterns, trends, and behaviors.
Artificial Intelligence: The system could be enhanced to incorporate artificial intelligence and
machine learning algorithms, providing improved decision-making and enhanced security.
Mobile Access: The system could be enhanced to provide mobile access, allowing users to
control the lock from their mobile devices.
These are some of the areas where future work could be focused for an online door lock system
using Orange Pi. The exact future work will depend on the specific needs and goals of the
project.
49
Chapter 8
References
50
References
Chinwe Juliana, N. (2021). Construction of password based security door-lock system using
Arduino. Advancements in Materials, 5(2), 1. https://doi.org/10.31058/j.am.2021.52001
Dharme, S. (2022). Door lock security system using recent technology. International Journal for
Research in Applied Science and Engineering Technology, 10(1), 684–686.
https://doi.org/10.22214/ijraset.2022.39812
Jae-seung Cho. (2015). A study on Automatic Gate Management System Digital door lock -
with a focus on
QR code digital door lock development cases using MOTP -. Journal of Digital Design,
15(1), 235–243. https://doi.org/10.17280/jdd.2015.15.1.023
Kolluru, V. (2021). Password based Door Lock System. SSRN Electronic Journal.
https://doi.org/10.2139/ssrn.3918717
51