Professional Documents
Culture Documents
PROJECT WORK
ON
Submitted to
(2019-2023)
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
SHRI RAM GROUP OF COLLEGES
Parikarma Marg, Laxman Vihar Colony, Civil Lines South, Muzzafarnagar, U.P.251001
DECLARATION
I hereby declare that the work is being presented in the project, entitled “IOT
operated door lock using ESP32 CAM” partial fulfillment of the requirements for the
award of BACHELOR OF TECHNOLOGY in (Electronics and communication)
submitted in the department of Electronics and Communication Engineering (Shri Ram
Group of Colleges, Muzaffarnagar) is an authentic record of my own work carried under
the guidance of Asst. prof. Mrs. Indu. I have not submitted the matter embodied in this
report for the award of my degree.
MEENU
Roll No: 2006950319002
MAHIMA RANI
Roll No: 1906950310014
SAKSHI
Roll No: 1906950310039
CERTIFICATE
iv
This is to certify that the project entitled “IOT operated door lock using ESP
CAM module” is being submitted by SURAJ KUMAR TAYAL (2006950319002),
MEENU (2006950319001), MAHIMA RANI (1906950310014), SAKSHI
(1906950310039) in partial fulfillment for the award of degree of “BACHELOR OF
TECHNOLOGY” in Electronics and Communication Engineering of the ‘Shri Ram
Group of Colleges, Muzaffarnagar’ (Affiliated to- Dr. APJ Abdul Kalam Technical
University, Lucknow) is a record of their own work, carried out under my supervision.
MRS. KANUPRIYA
Dept of Electronics and comm. Engineering
Shri Ram Group of Colleges,
Muzaffarnagar (U.P.), 251001
SUPERVISOR
In terms of house security, the door is crucial. To keep the residence secure, the
owner will keep the door locked at all times. However, owing to a rush when leaving the
house, the house owner may forget to lock the door, or they may be unsure if they have
closed the door or not. In this project, we have presented a “IOT operated door lock
using ESP32 CAM module”. In this simple working model, when a person hits the
doorbell, the owner receives a notification on his/her phone with a photo of that person.
The owner can also unlock the door from a mobile phone after checking the photo.
The proposed Door Security System application Door Lock with ESP32 and
Internet of Things (IoT) technology to monitor the status of the door, manages the door,
and increase security in a home. Blink is a communication protocol that connects a
Smartphone to a door lock system and is used to increase the security of a home. 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. With the advancement of technology and the increasing use of
IOT, digital door locks have become very common these days. Digital lock doesn’t require
any physical key but it uses RFID, fingerprint, passwords, etc. to control the door lock. In
past, we have developed many digital door locks applications using these various
technologies. That it can be monitored by the mobile and can grant the permission to
access the door. It also enabled with notification when someone is detected by the system
and alerts to the owner. A door is one of the defense features to take care of physical
security of the house. If the door of the home is often opened easily, a thief can easily enter
and steal the contents of the house. At first, a door only requires a physical key to lock or
unlock the door but on the other hand, with the advancement of technology, a more modern
door has been innovated, namely the digital door which will lock or unlock doors without
requiring any physical key. We propose an application called Face detection Door lock.
This is predicated on Arduino using Internet of Things (IOT) technology to watch the
status of the door, control the door and increase security.
ACKNOWLEDGEMENT
Signature: Signature:
Signature: Signature:
vii
TABLE OF CONTENTS
Page No
Cover page
Declaration …..………………………………………………………………………….i
Certificate..….…………………………………………………………………………..ii
Abstract…………………………………………………………………………..……..iii
Ackowledgement……………………………………………………………………….iv
Table of contents……………………………………….……………….………………v
List of figures…………….……………………..……………………..……………….vii
Literature Review………………………………………………………..…….............viii
Scope of work in the project……………………………………………..…………..…ix
Chapter -1 (Introduction)……...………………………………………………….…1-3
3.1Working……………………………………………………………………………..25
3.2 Circuit diagram …………………...………………………………………………..26
3.3 Configuration of telegram app…………………………………………….……......27
3.4 Program ESP32 Cam with USB To TTL…………..……………………….……...28
3.5 Arduino IDE setup for ESP32 Cam………………………………………………..29
3.6 Program ESP32 Cam with Arduino IDE…………………………………………..32
3.7 Code ………………………………………………………………………….…...38
Chapter-4 ( Result Analysis)...................................................................................47-50
Result Analysis……………………………………………………………………..….47
Chapter-5 ( Applications)........................................................................................51-55
6.1 Advantage…………………………………………………………………………..56
6.2 Disadvantage……………………………………………………………………….59
8.1 Conclusion……………...………………………………………………….…….…61
8.2 Reference……………………………………………………………….…………..62
LIST OF FIGURES
1. INTRODUCTION
4. RESULT ANALYSIS
Since past few years most of the industries are working in the fields of loT based
project the major motto of all these is to make things easy and smart. These became
need for digitalizing with loT security tools by these our daily life locks become smart
and also introduced the locks movable with stepper motor and need to digital number
pad to get input from user, and it need to add infrared or any Bluetooth module to
operate all these devices. A major difference in smart wifi door lock is that no need to
use stepper motor and the application detects the person entered at the door and send
images in the telegram application. We have eliminated unwanted components of
stepper motor and drivers which are in existing models. We have added newer and
unparalleled features of Wifi based door lock as an access point to open or close the
door. It is unique and user friendly. This wifi based door lock system allowing people to
get more interested in because of its leatures and advantages and also due to its
functionality. There are some of drawbacks in that based on that the industries working
in this field and improving the security models day by day.
The creation of smart home is where the parts of a home is manipulated and
designed to operate wirelessly, where an example of parts of a home is the door. The
original basic function of a smart door is to increase a home's security system. By
creating a smart door, it can enhance a home's security system by installing an
automated door lock, which enables access to authorized user's. and installing
surveillance system, which can help in catching a criminal.
The system should be scalable so that new devices can easily be integrated into it. It
should provide a user- friendly interface on the host side, so that the devices can be
easily setup, monitored and controlled. This interface should also provide some
diagnostic services so that if there is any problem with the system, it can be tracked
down. Moreover the overall system should be fast enough to realize the true power of
wireless technology. Finally the system should be cost effective.Currently, there are lots
of thefts are going on, become significant issues for all. By these of wifi based door
lock become more secure in these fields, here we can use fingerprint scanner for
fingerprint recognition, so others cannot enter inside.
SCOPE OF WORK IN THE PROJECT
CHAPTER 1
INTRODUCTION
People nowadays are busy with daily activities. Recently, the number of break-
in and attack of these easy targets is increasing. Sometimes if the gas, smoke or fire
catches means we get to know about that some amount of time. If we detect this earlier
means we can take an action. Android Based Smart door locking system is designed to
prevent unauthorized access, trespassing and intrusion. Banks, corporate offices,
financial organization, jeweler shops, and government organization are some of the
common targets where unauthorized access, trespassing and intrusion take place.
Normally the aim behind such activities is stealing money, jewels or any important
documents for individual gain. The purpose of Android Based Smart door locking
system is to provide a smart solution to overcome these challenges and provide a
feasible solution. This system works on pre- decided password concept. It increases the
security level to prevent an unauthorized unlocking done by attacker. In case the user
forgets the passwords, system gives the flexibility to the user to change or reset the
password. This automatic password based lock system gives user more secure way of
locking-unlocking the system.
The most common examples of smart devices are wearable’s like watches.
Smart watches such as the Apple Watch and Fit bit have penetrated the market not very
long ago. Such devices have also entered our homes with products such as Amazon
Echo, a voice assistant, which users can talk with to play music, provide weather, and
control other IOT devices. An exponential growth is expected for the IOT market and
an increasing number of smart devices show the inclination of the industry toward
offering these interconnected solutions to increase convenience, but also the high
adoption rate of the population. The idea behind the modern day smart locks is to unify
the functionality provided by convenient and secure access control methods with the
convenience of internet connectivity and remote control. There are a few products on
the market that offer these systems and we will talk about two of them, once again
focusing on the features they offer and potential disadvantages, as these products will
serve as inspiration for our actual product implementation.
1.2 PROPOSED SYSTEM
To overcome these problems there is a need to install a home security system which
can detect intrusion and trigger alarm. A home security system is one line of defense a
home can provide intrudes. Such systems can also help to protect a home from fire and
gas leakage by bringing a home’s smoke detectors under its control.
To Interact with our security system and get notified about all the alerts we need to
create Telegram Bot on Telegram Application in our smart phone.
In terms of house security, the door is crucial. Now days everyone has smart phones
and having internet access easily.
Here we want to develop a smart door control with telegram app. We can access
telegram app from PC or mobile phone. We can lock and unlock door by controlling
valve from telegram app. Also, it will send photo whenever doing lock and unlock.
Anyone nowadays is concerned about security, whether it is data security or the
security of their own home. In this project, we'll use the Camera (ESP32 CAM) to
create an IOT-based Wi-Fi Door Lock system with telegram app.
In this simple working model, once an individual hits the doorbell, the owner receives
a notification on his/her phone with a photograph of that person.
The owner can also unlock the door from a mobile phone after checking the photo.
In this ESP32 CAM project, we have explained how to make Wi-Fi door lock with
photo capture usingESP32CAM and Telegram app.
With this IOT project you can take multiple photos, unlock and lock the door from
anywhere in the world with the Telegram app.
When anyone presses the doorbell, you will get a notification in the telegram app with
a photo of that person.
After that, you can easily unlock and lock the door from the telegram app.
So this IOT project also can be used as a home security system.
In this report, we have explained all the steps to make this Wi-Fi door lock with photo
capture
1.3 BLOCK DIAGRAM
The block diagram of the project entitled “IOT operated door lock using ESP32 CAM
module”, is given below. This includes button, ESP32 CAM module, and door lock,
internet to connect our project with the telegram app and to activate lock from telegram.
ESP 32 CAM
Button Module Door Lock
Internet
In this project, we've given a wise Wi–Fi Door Lock mistreatment the ESP32
CAM and therefore the wire App. during this straightforward operating model, once an
individual hits the doorbell, the owner receives a notification on his/her phone with a
photograph of that person. The owner also can unlock the door from a transportable when
checking the photo. The aim of the project is dominant the Door and increase Security in
an exceedingly House. It’s a cool technology wherever we are able to unlock mobile
phones or to access any application that needs high security. With ESP 32 CAM, we can
attempt develop an easy project that uses your face as ID. Since ESP32 board already
comes with Camera internet Server example code that caters for video stream, So this can
be a simple however terribly helpful home automation project exploitation ESP 32 camera
module.
CHAPTER 2
o Hardware
o Software
Arduino IDE
2.1 ESP32CAM Board
The ESP32 CAM is a very small camera module with the ESP32-S chip that costs
approximately $10. Besides the OV2640 camera, and several GPIOs to connect
peripherals, it also features a micro SD card slot that can be useful to store images taken
with the camera or to store files to serve to clients.
ESP32 can perform as a complete standalone system or as a slave device to a host MCU,
reducing communication stack overhead on the main application processor. ESP32 can
interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI
/ SDIO or I2C / UART interfaces.
This is a simple to use 12V Electronic Cabinet/Door Lock. You can use it to lock
and unlock Cabinets/Doors using a 12V power supply. These Locks are basically
electromagnets: they are made of a big coil of copper wire with an armature (a slug of
metal) in the middle. This 12V Cabinet Door Electromagnetic Solenoid Lock can be used
for locking sell-machine, storage shelf, file cabinet and etc. It is steady, durable, and
energy-saving and had a long lifespan. In the anti-theft and shockproof design, the lock is
better than other kinds of locks.12V Solenoid lock has a slug with a slanted cut and a good
mounting bracket. It's basically an electronic lock, designed for a basic cabinet, safe or
door. When 9-12VDC is applied, the slug pulls in so it doesn't stick out and the door can be
opened. It does not use any power in this state. It is very easy to install for automatic door
lock systems like electric door lock with the mounting board. This solenoid in particular is
nice and strong.
Electric door locks are a new and improved way to keep your home secure. They
replace your keys or work in conjunction with them. When you have electronic door locks,
you will be able to remotely lock and unlock your doors as well as monitor whether they
are locked or not. You can use a key fob, your car, a mobile application, or a key code to
unlock them. These were first found on cars; they are now available in homes and
apartments as well. For any type of door lock, you need a key of sorts to get into it.
However, keys aren’t always efficient because they require the use of your hands
(problematic if you have to carry something inside or you are older and have arthritis), you
need to carry them (not always great for children who are prone to losing things), and take
time (not good if the weather is poor or you live in a dangerous area). The lock system
works just like a traditional lock – with a latch and a bolt. Traditionally, keys work with a
pin and tumbler system where the lock cylinder is held in place and the key turns them and
moves the lock a certain distance – enough to allow the door to open. There are other ways
to get this open, but they often take a certain amount of skill and a long time.
12V Solenoid lock has a slug with a slanted cut and a good mounting bracket. It's
basically an electronic lock, designed for a basic cabinet, safe or door. When 9-12VDC is
applied, the slug pulls in so it doesn't stick out and the door can be opened. It does not use
any power in this state. It is very easy to install for automatic door lock systems like
electric door lock with the mounting board. This solenoid in particular is nice and strong.
A continuous duty solenoid works much like a regular starter solenoid, opening and
closing a circuit in order to turn the power flow off and on. As you might have guessed,
however, in the case of a continuous duty solenoid the power flow is more of a constant,
whereas a starter solenoid operates intermittently.
12V Solenoid locks 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. The 12V DC solenoid lock is used for locking sell-machine, storage shelf, file cabinet
and etc. The solenoid 12V lock works as the circuits disconnects, and it will unlock as the
instant power-on.
Voltage regulator, any electrical or electronic device that maintains the voltage of
a power source within acceptable limits. The voltage regulator is needed to keep voltages
within the prescribed range that can be tolerated by the electrical equipment using that
voltage. The voltage regulator 7805 is a member of 78xx series, where the "78" represents
a positive voltage regulator and "xx" represents the regulated output voltage. Hence, the IC
7805 is a positive voltage regulator having +5 volts regulated output voltage. A voltage
regulator is an essential element of power supplies used in several electrical and electronic
devices such as computers, amplifier, automobile alternator, mobile chargers, etc.
A voltage regulator is basically an electronic circuit that generates a regulated voltage of
fixed value from an unregulated fluctuating voltage.
A voltage regulator is required in a circuit because all voltage sources cannot
provide a steady voltage due to change in the load current and other circuit parameters like
temperature. Therefore, the primary function of a voltage regulator is to convert the
fluctuating voltage of a voltage source into a constant and steady output voltage. Today,
we use voltage regulators in the form of integrated circuits (ICs). The voltage regulator IC
7805 is a member of the 78xx series of voltage regulator ICs. The voltage regulator 7805 is
a linear voltage regulator. In the 78xx series of voltage regulators, the “xx” represents the
steady output voltage produced by the voltage regulator. Therefore, for the voltage
regulator IC 7805, the steady output voltage is +5 V DC. It is to be noted that the
maximum input voltage of the voltage regulator IC 7805 is 35 V.
Therefore, the voltage regulator 7805 can produce a steady output voltage of 5 V
for any value of input voltage less than or equal to 35 V. Hence, the 34 V is the threshold
limit of the input voltage for a voltage regulator 7805 IC. In voltage regulator 7805 IC, a
large amount of energy is exhausted in the form of heat. This is because there is a high
difference between the input and output voltage which is converted in heat within the
regulator IC. Therefore, to dissipate this heat, a heat sink is provided with the voltage
regulator IC 7805. If we do not use the heat sink, the excessive heating of the regulator IC
may cause malfunctioning of the device. Voltage regulator 7805 IC is one of the most
widely used voltage regulator IC in different electrical and electronic circuits. It takes an
unregulated voltage of 7 V to 35 V and produces a fixed regulated output voltage of 5 V
DC.7805 is a three terminal linear voltage regulator IC with a fixed output voltage of 5V
which is useful in a wide range of applications. Currently, the 7805 Voltage Regulator IC
is manufactured by Texas Instruments, ON Semiconductor, STMicroelectronics, Diodes
incorporated, Infineon Technologies, etc. They are available in several IC Packages like
TO-220, SOT-223, TO-263 and TO-3. Out of these, the TO-220 Package is the most
commonly used one (it is the one shown in the above image). The name 7805 signifies two
meaning, “78” means that it is a positive voltage regulator and “05” means that it provides
5V as output. So our 7805 will provide a +5V output voltage.
The output current of this IC can go up to 1.5A.The 7805 is a fixed voltage linear
regulator that outputs 5V at up to 1A current with an input voltage range of 7 – 35V.7805
is a three terminal linear voltage regulator IC with a fixed output voltage of 5V which is
useful in a wide range of applications. Currently, the 7805 Voltage Regulator IC is
manufactured by Texas Instruments, ON Semiconductor, STMicroelectronics, Diodes
incorporated, Infineon Technologies, etc. Voltage regulator 7805 uses less number of
component to work properly. Its minimum and maximum input voltage is 7 V and 35 V
respectively. Voltage regulator 7805 can deliver an output current of up to 1.5 A. The
operating current of the voltage regulator 7805 IC is 5 mA. Voltage regulator 7805
provides all the necessary protections such as protection against the short circuit and
thermal overload.
In electrical and electronic circuits, the voltage regulator 7805 IC has a wide
range of applications. Voltage regulator 7805 IC is used in mobile changers, UPS power
supplies, portable CD players, current regulators and fixed output regulators, and
adjustable output voltage regulators. It is also used as a +5V voltage regulator.
1K Ohm Resistor Color Code: Brown, Black, Red, Golden. Resistance: 1K Ohm,
Power Rating: 0.25-Watt, Approximate Maximum Current: 15.81mA. A 1K Ohm resistor
can be identified via resistor color codes of Brown-Black-Red-Gold or Brown-Black-
Black-Brown-Gold. The current running through the 1k-ohm resistor is 6.72 milliamperes.
For the 0.25W part with a maximum voltage of 250V, the critical resistance is 250 kΩ. At
resistances higher than the critical resistance, the maximum continuous rated voltage is
250V. Resistors restrict the flow of electric current, for example a resistor is placed in
series with a light-emitting diode (LED) to limit the current passing through the LED.
Resistors may be connected either way round and they are not damaged by heat when
soldering. Resistance is measured in ohms, symbol (omega).
The tolerance of a resistor is shown by the fourth band of the color code. Tolerance
is the precision of the resistor and it is given as a percentage. Resistors are rated according
to their maximum power dissipation. Discrete resistors in solid-state electronic systems are
typically rated as 1⁄10, 1⁄8, or 1⁄4 watt. They usually absorb much less than a watt of electrical
power and require little attention to their power rating. Power resistors are required to
dissipate substantial amounts of power and are typically used in power supplies, power
conversion circuits, and power amplifiers; this designation is loosely applied to resistors
with power ratings of 1 watt or greater.
Power resistors are physically larger and may not use the preferred values, color
codes, and external packages described below the average power dissipated by a resistor is
more than its power rating, damage to the resistor may occur, permanently altering its
resistance; this is distinct from the reversible change in resistance due to its temperature
coefficient when it warms. Excessive power dissipation may raise the temperature of the
resistor to a point where it can burn the circuit board or adjacent components, or even
cause a fire. There are flameproof resistors that will not produce flames with any overload
of any duration.
Resistors may be specified with higher rated dissipation than is experienced in
service to account for poor air circulation, high altitude, or high temperature. All resistors
have a maximum voltage rating; this may limit the power dissipation for higher resistance
values. For instance, among 1⁄4 watt resistors (a very common sort of leaded resistor) one is
listed with a resistance of 100 MΩand a maximum rated voltage of 750 V. However even
placing 750 V across a 100 MΩ resistor continuously would only result in a power
dissipation of less than 6 mW, making the nominal 1⁄4 watt rating meaningless.
A resistor may have one or more fixed tapping points so that the resistance can be
changed by moving the connecting wires to different terminals. Some wire wound power
resistors have a tapping point that can slide along the resistance element, allowing a larger
or smaller part of the resistance to be used. Where continuous adjustment of the resistance
value during operation of equipment is required, the sliding resistance tap can be connected
to a knob accessible to an operator. Such a device is called a rheostat and has two
terminals. The 1K Ohm resistor is a passive electronic component used to control the flow
of electric current in a circuit.
It has a resistance value of 1,000 ohms and is used to limit the current flow in a
circuit to a specific level. If the 1k resistor is the only component in the completed
circuit, it will drop all of the voltage. That means if the source is 9V, the resistor will drop
9V. If the source is 18V, the resistor will drop 18V, and so on. It is Commonly used in
breadboards and other prototyping applications, these 1K ohm resistors make excellent
pull-ups, pull-downs and current limiters. These thick-lead versions of the resistors fit
snugly into a breadboard with very little movement. In electronic circuits, resistors are
predominantly used to lower the flow of current, divide voltages, block transmission
signals, and bias active elements.
The 10K Ohm resistor is a passive electronic component used to control the flow
of electric current in a circuit. It has a resistance value of 10,000 Ohms and is used to limit
the current flow in a circuit to a specific level. Commonly used in breadboards and other
prototyping applications, these 10K ohm resistors make excellent pull-ups, pull-downs and
current limiters. These thick-lead versions of the resistors fit snugly into a breadboard with
very little movement.10K Ohm 0.25W High Quality Metal Film Resistor (MFR) with ±1%
Tolerance and Tin-plated Copper Leads. 10K Ohm Resistor Color Code: Brown, Black,
Black, Red, Brown. Resistance: 10K Ohm, Power Rating: 0.25 Watt, Approximate
Maximum Current: 5mA.A resistor is a passive two-terminal electrical component that
implements electrical resistance as a circuit element. In electronic circuits, resistors are
used to reduce current flow, adjust signal levels, to divide voltages, bias active elements,
and terminate transmission lines, among other uses. High-power resistors that can dissipate
many watts of electrical power as heat may be used as part of motor controls, in power
distribution systems, or as test loads for generators.
Fixed resistors have resistances that only change slightly with temperature, time
or operating voltage. Variable resistors can be used to adjust circuit elements (such as a
volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or
chemical activity. Resistors are common elements of electrical networks and electronic
circuits and are ubiquitous in electronic equipment. Practical resistors as discrete
components can be composed of various compounds and forms. Resistors are also
implemented within circuits. The electrical function of a resistor is specified by its
resistance: common commercial resistors are manufactured over a range of more than
nine orders of magnitude. The nominal value of the resistance falls within
the manufacturing tolerance, indicated on the component. It is a Low cost miniature carbon
resistors with a high stability suitable for industrial and consumer electronics applications.
The 100uF cap (the bulk capacitor) is primarily to support the supply during
temporary battery (e.g., banging or dropping). The 100uF should be close to the battery
terminals. Disconnection during physical shock.100μF 25V Electrolytic Capacitor for
smoothing out, filtering and performance tuning low frequency circuits and signals up to
around1KHzorless.Electrolytic capacitors are widely used in switched-mode power
supplies, DC-DC converters and power supplies. These capacitors are available in high
capacitance and voltage rating than ceramic capacitors. High quality 100 uF/25V radial
electrolytic capacitors. Work great as voltage noise suppressors for voltage regulators and
for power supply. Putting one of these across power and ground in each of your projects
ensures a smooth noise resistant power supply and greater reliability. This 100uf 25V Caps
DC Electrolytic Capacitor is designed with high reliability and long life (2000 hrs). It also
features a high ripple current at high frequency and excellent smoothing ability. These
electrolytic capacitors offer a wide range of applications in the field of Power Supply,
Audio Amplifiers, Hobby projects, etc.
Each family or type of capacitor uses its own unique set of capacitor
characteristics and identification system with some systems being easy to understand, and
others that use misleading letters, colors or symbols. The best way to figure out which
capacitor characteristics the label means is to first figure out what type of family the
capacitor belongs to whether it is ceramic, film, plastic or electrolytic and from that it may
be easier to identify the particular capacitor characteristics. Even though two capacitors
may have exactly the same capacitance value, they may have different voltage ratings. If a
smaller rated voltage capacitor is substituted in place of a higher rated voltage capacitor,
the increased voltage may damage the smaller capacitor.
This 100uf 25V Caps DC electrolytic is made from Aluminum electrolytic
capacitors, found in many applications like power supplies, computer motherboards and
lots of domestic appliances. When working with Electronics circuits, there are many times
in which you may need a capacitor to help smooth out, filter or store electrical charge. In
such times, a 100μF 25V Electrolytic Capacitor is ideal for low frequency signals, to
reduce the effects of ripples, surges as well as sudden drops in current. The 100uF cap (the
bulk capacitor) is primarily to support the supply during temporary battery disconnection
during physical shock (e.g. banging or dropping). The 100uF should be close to the battery
terminals. High quality 1000uF/25V radial electrolytic capacitors. Work great as voltage
noise suppressors for voltage regulators and for power supply. Putting one of these across
power and ground in each of your projects ensures a smooth noise resistant power supply
and greater reliability. 100μF 25V Electrolytic Capacitor for smoothing out, filtering and
performance tuning low frequency circuits and signals up to around 1 KHz or less.
12V power supplies (or 12VDC power supplies) are one of the most common
power supplies in use today. In general, a 12VDC output is obtained from a 120VAC or
240VAC input using a combination of transformers, diodes and transistors. The most
essential role of the 12V battery has been to provide a reservoir of power for loads that
require a lot of power. A DC power supply is a type of power supply that gives direct
current (DC) voltage to power a device. Because DC power supply is commonly used on
an engineer ‘s or technician ‘s bench for a ton of power tests, they are also often called a
"bench power supply." a DC power supply can be generated from an AC line. Most
electrical and electronic circuits require a DC voltage source that is constant regardless of
the change in the input.
Although DC batteries can be used as an input, this option is expensive and
requires replacement from time to time. So, it is necessary to first convert an AC input into
a DC voltage source and regulate it to serve this purpose. These power supplies work
by regulating the output voltage with a high-frequency switching process utilizing
feedback with pulse width modulation. Moreover, switching regulated power supplies run
substantial EMI filtering to reduce the load and line's regular and differential noise. 12V
batteries are used in most vehicles because the electrical components such as the starter,
lighting, and ignition systems are designed to operate on 12 volts. The 12-volt rating of a
battery is the nominal voltage and it may be slightly higher or lower depending on the state
of charge and loads. Therefore, a 12-volt system, even one with a higher amperage rating,
is seen as generally lower risk because the 12 volts is usually insufficient to penetrate skin
and other objects. Low voltage systems do have a lower risk, but that is not to say they are
risk-free.
The 12V DC power supply is among the leading power supplies in today's
technological world. Mainly because of its affordability, reliability, and ease of use. A
12VDC power supply is a device that supplies electrical energy to a load. In other words, a
power supply's primary purpose is converting electric current from the source into the
required voltage, frequency, and current, which powers the load. At our lowest voltage
offering, the 12 VDC motor is ideal for applications with a DC power supply requiring
high starting and running torque. Our 12 VDC motors are capable of operating at much
lower speeds than our other DC motor voltages. During normal operation, the 12 Volt
battery is charged via a DC / DC converter from the HV battery but the power demand
from various components is highly fluctuating. Thus, the 12 Volt battery is needed to
buffer the electrical system, enabling to supply components like: Electronic power steering
actuators.
The 12V DC power supplies fall into following categories: 12V regulated power
supplies, 12V unregulated power supplies. The 12 Volt batteries plays a key role for the
functioning of nearly all electrical components within an EV, and is especially needed to
ensure the availability of critical safety systems. In addition, the 12V regulated power
supply has three subgroups: Switching regulator AC to DC, Linear regulator AC to DC,
switching regulator DC to DC.12V power supplies (or 12VDC power supplies) are one of
the most common power supplies in use today. In general, a 12VDC output is obtained
from a 120VAC or 240VAC input using a combination of transformers, diodes and
transistors. At 12.0 volts your battery is considered to be fully discharged or 'flat' and
should be recharged as soon as possible. The lifespan of your battery will be severely
affected if it remains within this voltage range for extended periods of time.
ARDUINO UNO
Technical specifications
Microcontroller
Digital I/O Pins: 14
PWM Pins: 6 (Pin # 3, 5, 6, 9, 10 and 11)
Analog Input Pins: 6
DC Current per I/O Pin: 20 mA
DC Current for 3.3V Pin: 50 mA
Size: 68.6 mm x 53.4 mm
Weight: 25 g
ICSP Header: Yes
Power Sources:
USB connector. USB bus specification has a voltage range of 4.75 to 5.25 volts. The
official Uno boards have a USB-B connector, but 3rd party boards may have a mini
USB / micro USB / USB-C connector.
5.5mm/2.1mm barrel jack connector. Official Uno boards support 6 to 20 volts, though 7
to 12 volts is recommended. The maximum voltage for 3rd party Uno boards varies
between board manufactures because various voltage regulators are used, each having a
different maximum input rating. Power into this connector is routed through a series
diode before connecting to VIN to protect against accidental reverse voltage situations.
VIN pin on shield header. It has a similar voltage range of the barrel jack. Since this pin
doesn't have reverse voltage protection, power can be injected or pulled from this pin.
When supplying power into VIN pin, an external series diode is required in case barrel
jack is used. When board is powered by barrel jack, power can be pulled out of this pin.
General pin functions
LED: There is a built-in LED driven by digital pin 13. When the pin is high value, the
LED is on, when the pin is low, it is off.
VIN: The input voltage to the Arduino/Genuino board when it is using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 20V), the USB connector (5V),
or the VIN pin of the board (7-20V). Supplying voltage via the 5V or 3.3V pins bypasses
the regulator, and can damage the board.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND: Ground pins.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source, or enable voltage translators on the outputs to
work with the 5V or 3.3V.
Reset: Typically used to add a reset button to shields that block the one on the board.
Special pin functions
Serial / UART: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data.
External interrupts: pins 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value.
PWM (pulse-width modulation): pins 3, 5, 6, 9, 10, and 11. Can provide 8-bit PWM
output with the analogWrite () function.
SPI (Serial Peripheral Interface): pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK).
These pins support SPI communication using the SPI library.
TWI (two-wire interface) / I²C: pin SDA (A4) and pin SCL (A5). Support TWI
communication using the Wire library.
AREF (analog reference): Reference voltage for the analog inputs.
CHAPTER 3
TESTING AND IMPLEMENTATION
3.1 Working
In this ESP32 CAM project, we have explained how to make Wi-Fi door lock with
photo capture using ESP32 CAM and Telegram app. With this IOT project you can take
multiple photos, unlock and lock the door from anywhere in the world with the Telegram
app. This part covered the essential settings including the ESP32 Camera board manager
installation. The system is powered by ESP 32 CAM circuit. The Circuit Diagram for IOT
operated door lock using ESP32 CAM and is combined with an USB to TTL for operating
the Solenoid Lock we can use TIP NPN 122 transistors. The USB to TTL board is
employed to flash the code into ESP32 CAM because ESP 32 cam does not have the self-
programming IC, for that we can use USB to TTL convertor. When anyone presses the
doorbell, you will get a notification in the telegram app with a photo of that person. After
that, you can easily unlock and lock the door from the telegram app. When someone press
the doorbell we get notification on our telegram app, and also get the photo of the person
entered at the door.
After getting the notification with the telegram app we can take the multiple photos by just
click on /photo. We can lock and unlock the door with telegram app by click on the /lock
and /unlock. Here Arduino IDE is employed to program ESP32 CAM. The entire code is
split into four parts. One is that the main code for the camera and relay module where the
ESP32 locks or unlocks the door consistent with face recognition, and therefore the other
three codes are for website, camera index, and camera pins. After completing the code,
insert the network credentials, SSID, password.
After configure the SSID and password we can open the telegram app because in the
programming section we can configure the telegram bot token that have generated by the
telegram app and the BOT ID. BOT ID also generated by the telegram app. After
generating the BOT ID and token open the telegram app and click on the link generated by
the BOT Token after that you can see your new channel ID.
In the channel id we can tap on the /start button then we will get a interface:
“Welcome to the ESP32CAM Telegram Smart Lock.
/Photo: Takes a new photo;
/Unlock: Unlock the door
/Lock: Lock the door
To get the photo please tap on /photo
3.2 Circuit of ESP32 CAM Wi-Fi Door Lock
This circuit is very simple. Here we use ESP 32 CAM board with these
components such as, 12-volt DC, electronic lock, NPN Transistor, Regulator IC, capacitor,
registers, push buttons. The input voltage is 12V DC. We have used 7805 5V regulator to
feed 5V to ESP32 camera module. We have used a TIP122 NPN transistor to control the
12V electronic lock from the GPIO12 pin and the push button is connected with
the GPIO13 of ESP32 CAM. As we have used the INPUT_PULLUP function in code, so
we have not used any pulled-up resistor. The circuit diagram of ESP 32 CAM Wi-Fi door
lock is given below:
First, you have to configure the Telegram App for this ESP32 CAM project. Please follow
the steps to create a new BOT in the Telegram app for this project.
Thus, you can create the Bot for this ESP32 project.
3.4 Program ESP32 CAM with USB to TTL Convertor
To program ESP32CAM using Arduino UNO. We will use USB to TTL converter to
program the esp32 camera module.We can easily connect the ESP32CAM module with
USB to TTL convertor to upload code from Arduino IDE.The Circuit Diagram for IOT
operated door lock using ESP32CAM and is combined with an USB to TTL for operating
the Solenoid Lock we can use TIP NPN 122 transistors. The USB to TTL board is
employed to flash the code into ESP32CAM because ESP32 CAM does not have the self-
programming IC, for that we can use USB to TTL convertor. When anyone presses the
doorbell, you will get a notification in the telegram app with a photo of that person. After
that, you can easily unlock and lock the door from the telegram app. When someone press
the doorbell we get notification on our telegram app, and also get the photo of the person
entered at the door. After getting the notification with the telegram app we can take the
multiple photos by just click on /photo.
The simplest way to start programming this little board is to use the Arduino ESP32 tool
chain in the Arduino IDE (Integrated Development Environment), an application
developed by Espressif that’s used to write and upload code (programs) to Arduino-
compatible boards. With Arduino, your program is called a “sketch”, and when you
compile it, it’s “magically” debugged, translated into proper C++, and sent to your board in
binary form (machine language).
Here Arduino IDE is used to program ESP32CAM. For that, first, install the ESP32 add-on
on Arduino IDE.
To install the ESP32 board in your Arduino IDE, go to File>Preference
Now copy the below link and paste it into the “Additional Board Manager URLs” field.
Then click the “ok” button.
Now go to select the tools for the ESP 32 CAM board.
In Arduino IDE go to the tools option and select wifi101 firmware updater.
Now select the port for the board.
Before uploading the code to ESP32CAM module, please check the following setting:
Board Settings:
During uploading the code, the GPIO-0 and GND pin of ESP32 CAM should be
connected. Here, we have used USB to TTL convertor to program the ESP32 camera
module. During uploading the code, the GPIO-0 and GND pin of ESP32CAM should be
connected. For this ESP32 CAM project, we have used the Universal Telegram Bot library.
So first we have to download and install it.
Following are the steps to program ESP32 CAM with Arduino IDE:
STEP 1: Connect your ESP32 board to your computer through the micro-USB cable.
Make sure the red LED goes high on the module to ensure power supply.
STEP 2: Start the Arduino IDE and navigate to Tools -> Boards and select
ESP32Dev board as shown below:
STEP 3: Open device manager and check to which com port your ESP32 is connected to.
Mine is connected to COM 8 as shown below:
STEP 4: Go back to Arduino IDE and under Tools -> Port select the Port to which your
ESP is connected to. Once selected you should see something like this on the bottom left
corner of the IDE.
STEP 5: Let’s upload the Blink Program, to check if we are able to program our ESP32
module. This program should blink the LED at an interval of 1 second.
int LED_BUILTIN = 2;
void setup() {
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
STEP 6: To upload the code, just click on upload and you should see the Arduino console
displaying the following if everything works as expected.
Note: For some modules, you might have to hold the Boot button during uploading to
avoid error.
That is it we have successfully uploaded out first code to our ESP32 board. My module
with its LED blinking is shown below:
This is how Programming ESP32 using Arduino IDE can be implemented. You can go
ahead and try the other example programs which are available at File -> Example ->
ESP32 to work with other functionalities of the ESP32. If you have had any problem in
getting this work, feel free to post the query on the comment sections below. You can also
use the Forum for getting technical help.
3.7 Code for this ESP32 CAM project
Here is the code for IoT operated door lock using ESP-32 CAM. The complete code is
divided into several parts including one is main code for camera, ESP 32 lock/ unlock, wifi
ssid, password, and camera pins, camera index. The complete code is given below:
#include<Wifi>
#include<WiFiClientSecure.h>
#include"soc/soc.h"
#include"soc/rtc_cntl_reg.h"
#include"esp_camera.h"
#include<UniversalTelegramBot.h>
#include<ArduinoJson.h>
WiFiClientSecureclientTCP;
UniversalTelegramBotbot(BOTtoken,clientTCP);
// Define GPIOs
#define BUTTON 13
#define LOCK 12
#define FLASH_LED 4
//CAMERA_MODEL_AI_THINKER
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
intlockState=0;
String r_msg="";
voidhandleNewMessages(intnumNewMessages);
String sendPhotoTelegram();
String unlockDoor(){
if(lockState==0){
digitalWrite(LOCK, HIGH);
lockState=1;
delay(100);
return"Door Unlocked. /lock";
}
else{
return"Door Already Unlocked. /lock";
}
}
String lockDoor(){
if(lockState==1){
digitalWrite(LOCK, LOW);
lockState=0;
delay(100);
return"Door Locked. /unlock";
}
else{
return"Door Already Locked. /unlock";
}
}
String sendPhotoTelegram(){
constchar*myDomain="api.telegram.org";
String getAll="";
String getBody="";
camera_fb_t* fb =NULL;
fb =esp_camera_fb_get();
if(!fb){
Serial.println("Camera capture failed");
delay(1000);
ESP.restart();
return"Camera capture failed";
}
Serial.println("Connect to "+String(myDomain));
if(clientTCP.connect(myDomain,443)){
Serial.println("Connection successful");
Serial.println("Connected to "+String(myDomain));
clientTCP.print(tail);
esp_camera_fb_return(fb);
while((startTimer+waitTime)>millis()){
Serial.print(".");
delay(100);
while(clientTCP.available()){
char c =clientTCP.read();
if(c =='\n'){
if(getAll.length()==0) state=true;
getAll="";
}
elseif(c !='\r'){
getAll+=String(c);
}
if(state==true){
getBody+=String(c);
}
startTimer=millis();
}
if(getBody.length()>0)break;
}
clientTCP.stop();
Serial.println(getBody);
}
else{
getBody="Connected to api.telegram.org failed.";
Serial.println("Connected to api.telegram.org failed.");
}
returngetBody;
}
voidhandleNewMessages(intnumNewMessages){
Serial.print("Handle New Messages: ");
Serial.println(numNewMessages);
for(inti=0;i<numNewMessages;i++){
// Chat id of the requester
String chat_id=String(bot.messages[i].chat_id);
if(chat_id!=chatId){
bot.sendMessage(chat_id,"Unauthorized user","");
continue;
}
String fromName=bot.messages[i].from_name;
if(text =="/photo"){
sendPhoto= true;
Serial.println("New photo request");
}
if(text =="/lock"){
String r_msg=lockDoor();
bot.sendMessage(chatId,r_msg,"");
}
if(text =="/unlock"){
String r_msg=unlockDoor();
bot.sendMessage(chatId,r_msg,"");
}
if(text =="/start"){
String welcome ="Welcome to the ESP32-CAM Telegram Smart Lock.\n";
welcome +="/photo : Takes a new photo\n";
welcome +="/unlock : Unlock the Door\n\n";
welcome +="/lock : Lock the Door\n";
welcome +="To get the photo please tap on /photo.\n";
bot.sendMessage(chatId, welcome,"Markdown");
}
}
}
voidsetup(){
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG,0);
Serial.begin(115200);
delay(1000);
pinMode(LOCK,OUTPUT);
pinMode(FLASH_LED,OUTPUT);
pinMode(BUTTON,INPUT_PULLUP);
digitalWrite(LOCK, LOW);
WiFi.mode(WIFI_STA);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
clientTCP.setCACert(TELEGRAM_CERTIFICATE_ROOT);
while(WiFi.status()!= WL_CONNECTED){
Serial.print(".");
delay(500);
}
Serial.println();
Serial.print("ESP32-CAM IP Address: ");
Serial.println(WiFi.localIP());
camera_config_t config;
config.ledc_channel= LEDC_CHANNEL_0;
config.ledc_timer= LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk= XCLK_GPIO_NUM;
config.pin_pclk= PCLK_GPIO_NUM;
config.pin_vsync= VSYNC_GPIO_NUM;
config.pin_href= HREF_GPIO_NUM;
config.pin_sscb_sda= SIOD_GPIO_NUM;
config.pin_sscb_scl= SIOC_GPIO_NUM;
config.pin_pwdn= PWDN_GPIO_NUM;
config.pin_reset= RESET_GPIO_NUM;
config.xclk_freq_hz=20000000;
config.pixel_format= PIXFORMAT_JPEG;
// camera init
esp_err_terr=esp_camera_init(&config);
if(err != ESP_OK){
Serial.printf("Camera init failed with error 0x%x", err);
delay(1000);
ESP.restart();
}
voidloop(){
if(sendPhoto){
Serial.println("Preparing photo");
digitalWrite(FLASH_LED, HIGH);
delay(200);
sendPhotoTelegram();
digitalWrite(FLASH_LED, LOW);
sendPhoto= false;
}
if(digitalRead(BUTTON)== LOW){
Serial.println("Preparing photo");
digitalWrite(FLASH_LED, HIGH);
delay(200);
sendPhotoTelegram();
digitalWrite(FLASH_LED, LOW);
sendPhoto= false;
}
if(millis()-bot_lasttime> BOT_MTBS)
{
intnumNewMessages=bot.getUpdates(bot.last_message_received+1);
while(numNewMessages)
{
Serial.println("got response");
handleNewMessages(numNewMessages);
numNewMessages=bot.getUpdates(bot.last_message_received+1);
}
bot_lasttime=millis();
}
}
Before uploading the code, you have to enter the following details.
Enter the User Id and Bot token you have received from the IDBot and BotFather in
Telegram App.
If you refer to the same circuit, then after doing this changes, you can directly upload
the code to ESP32-CAM.
During uploading the code, if you see the “Connecting…..______” text, then press the
RESET button. Then the code will start uploading.
After uploading the code, disconnect the GPIO-0 from GND pin.
Then open the serial monitor and set the Baud Rate at 115220. Now, press the reset
button of ESP32CAM. If the WiFi is connected successfully then it will print the local
IP address.
CHAPTER 4
RESULT ANALYSIS
The picture below is to representthe results of this work. During this model, once
somebody presses the doorbell, the house owner can get a notification on the mobile with a
photograph of the visitor. When checking the photo, owner will unlock or lock the door
from a mobile phone and can see the picture of the person in his telegram app. The final
result of this project is shown in the following figure:
The figure below shows the testing ESP32 CAM wifi lock and how ESP32 CAM is
capturing the picture:
The figure below shows how the ESP32 CAM is capturing multiple pictures:
This is a very useful IOT project for home security systems. As you can control the door
lock and capture the photo from anywhere in the world through the internet.
The figure below shows that how the ESP32 CAM is sending photo to the telegram
application:
Fig4.4: ESP32 CAM is sending photos to telegram app and lock/unlock the door
CHAPTER 5
APPLICATIONS
IOT based door locks are the door locks that connect to your home's Wi-Fi
network to allow you to lock and unlock the doors through a unique access code or your
smart phone. With a smart lock, you can remotely control your home entrances from near
or far. It is used for security purpose, and it is very useful to provide high security in homes
and other residents. Following are some applications of this door lock system-
This project is about QR Code Scanner or Reader designed using ESP32 CAM
Module. We will develop a program and device using ESP32 Camera module and python
libraries with which we can scan QR codes. Earlier we used QR Code Scanning
Module with Arduino to read QR or barcode but the module is very expensive. Using
ESP32 CAM the project becomes little cheaper. QR Codes have now become a part of our
everyday lives as we use them almost everywhere say it for payments or reaching a website
or a link. Also, people add them to their resumes to share the link to their social profiles.
The ESP32 from sprees if Systems is a powerful dual-core microcontroller with
built-in wireless that makes it a perfect fit for many creative Internet of Things projects.
The ESP32 CAM development board takes it one step further by combining that speedy
microcontroller with a camera module! One project that takes advantage of this powerful
combination is Alvaro Vibrato’s library for reading QR codes. The library is self-contained
and runs entirely on the ESP32 CAM, making it a good choice for IoT projects and robots.
Let's take this library for a test drive and see what we can do with it! For this project, you
will need a way to program the ESP32 CAM board from your computer and to power it
once it has been programmed. You should buy either an ESP32 CAM with an ESP32 CAM
MB daughterboard or a newer ESP32 CAM-CH340. Either one will give you the USB port
needed for programming and power. Not just personally but large tracking and shipping
companies use them to differentiate their products.
5.2 MOTION DETECTION SQUID GAME USING ESP32 CAM
To get started one must have sound knowledge of Python, Image processing,
Embedded Systems, and IOT. In this project, we will understand how to detect the
motion of a person, and what all requirements are needed to run the python program.
First, we will test the whole python script with a webcam or internal camera of a laptop.
Later motion detection program is implemented with the ESP32 CAM. In this project,
we’re going to make a motion sensor detector with photo capture using an ESP32 CAM.
When your PIR sensor detects motion, it wakes up, takes a photo and saves it in the
microSD card. The ESP32 CAM is in deep sleep mode with external wake up
enabled. When motion is detected, the PIR motion sensor sends a signal to wake up the
ESP32. The ESP32 CAM takes a photo and saves it on the microSD card. It goes back
to deep sleep mode until a new signal from the PIR motion sensor is received.
This project is very similar with a previous one, but after so many requests, we
added a PIR motion sensor to the circuit. So, when motion is detected, a picture is taken
and saved on the microSD card. An active ultrasonic motion detector emits ultrasonic
sound waves that reflect off objects and bounce back to the original emission point.
When a moving object disrupts the waves, the sensor triggers and completes the desired
action, whether this is switching on a light or sounding an alarm.
5.3 Gesture Controlled Virtual Mouse with ESP32 CAM
In this project we will develop a virtual Mouse with ESP32CAM. The ESP32
Camera Module along with a Python program can be used to control the mouse
tracking and clicking operations wirelessly. To get started one must have sound
knowledge of Python, Image processing, Embedded Systems as well as the Internet of
Things. First, we will understand how to control the mouse tracking and clicking, and
what all requirements are needed to run the python program. We will first test the
whole python script with a webcam or internal camera of a laptop.
In the second part, we will use an ESP32CAM Module and run the Python code.
So, the ESP32CAM will be used as an input device instead of a PC camera or any other
external camera. Earlier we learned about Gesture Recognition & its application in
Machine-Learning. And we also developed Gesture Controlled Robot using
Accelerometer. Gesture Controlled Virtual Mouse makes human computer interaction
simple by making use of Hand Gestures and Voice Commands. The computer requires
almost no direct contact. All i/o operations can be virtually controlled by using static
and dynamic hand gestures along with a voice assistant. This AI based project controls
the mouse movement using Python, Open CV with a real-time camera that detects hand
landmarks, tracks gesture patterns instead of a physical mouse.
In this project we will learn, how to create a Face Recognition Based Attendance
system using ESP32 CAM and Python. The main heavy program will be at the server-side
that is our computer, or one can even use raspberry-pi as a server. In this attendance
system, we will not just detect the person but also store the information of the person
detected in a Microsoft Excel File. Moreover, the duration of time they have stayed in the
frame is also recorded into an excel sheet. Unlike other forms of biometric technology,
such as fingerprint recognition, which captures identity by touching, a facial identification
system manages employees without the approach of direct contact.
Face recognition records the field employee's attendance marking time and geo
location. Face detection software detects faces by identifying facial features in a photo or
video using machine learning algorithms. It first looks for an eye, and from there it
identifies other facial features. It then compares these features to training data to confirm it
has detected a face.
The tutorial also contains information about features, pins description, and the
method to program ESP32 Camera Module using FTDI Module. We will also set up
the Arduino IDE for the ESP32 Camera Module. We will also upload the firmware and
then work on the Face Recognition part. The script for Face Recognition is written in the
python programming language, thus we will also have to install Python and its
required Libraries. Face detection software detects faces by identifying facial features in a
photo or video using machine learning algorithms. It first looks for an eye, and from there
it identifies other facial features. It then compares these features to training data to confirm
it has detected a face. Earlier we made Fingerprint Attendance System as well as RFID
Attendance System. But this is a different project that doesn’t need any biometric contact
or any use of the card. The ESP32 Camera will capture image & store the information in
Excel file. It automatically scans your face so you don't need to touch anything to mark
your attendance. A face recognition attendance system provides you with real-time data
and syncs the data with no time lag. It helps organizations in efficient workforce
management.
CHAPTER 6
6.1 ADVANTAGES
The IoT based door locks have many advantages. As it provides very high security and
work wirelessly. Only with the help of internet we can monitor our home and also lock and
unlock the door of the house. Following are some advantages of this system:
As we know that in today’s lifestyle everyone has smart phones. In the smart phone we can
access multiple applications with the help of a particular application (app). In this project
we have used the TELEGRAM app for operating our door lock smartly. When someone
press the door button then we can get the notification on our smart phone in the telegram
app. After getting the notification we can lock and unlock the door lock easily also take
multiple pictures of that person. Thus, it can easily work with smart phones.
This is the main advantage of this project that we do not need to take keys inside our
pocket, because the solenoid lock connected with ESP 32 CAM board, and the circuit is
connected with Wi-Fi to control the lock with the telegram app. We can control the lock by
telegram app and no need to carry the keys with us.
6.1.4 COST EFFICIENT
It is cost efficient compare to the other smart locks because we can make it by self. In the
market the door locks have their self-customized apps, but in this project, we used telegram
app to control the door lock. So, this system is very cost efficient.
The automatic opening and locking system, activated through smart phones and biometric
readers, eliminates this dilemma. This system is especially convenient for those families
where parents very often have to rush to the rescue of their children, who have forgotten
the keys and cannot enter into the house.
This system provides the access only to authorized people. The authorized person can
lock or unlock the door and can check the person who entered in the home. And can
also get multiple pictures of the person. And everything is handled via smart phones.
With the installing of a smart lock system, you will have full access control. In fact, the
door lock is an electronic device that allows you to record at any time, who goes in and
out, with dates and time. This is possible because the recognition device used for
authentication is active.
The smart door lock memory is an ideal tool especially for work environments, as it
allows having a total access control to a specific area. The system is particularly useful
for domestic contexts as well, especially when you want to control your children and
keep an eye on their movements.
6.2 DISADVANTAGES
A part from all the advantages mentioned above, the Wi-Fi based smart door locks also has
some disadvantages. Following are some disadvantages of this system:
Another matter related to these smart locks regards a sudden blackout of the control unit or
a fault of the recognition device. In both cases, the risk is that you cannot enter into your
house because the system is unable to authenticate you for accessing the premises.
The most striking problem for those models operating with smart phones, is linked to the
possibility of not being able to open the door when the battery of your smart phone on
down. How often the battery of your smart phone is down at the end of the day?
Unfortunately, the autonomy of these devices is limited and whenever you cannot recharge
your smart phone, the risk of being unable to open the door is possible.
It can use more power,usually when starting up a Wi-Fi connection. The Wi-Fi can be
turned off, though and overall consumption is low.It will be difficult to enter the house if
the smart lock is connected to the electricity of the house if there is a blackout.
When the internet connection is power off then the ESP32 module cannot work with the
telegram App because of that interconnection cannot operated the solenoid lock. So, it is
necessary to have a proper internet connection to access this system.
CHAPTER 7
FUTURE ENHANCEMENT
In the future, this system can be switched to dual verification mechanisms, such as
retina scanner, fingerprint scanner, OTP, PIN code, etc. This system will first recognize the
face. If a face is found in the database, will require the second verification mechanism to
be any of the above one. If the person passes the verification test, only the door will open.
If face is not found in the database, the image will be sent to the website. The system will
provide excellent security. The face recognition mechanism can be used in combination
with any other mechanism. New emergency call feature to directly call the police.
New feature for two-way communication between the owner of the door and the
guess. The android application should be able to manage more doors, windows, and basic
home electronic equipment in the future. To assure the system's completeness, a battery
backup system should be considered. By using AI we can control door locks using face
detection and for registered faces. In the future, this system can be switched to dual
verification mechanisms, such as retina scanner, fingerprint scanner, OTP, PIN code, etc.
The system will provide excellent security.
CHAPTER 8
8.1 CONCLUSION
We successfully designed an IoT-based Wi-Fi door lock security system using the
ESP32Cam to monitor the status of the door and boost the home security. The major goal
of this project is to develop a system that provides a robust security system to the user that
the user can trust easily. This system is inexpensive and simple to set up. It is a durable and
multiple mode device that can be operated by a single tap on the app. It has many features
like notification alert, multiuser function, activity monitor, only admin access, etc. It is
designed keeping in mind the safety of the user. The communication protocol telegram is
used between the smart phone and the door lock system. In this circumstance, due to the
current COVID scenario, the smart locking door system is quite important and applying
this Wi-Fi-based door lock system without using our hands is essential.
[1] Norarzemi, UmmiAnnisa, et al. "Development of Prototype Smart Door System with IoT
Application." Progress in Engineering Application and Technology 1.1 (2020): 245-256.
[2] Aldawira, Cornelio Revelivan, et al. "Door security system for home monitoring based on
ESp32." Procedia Computer Science 157 (2019): 673-682.
[3] Babiuch, Marek, and Jiri Postulka. "Smart Home Monitoring System Using ESP32
Microcontrollers." Internet of Things. IntechOpen, 2020.
[5] Pavelić, Marko, et al. "Internet of things cyber security: Smart door lock system." 2018
international conference on smart systems and technologies (SST). IEEE, 2018.
[6] Guduru, Tabu Sravani, and SURYA NARAYANA MURTHY THATAVARTHY. "IoT
Based Home Monitoring System." (2019).
[7] Nascimento, David Barbosa de Alencar, and Jorge de Almeida Brito Júnior. "Application
of the Internet of Things in the Development of a “Smart” Door."
[8] J Gal Bally, S Marcel, J Ferez. Image quality assessment for face recognition. IEEE
transactions on image processing. 2014; 23: 710-724.
[9] MA Turk, AP Pentland. Facial recognition using eigen-faces in Computer Vision and
Pattern Recognition. CVPR'91. IEEE Computer Society Conference on. 1991; 586-591
[11] G Guo, SZ Li, K Chan. Face detection by support vector machines in automatic facial
and gesture recognition. Fourth Proceedings of IEEE International C Conference on 2000;
196-201.