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

4 - Final Project Report

Uploaded by

Deshmukh Ashwini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

4 - Final Project Report

Uploaded by

Deshmukh Ashwini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

“Face Detection Door Lock System”

Project Report Submitted to

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


For the Degree of

BACHELOR OF ENGINEERING
In

Electronics and Telecommunication Engineering


By

Jadhav Mayuri Uttam

Hande Amruta Chintaman

Guided By
Prof. N. S. Kothari

Academic Year: 2020 – 2021

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING

SAMARTH GROUP OF INSTITUTES COLLEGE OF


ENGINEERING, BELHE-412410
SAMARTH GROUP OF INSTITUTIONS COLLEGE OF
ENGINEERING, BELHE – 412410

CERTIFICATE
This is to certify that the project report entitled

“Face Detection Door Lock System”

is satisfactorily completed by,

Jadhav Mayuri Uttam

Hande Amruta Chintaman

In partial fulfillment of requirement for the degree of Bachelor of Engineering


(Electronics & Telecommunication Engineering) of Savitribai Phule Pune University, Pune.

Prof. N. S. Kothari Prof. A. S. Polgavande Prof. N. S. Kothari


Project Guide Project Co-Ordinator H.O.D

Dr. A. J. Patil
Principal
SGOI COE. Belhe
SAVITRIBAI PHULE PUNE UNIVERSITY

CERTIFICATE
This is to certify that,

Jadhav Mayuri Uttam:

Hande Amruta Chintaman:

Students of BE- E&TC Engineering is examined in the project entitled

“Face Detection Door Lock System”


At

Samarth Group of Institutions College of Engineering, Belhe

On

/ / 2021

Internal Examiner External Examiner


Face Detection Door Lock system.

ACKNOWLEDGEMENT

A project is something that could not have been materialized without co-operation of
many people involved in making this project a reality. It takes many dedicated people to and
it is our great pleasure to acknowledge the contribution of those involve in the project directly
or indirectly.
We express our sincere thanks to Prof. N. S. Kothari whose supervision and inspiration as
well as valuable discussion and constructive criticism provide during the final project. We
shall ever be grateful to his for the encouragement and suggestions given by him from time to
time. He helped us to solve our difficulties. We are also thankful to Prof. N. S. Kothari,
H.O.D. for his constant guidance.

We would like to thank Dr. A. J. Patil , Principal of this institute for providing
necessary lab facilities during the period of project working. And finally our heartfelt gratitude
to all our friends who helped us in completion of this project.

Jadhav Mayuri Uttam


Hande Amruta Chintaman

SGOI College of Engineering, Belhe Page 1


Face Detection Door Lock system.

CONTENTS

Sr. No. CONTENTS Page No.

I List of Figures 4
II List of Abbreviations 5
III Abstract 6
1. Introductions 7
1.1 Introductions 7
1.2 Need of Technology 8
1.3 Recent Technology 8
1.4 Organization of Report 8
2. Literature Survey 9-10
3. Problem Definition & Objective 11
3.1 Problem Definition 11
3.2 Objectives 11
4. System Overview 12
4.1 Block Diagram Description 12-13
4.2 Circuit Diagram Explanations 14
4.3 Hardware Specification 15
4.3.1 PIC Microcontroller ATMEGA8 15-18
4.3.2 Relay 18-20
4.3.3 Lock Style Solenoid -I2VDC 20-21
4.3.4 Light Emitting Diode 21-22
4.3.5 Servo Motor 22-23
4.3.6 ESP 32 Cam 24-25
4.3.7 Power Supply 25-28
4.4 Software Specification 28
4.4.1 MATLAB 28-29
4.4.2 Keli Software 29-31
4.4.3 Eagle 31-32
4.5 Design Flow 32-34
4.6 Advantages 35
4.7 Applications 35

SGOI Collage of Engineering, Belhe Page 2


Face Detection Door Lock system.

Sr. No. CONTENTS Page No.

5. Results 36-37
6. Conclusion 38
7. Future Implementation 39
8. References 40-41

SGOI College of Engineering, Belhe Page 3


Face Detection Door Lock system.

LIST OF FIGURES

Figure No. Figure Name Page no.

Fig 4.1 Block Diagram of Door Lock system 12

Fig. 4.2 Circuit Diagram Of Door Lock System 14

Fig. 4.3 ATMEGA 8 17

Fig. 4.4 Relay 19

Fig. 4.5 Relay Working 19

Fig. 4.6 Solenoid 12V 20

Fig. 4.7 LED 21

Fig. 4.8 Servo Motor 23

Fig. 4.9 ESP 32 CAM 24

Fig. 4.10 Block Diagram of Power Supply 25

Fig. 4.11 Circuit Diagram of Power Supply 26

Fig. 4.12 Bridge rectifier 26

Fig. 4.13 Smoothing 27

Fig. 4.14 Voltage Regulator 27

Fig. 4.15 Keli Software 29

Fig. 4.16 Eagle Software 32

Fig. 4.17 Design Flow of door lock system 33-34

SGOI College of Engineering, Belhe Page 4


Face Detection Door Lock system.

LIST OF ABBREVIATIONS

ESP32- Electronic Stability Control


IOT- Internet of Things

PIR- Passive Infrared


LED- Light Emitting Diode
SSL- Secure Socket Layer
PCB- Printed Circuit Board
MQTT- Message Queuing Telemetry
Transport
HTTP- Hyper Terminal Text Protocol

IP- Internet Protocol

PWM- Pulse Width Modulation


CAD- Computer Aided Design
HEX- Hexadecimal
WIFI- Wireless Fidelity
MCU- Microcontroller Unit
IC- Integrated Circuitry
DC- Direct Current
AC- Alternating Current
RTOS- Real Time Operating System
QR- Quick Response
RAM- Random Access Memory
PCA- Principle Component Analysis
RFID- Radio Frequency Identification

SGOI College of Engineering, Belhe Page 5


Face Detection Door Lock system.

ABSTRACT

Door plays an important role in home security. To secure the house, the occupants of the
house will always have the door locked. However, sometimes the house occupants forget to
lock the door due to hurry when leaving the house, or they may doubt whether they have
locked the door or not. We propose an application called Door Security System which is based
on Android using Internet of Things (IOT) technology to monitor the status of the door,
controlling the door and increasing security in a house. MQTT cloud is utilized as the
communication protocol between smartphone and door lock system. PIR sensor is
implemented in the door lock to detect the movement near the door, while touch sensor is
installed on the door handle to recognize the human hand. Should the door is opened by
force, the alarm will ring and send notification to alert the house occupant on the existence
of intruder in the house. The evaluation results show that motion detection sensor can detect
movement accurately up to 1, 6 meters ahead, and messages published between smartphone
and door lock are encrypted properly so messages are safely sent.

Keywords: Home Security; Internet of Things; Lock Door ,IOT; Encrypted; MQTT; Cloud

SGOI College of Engineering, Belhe Page 6


Face Detection Door Lock system.

Chapter 1

INTRODUCTION

1.1 Introduction
The project confirms about the Security is at most concern for anyone now-a-days,
whether it's data security or security of their own home. With the advancement of
technology and the increasing use of IOT, digital door locks have become very
common these days.
Facial recognition is the process of identifying or verifying the identity of a person
using their face. It captures, analyzes, and compares patterns based on the person's
facial details. The face detection process is an essential step as it detects and locates
human faces in images and videos.
The face capture process transforms analog information (a face) into a set of digital
information (data) based on the person's facial features. The face match process
verifies if two faces belong to the same person.
A door is one of the first defines features to maintain physical security of the
house. If the door of the house can be opened easily, a thief can easily enter and steal
the contents of the house. At first, a door only incorporates a physical key to lock or
unlock the door but then, with the advancement of technology, a more modern door
has been innovated, namely the digital door that can lock or unlock doors without
requiring a physical key. However, the digital door can also be broken or damaged
when the house is empty, and the occupants of the house will only find out when
arriving at home. To always maintain the security of the house, the house occupants
will always have the door locked either when going out from home, or when resting in
the house. However, sometimes the house occupants forget to lock the door due to
hurry when leaving the house, or they may doubt whether they have locked the door
or not. This is one factor that can be a threat to home security. Internet of Things
(IoT) is a structure in which objects and people are provided with exclusive identity
and the ability to relocate data over a network without requiring two-way handshaking
between human-to-human i.e. source to destination or human-to-computer interaction
IoT utilizes the ability of sensors such as passive infrared sensors (PIR) to detect a

SGOI College of Engineering, Belhe Page 7


Face Detection Door Lock system.

Movement , a magnetic sensor that can be used to detect whether a door is open or closed,

and an internal touch sensor to detect whether the sensor is being touched or not. IoT
also utilizes the capabilities of tools such as micro controllers that can control other
devices, MOSFET, is a transistor which can be in the form of an automatic switch, an
electric strike digital door lock that can lock or unlock without requiring a physical key, an
alarm that can ring or stop ringing according to the input received, LED lights that can turn
on or off.

1.2 Need of Technology


In IoT has been applied in previous researches in smart home technology to remotely
control and monitor various appliances, namely fire, gas, water, air conditioner and
fan . Some research also focus on efficiency to lower energy consumption . Some of
research like the following, have been done about home security system.

1.3 Recent Technology


The project uses ESP 32 as the heart of the system. ESP32-CAM is a low-
cost ESP32-based development board with onboard camera, small in size. It is an
ideal solution for IoT application, prototypes constructions.
.
1.4 Organization of Report
Chapter 1 :-This chapter is based on Introduction of project, aim and idea of project.
Here we also discuss need of technology.
Chapter 2 :-This chapter is based on literature and technological survey. In this
chapter we also searched and studied different topics and references regarding project.
Chapter 3 :-This chapter describes the limitations of the existing systems, problem
definition and objectives.
Chapter 4 :-This chapter is based on system technology. It included with block
diagram description. Advantages and applications are also included in this chapter.
Chapter 5 :-This chapter deals with the conclusion of the project.

SGOI College of Engineering, Belhe Page 8


Face Detection Door Lock system.

Chapter 2
LITERATURE SURVEY

Currently, the number of thefts and identity fraud have frequently been reported
and has become significant issues.

Traditional ways for personal identification requires external element, such as


key, security password, RFID card, and ID card to have access into a private asset or
entering public space Many processes such as drawing out money from banks requires
password. Other such parking in private space would also need parking ticket. For
some houses, the house key is very important.

However, all this method also has several disadvantages such as losing key and
forgetting password When this happens, it can be hassle to recover back. This method
is slowly taken over by biometric methods as it is the possible way to solve those
problems. This technique required to use the special hardware such as fingerprint
scanner, palm print scanner, DNA analyzer to gather information for the vast majority
of the biometric applications and the target objects have to touch with the hardware to
acquire information As biometric is a technique that distinguishing physical highlights
of people accordingly it has an extensive variety of utilization in security frameworks
and it is viewed as one of the most secure methods Basically, biometrics can be
classified in two categories which are physical and behavioral.

Recently, the face recognition technology has engaged an overwhelming number


of researchers and it is gradually supplanting other biometric security frameworks
Face recognition is also known as image matching. It is a rapidly growing field where
it is heading in a direction such that it will replace the traditional method.

Face recognition is more stable among other biometric identification method as


it is using the human face that results in high accuracy, lowest false recognition rate
and it does not change in people’s life. Thus, this method is much practical for a lot of
usage, including face recognition for the unlocking house door.

Method used for face recognition: In this new era, face recognition plays an
important role in security and observation. Consequently, here is a requirement for a
proficient and cost-effective system. Face recognition is a technique that is able to
SGOI College of Engineering, Belhe Page 9
Face Detection Door Lock system.

identify and verify peoples According to face recognition, define as steps to identify,
distinguish and processed face is compared with the images that stored in the database
to verify who the person is. This face recognition has become a significant technique
for user identification

There are many techniques that can be used for face recognition but the
Principle Component Analysis (PCA) is one of the most popular techniques used for
face recognition. This method involves a mathematical procedure to transform a
number of possibly correlated variables into a number of uncorrelated variables
known as principle component analysis.

SGOI College of Engineering, Belhe Page 10


Face Detection Door Lock system.

Chapter 3

PROBLEM DEFINITION AND OBJECTIVES

3.1 Problem Definition


Any significant change in the surrounding can provide the alert to the user. As it
provide edge verification of the facial reorganization it will recognize with much time.
The Facial detection and performing action was a very significantly performed
work by only giving some pulses to the servo motors

3.2 Objectives
 To secure the home through wireless connectivity.
 To make system contact-less.
 Generate alert message when unwanted personal event detected.
 To safeguard the property from the unauthorized intruder.
 Make home security systems more efficient, collaborative & smarter than
ever before.

SGOI College of Engineering, Belhe Page 11


Face Detection Door Lock system.

Chapter 4
SYSTEM OVERVIEW

4.1 Block Diagram Description


The project confirms about the Security purpose use of the system of
home/domestic use. The camera will confirm whether any movement is detected is
not it basically uses if/whether statement to perform the action. As if any detection
occurred then camera finds whether the live data is verified or not.
This process is done because of the controller ESP32 it is the heart (main
device) of the system. Movement detection occurred then Indication gets ON, is it
verified or not.
Then some signal is been passed out from controller Wi-Fi and it connects to the
internet this signal is been grabbed by the Mobile unit and the user performs
according action. If the controller or mobile unit confirms the detection is true then
ESP32allows the PWM signals to the Servo motors i.e. the user has allowed the
detected once to come further.
The process undergoes identification and authentication. By identification the
camera has to recognize the person after identification the authentication requires
much shallowness to the system by the user to grant access.

Fig.4.1: Block Diagram of Door lock system

SGOI College of Engineering, Belhe Page 12


Face Detection Door Lock system.

The above-mentioned figure is the block diagram of the facial recognition system.
We have the main part of the system as the ESP32 CAM through which the crucial
task is been handled and sophisticatedly order in the sense of work importance and
security for which it is been designed. The system enhances a very less complicated
design of hardware.

The first step towards functioning is to grab a mobile phone through which a
system teaching of the main suspect generated. I.e. we will teach the owner face id to
the system by going to its provided IP Address. After teaching of the system the face
provided at the time of camera capture will be fended to the controller.

Now the main task of the system evacuated when triggered to it. If the actual face
(person) comes the system programming starts working on its flow. If the particular
face is identified then it will provide command to the system controller. Now the
system checks whether the identified face is applicable or not. For example, system
gives access grant to the identified face then system has verified the face and
accordingly indications will be ON, and this positive signal of the controller will be
provided i.e. command is given to the servo drive.

Here, servo drive has the working where which a particular angle is decided
through which the servo motor gives output accordingly for the mechanical
adjustments of the door. The servo drive has now taken the command from the main
controller of the system (ESP32) now according to the plan of the program execution
of the servo drive, will proceed this command to the servo motor as a output
command. With the help of the mechanical arrangement of the servo motor on the
door we get the door open.

And if the system denied after the identification of the face then it will not
provide any of the commands to the servo drive for servo motor execution and the
required indication will be given through which the person will note the response of
the system and take decision as per the programming. The overall decision is to be
taken by the controller whether the identified face has to grant permission or not as
per the teaching provided

SGOI College of Engineering, Belhe Page 13


Face Detection Door Lock system.

4.2 Circuit diagram explanation:

Fig.4.2: Circuit Diagram of Door lock system

Circuit diagram explanation:

The above figure specifies the circuit diagram of the facial recognition system, the
power supply here is for the quit DC supply of the power to the system through which
the constant energy will be given, from the 230V AC supply to the 5V DC will be
provided by the power supply unit.

The ESP 32 CAM unit will be powered by the power supply unit. The main
function of the node is to establish the AWS working to the database as provided by
the programming structure. The fetching of data is to be done by ESP.

The situation of the database fetching will need a Wi-Fi module to


communication establishment which is inbuilt in it as well no any extra need to
provide power supply to it. The built in Wi-Fi module provide a sophisticated design
to be get interrupted by the call of the circuitry.

Servo driver IC gets an actuated structure through which a servo motor has to
get command as it will be a slave for the controller as well as the master for the servo

SGOI College of Engineering, Belhe Page 14


Face Detection Door Lock system.

motor. The controller gives command to the servo drive for the working of the motor
through which it will be rotated as per the angle provided.

4.3 Hardware Specification


In any system designing, the hardware designing is a very important task. The
hardware requirements for our proposed system are as follows:
 Pic Microcontroller-16F877A
 Relay
 Electronic Door Lock12V
 LED 5mm
 Servo Motor
 Esp32 Cam board
 Power supply
 Transformer

4.3.1 PIC-Microcontroller- ATMEGA 8


The ATmega8 is a low-power CMOS 8-bit microcontroller based on the AVR
RISC architecture. By executing powerful instructions in a single clock cycle, the
ATmega8achieves throughputs approaching 1 MIPS per MHz, allowing the system
designer to optimize power consumption versus processing speed

Pin Descriptions
 VCC Digital supply voltage.
 GND Ground
 .Port B (PB7..PB0)
XTAL1/XTAL2/TOSC1/TOSC2 Port B is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each bit). The Port B output buffers
have symmetrical drive characteristics with both high sink and source capability.
As inputs, Port B pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port B pins are tri-stated when a reset
condition becomes active, even if the clock is not running. Depending on the
clock selection fuse settings, PB6 can be used as input to the inverting Oscillator

SGOI College of Engineering, Belhe Page 15


Face Detection Door Lock system.

amplifier and input to the internal clock operating circuit. Depending on the clock
selection fuse settings, PB7 can be used as output from the inverting Oscillator
amplifier. If the Internal Calibrated RC Oscillator is used as chip clock
 Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The Port C output buffers have symmetrical
drive characteristics with both high sink and source capability. As inputs, Port
C pins that are externally pulled low will source current if the pull-up resistors
are activated.
 PC6/RESET the RSTDISBL Fuse is programmed, PC6 is used as an I/O
pin. Note that the electrical characteristics of PC6 differ from those of the
other pins of Port C .If the RSTDISBL Fuse is un programmed, PC6 is used as
a Reset input. A low level on this pin for longer than the minimum pulse
length will generate a Reset, even if the clock is not running. The minimum
pulse length is given in Table 15 on page 38. Shorter pulses are not guaranteed
to generate a Reset. The various special features of Port C are elaborated on
page
 Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The Port D output buffers have
symmetrical drive characteristics with both high sink and source capability. As
inputs, Port D pins that are externally pulled low will source current if the pull-
up resistors are activated. The Port D pins are tri-stated when a reset condition
becomes active, even if the clock is not running. Port D also serves the
functions of various special features of the ATmega8 as listed on
 RESET Reset input. A low level on this pin for longer than the minimum
pulse length will generate a reset, even if the clock is not running. The
minimum pulse length is given in Table15 on page 38. Shorter pulses are not
guaranteed to generate a reset.

SGOI College of Engineering, Belhe Page 16


Face Detection Door Lock system.

Fig.4.3: ATMEGA 8

As shown in the above figure microcontroller is wired with a crystal for clock
and each pin of crystal is connected to ground through capacitors to avoid noise pulse
in the clock. Here a 4MHz crystal is used that gives 4MHz clock.

 Features

High-performance, Low-power AVR® 8-bit Microcontroller


• Advanced RISC Architecture– 130 Powerful Instructions – Most Single-
clock Cycle Execution– 32 x 8 General Purpose Working Registers– Fully
Static Operation– Up to 16 MIPS Throughput at 16 MHz– On-chip 2-cycle
Multiplier
• Nonvolatile Program and Data Memories– 8K Bytes of In-System Self-
Programmable Flash Endurance: 10,000 Write/Erase Cycles– Optional Boot
Code Section with Independent Lock Bits In-System Programming by On-
chip

SGOI College of Engineering, Belhe Page 17


Face Detection Door Lock system.

Boot Program True Read-While-Write Operation– 512 Bytes EEPROM


Endurance: 100,000 Write/Erase Cycles– 1K Byte Internal SRAM–
Programming Lock for Software Security
• Peripheral Features– Two 8-bit Timer/Counters with Separate Pre-scaler, one
Compare Mode– One 16-bit Timer/Counter with Separate Pre-scaler, Compare
Mode, and Capture Mode– Real Time Counter with Separate Oscillator–
Three PWM Channels– 8-channel ADC in TQFP and QFN/MLF package
Eight Channels 10-bit Accuracy– 6-channel ADC in PDIP package Eight
Channels 10-bit Accuracy– Byte-oriented Two-wire Serial Interface–
Programmable Serial USART– Master/Slave SPI Serial Interface–
Programmable Watchdog Timer with Separate On-chip Oscillator– On-chip
Analog Comparator
• Special Microcontroller Features– Power-on Reset and Programmable
Brown-out Detection– Internal Calibrated RC Oscillator– External and
Internal Interrupt Sources– Five Sleep Modes: Idle, ADC Noise Reduction,
Power-save, Power-down, and Standby
• I/O and Packages– 23 Programmable I/O Lines– 28-lead PDIP, 32-lead
TQFP, and 32-pad QFN/MLF
• Operating Voltages– 2.7 - 5.5V (ATmega8L) – 4.5 - 5.5V (ATmega8)
• Speed Grades– 0 - 8 MHz (ATmega8L)– 0 - 16 MHz (ATmega8)•Power
Consumption at 4 MHz, 3V, 25°C– Active: 3.6 mA– Idle Mode: 1.0 mA–
Power-down Mode: 0.5 μA
4.3.2 Relay
It is an electromechanical switch used for switching purpose . Relays are used
power circuit, especially when galvanic isolation is desirable. The first application of
relays was in long telegraph lines, where the weak signal received at an intermediate
station could control a contact, regenerating the signal for further transmission. High-
voltage or high-current devices wherever it is necessary to control a high power or
high voltage circuit with a low can be controlled with small, low voltage wiring and
pilots switches.
Operators can be isolated from the high voltage circuit. Low power devices
such as microprocessors can drive relays to control electrical loads beyond their direct

SGOI College of Engineering, Belhe Page 18


Face Detection Door Lock system.

drive capability. In an automobile, a starter relay allows the high current of the
cranking motor to be controlled with small wiring and contacts in the ignition key.

Fig.4.4: Relay

The relay shown in figure 4.5 protects each circuit from each other. It is a
simple mechanical switch which activates when the input reaches 5V and turn OFF.
When the input is 0V. A relay is an electrically operated switch that allows to turn ON
and OFF a circuit using voltage and current.

Fig.4.5: Relay Working

SGOI College of Engineering, Belhe Page 19


Face Detection Door Lock system.

 Features
 Standard models switch up to 3A.
 High-capacity models switch up to 5A (AC loads only)
 Low power consumption.
 Semi-sealed and sealed types available.
 HA version for home appliances.
 Coil voltage: 5, 12, 18, 24V DC.

4.3.3 Lock-style Solenoid - 12VDC

Solenoids are basically electromagnets: they are made of a big coil of copper
wire with an armature (a slug of metal) in the middle. When the coil is energized, the
slug is pulled into the center of the coil. This makes the solenoid able to pull from one
end. This solenoid in particular is nice and strong, and has a slug with a slanted cut
and a good mounting bracket. It's basically an electronic lock, designed for a basic
cabinet or safe or door. Normally the lock is active so you can't open the door because
the solenoid slug is in the way. does not use any power in this state. When 9-12VDC
is applied, the slug pulls in so it doesn’t stick out anymore and the door can be
opened.

Fig.4.6: Solenoid 12V

SGOI College of Engineering, Belhe Page 20


Face Detection Door Lock system.

TECHNICAL DETAILS
12VDC (you can use 9-12 DC volts, but lower voltage results in
weaker/slower operation)
Draws 650mA at 12V, 500 mA at 9V when activated Designed for 1-10
seconds long activation time
Max Dimensions: 41.85mm / 1.64" x 53.57mm / 2.1" x 27.59mm / 1.08"
Dimensions: 23.57mm / 0.92" x 67.47mm / 2.65" x 27.59mm / 1.08"Wire
length: 222.25mm / 8.7.

4.3.4 Light-Emitting Diode

A light-emitting diode (LED) is a two-lead semiconductor light source. It is a


p–n junction diode that emits light when activated. When a suitable current is applied
to the leads, electrons are able to recombine with electron holes within the device,
releasing energy in the form of photons. This effect is called electroluminescence, and
the color of the light (corresponding to the energy of the photon) is determined by the
energy band gap of the semiconductor. LEDs are typically small (less than 1 mm2)
and integrated optical components may be appearing as practical electronic
components in 1962, the earliest LEDs emitted low-intensity infrared light.

Infrared LEDs are still frequently used as transmitting elements in remote-


control circuits, such as those in remote controls for a wide variety of consumer
electronics.

Fig.4.7: LED

SGOI College of Engineering, Belhe Page 21


Face Detection Door Lock system.

The first visible-light LEDs were of low intensity and limited to red. Modern
LEDs are available across the visible, ultraviolet, and infrared wavelengths, with very
high brightness. Early LEDs were often used as indicator lamps for electronic devices,
replacing small incandescent bulbs. They were soon packaged into numeric readouts
in the form of seven-segment displays and were commonly seen in digital clocks.
Recent developments have produced LEDs suitable for environmental and task
lighting.

LEDs have led to new displays and sensors, while their high switching rates
are useful in advanced communications technology. LEDs have many advantages
over incandescent light sources, including lower energy consumption, longer lifetime,
improved physical robustness, smaller size, and faster switching. light-emitting diodes
are used in applications as diverse as aviation lighting, automotive headlamps,
advertising, general lighting, traffic signals, camera flashes, lighted wallpaper and
medical devices. They are also significantly more energy efficient and, arguably, have
fewer environmental concerns linked to their disposal.

4.3.5 Servo Motor

The project uses DC servo motor for accordingly provided PWM pulses to
the motor by the controller. The project uses 2 servo motors for sophisticated
mechanical structure.
A servo motor is a type of motor that can rotate with great precision.
Normally this type of motor consists of a control circuit that provides feedback on
the current position of the motor shaft, this feedback allows the servo motors to
rotate with great precision.

A servomotor is a closed-loop servomechanism that uses position feedback


to control its motion and final position. The input to its control is a signal (either
analogue or digital) representing the position commanded for the output shaft.

The motor is paired with some type of position encoder to provide


position and speed feedback. In the simplest case, only the position is measured. The
measured position of the output is compared to the command position, the external

SGOI College of Engineering, Belhe Page 22


Face Detection Door Lock system.

input to the controller. If the output position differs from that required, an error signal
is generated which then causes the motor to rotate in either direction, as needed to
bring the output shaft to the appropriate position. As the positions approach, the error
signal reduces to zero and the motor stops.

The very simplest servomotors use position-only sensing via a


potentiometer and bang-bang control of their motor; the motor always rotates at full
speed (or is stopped). This type of servomotor is not widely used in industrial motion
control, but it forms the basis of the simple and cheap servos used for radio-controlled
models.

Fig.4.8: Servomotor

Servomotors are generally used as a high-performance alternative to the stepper


motor. Stepper motors have some inherent ability to control position, as they have
built-in output steps. This often allows them to be used as an open-loop position
control, without any feedback encoder, as their drive signal specifies the number of
steps of movement to rotate, but for this the controller needs to 'know' the position of
the stepper motor on power up. Therefore, on first power up, the controller will have
to activate the stepper motor

SGOI College of Engineering, Belhe Page 23


Face Detection Door Lock system.

4.3.6 ESP32Cam

The project uses ESP 32 as the heart of the system .ESP32-CAM is a low-cost
ESP32-based development board with onboard camera, small in size. It is an ideal
solution for IoT application, prototypes constructions.
Fully compliant with Wi-Fi 802.11b/g/n/e/i and Bluetooth 4.2 standards, it can be
used as a master mode to build an independent network controller, or as a slave to
other host MCUs to add networking capabilities to existing devices

The ESP32-CAM has a very competitive small-size camera module that can operate
independently as a minimum system with a footprint of only 27*40.5*4.5mm and a
deep sleep current of up to 6mA.ESP-32CAM can be widely used in various IoT
applications. It is suitable for home smart devices, industrial wireless control, wireless
monitoring, QR wireless identification, wireless positioning system signals and other
IoT applications. It is an ideal solution for IoT applications.ESP-32CAM adopts DIP
package and can be directly inserted into the backplane to realize rapid production of
products, providing customers with high-reliability connection mode, which is
convenient for application in various IoT ha hardware.

Fig.4.9: ESP32Cam

SGOI College of Engineering, Belhe Page 24


Face Detection Door Lock system.

Features-
4.3.6.1 The smallest 802.11b/g/n Wi-Fi BT SoC Module
4.3.6.2 Low power 32-bit CPU, can also serve the application processor
4.3.6.3 Up to 160MHz clock speed ,Summary computing power up to 600
DMIPS
4.3.6.4 Built-in 520 KB SRAM, external 4MPSRAM
4.3.6.5 Supports UART/SPI/I2C/PWM/ADC/DAC
4.3.6.6 Support OV2640 and OV7670 cameras, Built
4.3.6.7 In Flash lamp.
4.3.6.8 Support image Wi-Fi upload
4.3.6.9 Support TF card
4.3.6.10Supports multiple sleep modes
4.3.6.11Embedded L WIP and Free RTOS
4.3.6.12Supports STA/AP/STA+AP operation mode
4.3.6.13Support Smart Config/AirKiss technology
4.3.6.14Support for serial port local and remote firmware upgrades

4.3.7 Power Supply


Figure 4.9 shows the block diagram of power supply. Each of the blocks is
described in more detail below:
4.3.7.1 Transformer- center tap high voltage AC mains to low voltage AC.
4.3.7.2 Rectifier- converts AC to DC, but the DC output is varying.
4.3.7.3 Smoothing - smoothest the DC from varying greatly to a small ripple.
4.3.7.4 Regulator - eliminates ripple by setting DC output to a fixed voltage.

230V AC Regulated
main 5V

Transformer Rectifier Smoothing Regulator

Fig.4.10: Block diagram of power supply

SGOI College of Engineering, Belhe Page 25


Face Detection Door Lock system.

There are many types of power supply. Most are designed to convert high
voltage AC mains electricity to a suitable DC voltage supply for electronic circuits
and other devices. The basic step in the designing of any system is to design the
power supply required for that system. The steps involved in the designing of the
power supply are as follows,
1) Determine the total current that the system sinks from the supply.
2) Determine the voltage rating required for the different components.

Fig.4.11: Circuit diagram of power supply

 Bridge rectifier
A bridge rectifier can be made using four individual diodes, but it is also
available in special packages containing the four diodes required. It is called a full-
wave rectifier because it uses the entire AC wave (both positive and negative
sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when
conducting and there are always two diodes conducting, as shown in the diagram
below. Bridge rectifiers are rated by the maximum current they can pass and the
maximum reverse voltage they can withstand (this must be at least three times the
supply RMS voltage so the rectifier can withstand the peak voltages.

Fig.4.12: Bridge rectifier

SGOI College of Engineering, Belhe Page 26


Face Detection Door Lock system.

 Smoothing
Smoothing is performed by a large value electrolytic capacitor connected
across the DC supply to act as a reservoir, supplying current to the output when the
varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed
varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges
quickly near the peak of the varying DC, and then discharges as it supplies current to
the output.

Fig.4.13: Smoothing

 Voltage regulator
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or
variable output voltages. They are also rated by the maximum current they can pass.
Negative voltage regulators are available, mainly for use in dual supplies. Most
regulators include some automatic protection from excessive current ('overload
protection') and overheating. Many of the fixed voltage regulator ICs has 3 leads and
look like power transistors, such as the 7805 +5V 1A regulator shown on the right.
They include a hole for attaching a heat sink if it is the Necessary.

Fig.4.14: Voltage regulator

SGOI College of Engineering, Belhe Page 27


Face Detection Door Lock system.

The bridge rectifier and capacitor input filter produce an unregulated DC


voltage of 15v which is applied at the input of 7812.As the minimum dropout voltage
is 2v for IC 78012, the voltage applied at the input terminal should be at least 7
volts.C1 (1000 µf / 65v) is the filter capacitor and C2 and C3 (0.1pf) is to be
connected across the regulator to improve the transient response of the regulator.Drop
out voltage to be 2 volts, the minimum DV voltage across the capacitor C1 should be
equal to 15volts (at least).
A power supply of +12V and +5V is required for circuit operation. A supply
of +12V is required for the motor. +5V supply is required by the microcontroller and
motor driver IC. A step-down transformer of 12V rating and Power regulator IC
LM7805 is used. The AC mains power supply of 230V, 50Hz is step-down using the
transformer to +12V. A bridge rectifier circuit using diodes is connected at the
secondary of the transformer. This is fed to the relay and power regulator IC. The IC
regulates the +12V supply and outputs +5V. This is fed to the other ICs.
The power supply section consists of step down transformers of 230V
primary to 9Vand 12V secondary voltages for the +5V and +12V power supplies
respectively. The stepped down voltage is then rectified by 41N4007 diodes. The high
value of capacitor 1000 μF charges at a slow rate as the time constant is low, and once
the capacitor charges there is no resistor for capacitor to discharge. This gives a
constant value of DC. IC 7805 is used for regulated supply of +5 volts and IC 7812 is
used to provide a regulated supply of +12 volts in order to prevent the circuit ahead
from any fluctuations. The filter capacitors connected after this IC filters the high
frequency spikes. These capacitors are connected in parallel with supply and common
so that spikes filter to the common. These give stability to the power supply circuit.
4.4 Software Specification
Following are the software development tools required for the proposed system.
 MATLAB
 Keil
 Eagle

4.4.1 MATLAB
MATLAB is a multi-paradigm numerical computing environment and fourth-
generation programming language. MATLAB allows matrix manipulations, plotting

SGOI College of Engineering, Belhe Page 28


Face Detection Door Lock system.

of functions and data, implementation of algorithms, creation of user interfaces, and


interfacing with programs written in other languages. MATLAB users come from
various backgrounds of engineering, science, and economics .
Some of the basic features related with MATLAB are as below:
 MATLAB is a data analysis and visualization tool which has been designed
with powerful support.
 Matrices and matrix operations.
 Excellent graphics capabilities.
 Powerful programming language.
Sets of programs are called tool boxes.
 The particular tool box is the image processing tool box.
The MATLAB application is built around the MATLAB scripting language.
Common usage of the MATLAB application involves using the Command Window
as an interactive mathematical shell or executing text files containing MATLAB code.

4.4.2 Keil Software


Keil compiler is software used where the machine language code is written
and compiled. After compilation, the machine source code is converted into hex code
which is to be dumped into the microcontroller for further processing. Keil compiler
also supports C language code.

Fig.4.15: Keil software

Steps to write an assembly / c language program in keil and how to compile it:
1. Install the keil software in the PC in any of the drives.

SGOI College of Engineering, Belhe Page 29


Face Detection Door Lock system.

2. Now drag the icon“Keil uVision3”onto the desktop.


3. Double click on this icon to start the keil compiler.
4. A page opens with different options in it showing the project workspace at the
leftmost corner side, output window in the bottom and an ash colored space for
the program to be written.
5. Now to start using the keil, click on the option “project”.
6. A small window opens showing the options like new project, import project, open
project etc. Click on “New project”.
7. A small window with the title bar “Create new project” opens. The window asks
the user to give the project name with which it should be created and the
destination location. The project can be created in any of the drives available. You
can create a new folder and then a new file or can create directly a new file.
8. After the file is saved in the given destination location, a window opens where a
list of vendors will be displayed and you have to select the device for the target
you have created.
9. The most widely used vendor is Atmel. So click on Atmel and now the family of
microcontrollers manufactured by Atmel opens. You can select any one of the
microcontrollers according to the requirement.
10. When you click on any one of the microcontrollers, the features of that particular
microcontroller will be displayed on the right side of the page. Click on this
microcontroller and have a look at its features. Now click on “OK” to select this
microcontroller.
11. A small window opens asking whether to copy the startup code into the file you
have created just now. Just click on “No” to proceed further.
12. Now you can see the TARGET and SOURCE GROUP created in the project
workspace.
13. Now click on “File” and in that “New”. A new page opens and you can start
writing program in it.
14. After the program is completed, save it with any name but with the.asm or .c
extension. Save the program in the file you have created earlier.
15. You can notice that after you save the program, the predefined keywords will be
highlighted in bold letters.

SGOI College of Engineering, Belhe Page 30


Face Detection Door Lock system.

16. Now add this file to the target by giving a right click on the source group. At list
of options open and in that select “add files to the source group”.
17. Right click on the target and select the first option “Options for target”. A window
opens with different options like device, target, output etc. First click on “target”.
18. Since the set frequency of the microcontroller is 11.0592 MHz to interface with
the PC, just enter this frequency value in the XTAL (MHz) text area and put a tick
on the Use on-chip ROM. This is because the program what we write here in the
keil will later be dumped into the microcontroller and will be stored in the inbuilt
ROM in the microcontroller.
19. Now click the option “Output” and give any name to the hex file to be created in
the “Name of executable” text area and put a tick to the “Create HEX file” option
present in the same window. The hex file can be created in any of the drives. You
can change the folder by clicking on “Select folder for Objects”.
20. Now to check whether the program you have written is errorless or not, click on
the icon exactly below the “Open file” icon which is nothing but build target icon.
You can even use the shortcut key F7 to compile the program written.
21. To check for the output, there are several windows like serial window, memory
window, project window etc. Depending on the program you have written, select
the appropriate window to see the output by entering into debug mode.
22. The icon with the letter “d” indicates the debug mode.
23. Click on this icon and now click on the option “View” and select the appropriate
window to check for the output.
24. After this is done, click the icon “debug” again to come out of the debug mode.
25. The hex file created as shown earlier will be dumped into the microcontroller with
the help of software called Preload.

4.4.3 Eagle: (Eagle 7.1.0)


This software is used for entering schematic diagrams and designing printed
circuit boards (PCBs). EAGLE stands for Easily Applicable Graphical Layout Editor
and developed by CAD soft computer. Eagle contains a schematic editor for designing
circuit diagrams. Schematics are stored in files with ‘.sch’ extension. PCB layout
editor stores board files with the extension ‘.brd’. Eagle provides a multi window

SGOI College of Engineering, Belhe Page 31


Face Detection Door Lock system.

graphical user interface and menu system for editing, project management and to
customize the interface and designed parameters.

Fig.4.16: Eagle software


4.5 Design Flow
The flow chart below represents the flow of actions / steps executed by the system
during its course of action.

Algorithm:

1. Search an IP Address (provided) in an internet browser (e.g. Chrome browser,


Mozilla Firefox).
2. Go to settings of camera ESP 32, as the html page is been opened through IP
address.
3. Set the face of the user and load this face data to the ESP after finalizing it.
4. For verification of the data, stand (show face) in front of camera.
5. The face is detected by the camera
6. The face stack labels will check for verification.
7. If the face is verified the stack will release a signal through ESP to the servo
drive and controller.
8. The lock and servo motor starts working i.e. lock will be unlocked and servo
motor will be rotated with some PWM (Pulse Width Modulation) signal.
9. Go to step 5 after waiting 4 Sec after verification.

SGOI College of Engineering, Belhe Page 32


Face Detection Door Lock system.

10. If the face detected is not verified by the stack it will deny the access towards
all the commands of the system.

SGOI College of Engineering, Belhe Page 33


Face Detection Door Lock system.

Fig.4.17: Design flow of Door lock system

The main flow of the block diagram goes from teaching the granting face id through
mobile controls then it is fetched towards internet provision after clouding the setting
inculcated has to dissipate towards the ESP node, this granting face id has the input
suffocation to the commands of the ESP.

The first step towards functioning is to grab a mobile phone through which a system
teaching of the main suspect generated. I.e. we will teach the owner face id to the
system by going to its provided IP Address. After teaching of the system the face
provided at the time of camera capture will be fended to the controller.

SGOI College of Engineering, Belhe Page 34


Face Detection Door Lock system.

4.6 Advantages
Following are the advantages of proposed system.
1. High security door lock system ensure security.
2. High security door lock system can be customized to meet your need
3. Quick and accurate results.
4. Helpful for police and provides and automatic safety systems.
5. High security door lock system benefits reduce cost of long run.
6. Smart lock is convenient.
7. Allow exclusive access only to authorized people.
8. It is easy to install and easy to operate.

4.7 Applications
1. It can be used in real time safety system.
2. The whole circuit can be implanted in a small module.
3. Less power consuming safety system.
4. This safety system technology can used hospitals specially Covid19 patients.

SGOI College of Engineering, Belhe Page 35


Face Detection Door Lock system.

Chapter 5

RESULTS

Fig.4.19: Face detection door lock system

Fig.4.20: Face detection door lock system with authorize person

SGOI College of Engineering, Belhe Page 36


Face Detection Door Lock system.

Fig.4.21: Face detection door lock system with unauthorized person

SGOI College of Engineering, Belhe Page 37


Face Detection Door Lock system.

Chapter 6

CONCLUSION

Nowadays, we have proposed a security monitoring system based on IoT


technology. Our proposed system consists of ESP32, PCB Board, Step Down 12V to
5V, Adaptor 12V, Button to reset, PIR Sensor, green LED, red LED, Magnetic
Sensor, Internal Touch Sensor, two MOSFET, Alarm Buzzer, and Electric Strike door
lock. The system we proposed is a system that can monitor and control the door
remotely, receive a warning if a motion is detected near the door, granting door access
to trusted people to control the door, view the door access history log and user access,
get a notification that the door is still open after the limit time has passed, and turn on
the alarm should the door is opened by force. The simulation result shows that when
sensor is placed with a height of 48.5cm with the direction facing down, system can
detect a movement accurately at a distance of 1,6 meters ahead, but when the
movement is more than 1.6 meters, the detection will be less accurate. The simulation
results also show that when messages are published or subscribed between
smartphone and door lock, they are encrypted by SSL encryption properly, so
messages sent are safe from hacker. The message can’t be seen or modified by other
people because the hacker does not have the key to decrypt messages. For future
research, we plan to explore: the usage of camera, so the user can find out who is
visiting; new emergency call feature to directly call the police; new filter feature when
see a report; new feature for two-way communication between the owner of the door
and the guess.

SGOI College of Engineering, Belhe Page 38


Face Detection Door Lock system.

Chapter 7

FUTURE IMPLIMENTATION

Will be provided with mobile app through which continues observation will be simple all
information will be safe, all setting of system can be changed as per user.

Voice commands will also be added, for second stage of security.

3d image capturing will be implemented so that fraud/fake face can’t take


access to the system.

Will be reliable to interconnect with other system such as e.g. ‘Alexa’

SGOI College of Engineering, Belhe Page 39


Face Detection Door Lock system.

Chapter 8

REFERENCES

1. Burange AW, Misalkar HD. Review of Internet of Things in development of smart


cities with data management & privacy. IEEE International Conference on Advances
in Computer Engineering and Applications. 2015 July 23;: p. 1.
2. Wukkadada B, Wankhede K, Nambiar R, Nair A. Comparison with HTTP and
MQTT In Internet of Things (IoT). In Proceedings of the International Conference on
Inventive Research in Computing Applications (ICIRCA 2018); 2018; Coimbatore. p.
249-253.
3. Vikram N, Harish KS, Nihaal MS, Umesh R, Kumar SAA. A Low Cost Home
Automation System Using Wi-Fi Based Wireless Sensor Network Incorporating
Internet of Things(IoT). In 2017 IEEE 7th International Advance Computing
Conference; 2017; Hyderabad. p. 174- 179.
4. Alaa M, Zaidan AA, Zaidan BB, Talal , Kiah MLM. A Review of Smart Home
Applications based on Internet of Things. Journal of Network and Computer
Applications. 2017; 97.
5. Agarwal A, Hada N, Virmani D, Gupta T. A Novel Design Approach for Smart
Door Locking and Home Security using IoT. A High Impact Factor & UGC
Approved Journal. 2017 August; 6(8): p. 1-5.
6. M. N, Kamat , Shinde D. Smart Door Security Control System Using Raspberry
Pi. International Journal of Innovations & Advancement in Computer Science. 2017
November; 6(11): p. 1-4.
7. Gupta RK, Balamurugan S, Aroul K, Marimuthu R. IoT Based Door Entry System.
Indian Journal of Science and Technology. 2016 October; 9: p. 1-5.
8. Kodali RK, Jain V, Bose S, Boppana L. IoT Based Smart Security and Home
Automation System. In 2016 International Conference on Computing,
Communication and Automation (ICCCA); 2016; Noida. p. 1286-1289.
9. Sahoo KC, Pati U. IoT Based Intrusion Detection System Using PIR Sensor. In
2017 2nd IEEE International Conference on Recent Trends in Electronics,
Information & Communication Technology (RTEICT); 2017; Bangalore.

SGOI College of Engineering, Belhe Page 40


Face Detection Door Lock system.

10. Tanwar S, Patel P, Tyagi S, Kumar N, Obaidat MS. An Advanced Internet of


Thing based Security Alert System for Smart Home. In 2017 International Conference
on Computer, Information and Telecommunication Systems (CITS); Dalian.
11. Kumar S, Swetha S, Kiran VT, Johri P. IoT based Smart Home Surveillance and
Automation. In 2018 International Conference on Computing, Power and
Communication Technologies (GUCON); 2018. p. 786-790.
12. Prabaharan J, Swamy A, Sharma A, Bharath KN, Mundra PR, Mohammed KJ.
Wireless Home Automation and Security System using MQTT Protocol. In 2017 2nd
IEEE International Conference On Recent Trends In Electronics Information &
Communication Technology; 2017; Bangalore. p. 2043-2045.
13. Pandit V, Majgaonkar P, Meher P, Sapaliga S, Bojewar S. Intelligent Security
Lock. In International Conference on Trends in Electronics and Informatics; 2017;
Tirunelveli. p. 713-716.
14. Dutta J, Wang Y, Maitra T, Islam SH, Rawal BS, Giri D. ES3B: Enhanced
Security System for Smart Building using IoT. In 2018 IEEE International
Conference on Smart Cloud (Smart Cloud); 2018; New York. p. 158-165. 15. Home -
WEMOS.CC. [Online]; 2018 [cited 2019 June 2. Available from:
https://www.wemos.cc/.

SGOI College of Engineering, Belhe Page 41


Face Detection Door Lock system.

SGOI College of Engineering, Belhe Page 42

You might also like