4 - Final Project Report
4 - Final Project Report
BACHELOR OF ENGINEERING
In
Guided By
Prof. N. S. Kothari
CERTIFICATE
This is to certify that the project report entitled
Dr. A. J. Patil
Principal
SGOI COE. Belhe
SAVITRIBAI PHULE PUNE UNIVERSITY
CERTIFICATE
This is to certify that,
On
/ / 2021
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.
CONTENTS
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
5. Results 36-37
6. Conclusion 38
7. Future Implementation 39
8. References 40-41
LIST OF FIGURES
LIST OF ABBREVIATIONS
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
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
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.
Chapter 2
LITERATURE SURVEY
Currently, the number of thefts and identity fraud have frequently been reported
and has become significant issues.
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.
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.
Chapter 3
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.
Chapter 4
SYSTEM OVERVIEW
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
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.
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
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.
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
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.
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
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.
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.
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.
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.
Fig.4.7: LED
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.
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.
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.
Fig.4.8: Servomotor
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
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
230V AC Regulated
main 5V
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.
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.
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.
4.4.1 MATLAB
MATLAB is a multi-paradigm numerical computing environment and fourth-
generation programming language. MATLAB allows matrix manipulations, plotting
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.
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.
graphical user interface and menu system for editing, project management and to
customize the interface and designed parameters.
Algorithm:
10. If the face detected is not verified by the stack it will deny the access towards
all the commands of the 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.
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.
Chapter 5
RESULTS
Chapter 6
CONCLUSION
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.
Chapter 8
REFERENCES