A PROJECT REPORT
Government Engineering College, Sector-28
Gandhinagar
B.E.Semester–III
(Electronics and Communication)
Name :- Gajjar Harshil Enrollment No :- 240133111006
:- Mali Jayesh :- 240133111012
:- Varun Tanna :- 240133111040
:- Harsh Pandya :- 240133111019
:-Vivekanand Saraswati :- 240133111049
Subject :- Smart lock system
Project Title
SMART LOCK SYSTEM
PROF. POOJA GAJJAR
(FACULTY NAME)
REPORT
PROBLEM STARTMENT: In an increasingly digital world, traditional locking
mechanisms face challenges related to convenience, security, and accessibility. Many
homeowners and businesses struggle with the limitations of physical keys, such as loss,
duplication, and unauthorized access.
The goal of this project is to design and implement a smart lock system that enhances
security and user convenience. This system will utilize wireless technology, such as
Bluetooth or Wi-Fi, to allow users to control access remotely through a mobile application
PROPOSED SOLUTION: To address the challenges posed by traditional locking
mechanisms, we propose the development of an innovative smart lock system that
integrates advanced security features with user-friendly technology. This solution will
consist of a robust locking mechanism equipped with wireless connectivity.
CANVAS
The canvas is a simple tool designed to help project managers describe a particular project to
their teams, clients, and other people. It is an ideal structure to define stages that a project
will go through and a simple structure of its elements. It provides an overview of the project in
a simplified way.
(1) Idea.on Canvas
s
(2) AEIOU Summary
(3) Product design canvas
(4) Story Boarding
(5) Mind Mapping
COMPONENTS:
• ESP32 or
• Arduino
• LCD
• Keyboard 4x4
• Biometric Sensor
• RFID reader & tag
• Solenoid lock
ESP 32:
In this tutorial, we will learn about ESP32, a dual core MCU from Espresso if Systems with
integrated Wi-Fi and Bluetooth. If you worked with ESP8266, then ESP32 is a significant
upgrade with a lot more features. This GeUng Started with ESP32 guide is for complete
beginners, with or without prior experience in or ESP8266.
Adriano is a great plaVorm for beginners into the World of Microcontrollers and Embedded
Systems. With a lot of cheap sensors and modules, you can make several projects either as a
hobby or even commercial.
As technology advanced, new project ideas and implementaWons came into play and one
parWcular concept is the Internet of Things or IoT. It is a connected plaVorm, where several
“things” or devices are connected over internet for exchange of informaWon.
In DIY community, the IOT projects are mainly focused on Home AutomaWon and Smart Home
applicaWons but commercial and industrial projects have far complex implementaWons like
Machine Learning, ArWficial Intelligence, Wireless Sensor Networks etc.
The important thing in this brief intro is whether it is a small DIY project by a hobbyist or a
complex industrial project, any project must have connecWvity to Internet. This is where the
likes of ESP8266 and ESP32 come into picture.
If you want to add Wi-Fi connecWvity to your projects, then ESP8266 is a great opWon. But if
you want build a complete system with Wi-Fi connecWvity, Bluetooth connecWvity, high
resoluWon ADCs, DAC, Serial ConnecWvity and many other features, then ESP32 is the ulWmate
choice.
What is ESP32?
ESP32 is a low-cost System on Chip (SoC) Microcontroller from Espresso Systems, the
developers of the famous ESP8266 SoC. It is a successor to ESP8266 SoC and comes in both
single-core and dual-core variaWons of the Tensilica’s 32-bit Xtensa LX6 Microprocessor with
integrated Wi-Fi and Bluetooth.
The good thing about ESP32, like ESP8266 is its integrated RF components like Power Amplifier,
Low-Noise Receive Amplifier, Antenna Switch, Filters and RF Balun. This makes designing
hardware around ESP32 very easy as you require very few external components.
Another important thing to know about ESP32 is that it is manufactured using TSMC’s
ultralow-power 40 nm technology. So, designing badery operated applicaWons like wearables,
audio equipment, baby monitors, smart watches, etc., using ESP32 should be very easy.
Specifications of ESP32
ESP32 has a lot more features than ESP8266 and it is difficult to include all the specificaWons
in this GeUng Started with ESP32 guide. So, I made a list of some of the important
specificaWons of ESP32 here. But for complete set of specificaWons, I strongly suggest you to
refer to the Datasheet.
Single or Dual-Core 32-bit LX6 Microprocessor with clock frequency up to 240 MHz
• 520 KB of SRAM, 448 KB of ROM and 16 KB of RTC SRAM.
• Supports 802.11 b/g/n Wi-Fi connecWvity with speeds up to 150 Mbps.
• Support for both Classic Bluetooth v4.2 and BLE specificaWons.
• 34 Programmable GPIOs.
• Up to 18 channels of 12-bit SAR ADC and 2 channels of 8-bit DAC Serial ConnecWvity
include 4 x SPI, 2 x I2C, 2 x I2S, 3 x UART.
• Ethernet MAC for physical LAN CommunicaWon (requires external PHY).
• 1 Host controller for SD/SDIO/MMC and 1 Slave controller for SDIO/SPI.
• Motor PWM and up to 16-channels of LED PWM.
• Secure Boot and Flash EncrypWon.
• Cryptographic Hardware AcceleraWon for AES, Hash (SHA-2), RSA, ECC and RNG.
Pin out of ESP32 Board
I will make a separate dedicated tutorial on ESP32 Pin out. But for the Wme being, take a look
the pin out diagram of the ESP32 Development Board.
This pin out is for the 30 – pin version of the ESP Board. In the pin out tutorial, I will explain
the pin out of both the 30 – pin as well as the 36 – pin version of the ESP Boards.
This is a complete beginner’s tutorial on ESP32, an excellent SoC with integrated Wi-Fi and
Bluetooth connecWvity. You learned about the ESP32 Microcontroller, its specificaWons,
development board layout and a brief pin out as well.
ARDUINO:
Arduino Overview
What is Arduino? Arduino is an open-source electronics plaVorm based on easy-to-use
hardware and solware. It consists of a microcontroller that can be programmed to interact
with various sensors, actuators, and other electronic components. Arduino boards are popular
among hobbyists, educators, and professionals for prototyping and developing electronic
projects.
Key Features of Arduino
1. Ease of Use: The Arduino IDE (Integrated Development Environment) provides a simple
programming interface that uses a variant of C/C++, making it accessible for beginners.
2. Community Support: A large and acWve community offers extensive documentaWon,
tutorials, and libraries, facilitaWng problem-solving and project development.
3. VersaWlity: Arduino boards can be used in a wide range of applicaWons, from basic
projects to complex systems, allowing for flexibility in design.
4. Interfacing: Arduino can easily interface with a variety of components, including
sensors, motors, and communicaWon modules, making it ideal for IoT projects.
Arduino Pin ConfiguraWon:
Arduino Pin Con:iguration Overview
Arduino boards typically come with a variety of pins that serve different funcWons.
Understanding these pins is essenWal for configuring the hardware components of your smart
lock system.
Types of Pins
1. Digital Pins:
o Purpose: Used for digital input (reading high/low signals) and output (sending
high/low signals).
o ConfiguraWon: Can be set as INPUT or OUTPUT.
o Usage in Smart Lock: Control LEDs, buzzers, and receive signals from budons or
sensors.
2. Analog Pins:
oPurpose: Read analog signals (0-5V) from sensors.
oConfiguraWon: Used with funcWons like analogRead().
oUsage in Smart Lock: Can be used with analog sensors, such as potenWometers
or certain types of RFID readers.
3. PWM Pins (Pulse Width ModulaWon):
o Purpose: These are digital pins that can simulate analog output by varying the
width of the pulse.
o ConfiguraWon: IdenWfied with a Wlde (~) on the board.
o Usage in Smart Lock: Control servo motors for locking mechanisms.
4. CommunicaWon Pins:
o I2C (Inter-Integrated Circuit):
§ Purpose: Allows mulWple devices to communicate using only two wires
(SDA for data, SCL for clock).
§ Usage in Smart Lock: Connect devices like sensors and displays that
support I2C.
o SPI (Serial Peripheral Interface):
§ Purpose: A faster communicaWon protocol used for connecWng devices.
§ Usage in Smart Lock: Could be used with high-speed sensors or SD card
modules.
o UART (Universal Asynchronous Receiver-Transmider):
§ Purpose: Used for serial communicaWon, olen with Bluetooth or Wi-Fi
modules.
§ Usage in Smart Lock: Communicate with mobile apps or other devices.
5. Power Pins:
o Vin: Voltage input pin for supplying power to the Arduino.
o GND: Ground pins for compleWng circuits.
o 5V: Provides 5V power output to components.
o 3.3V: Provides 3.3V power output for low-voltage components.
LCD (LIQUID CEYSTAL DISPLAY):
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated opWcal
device that uses the light-modulaWng properWes of liquid crystals combined with polarizers.
Liquid crystals do not emit light directly, instead using a backlight or reflector to produce
images in color or monochrome. LCDs are available to display arbitrary images (as in a general-
purpose computer display) or fixed images with low informaWon content, which can be
displayed or hidden. For instance: preset words, digits, and seven-segment displays, as in a
digital clock, are all good examples of devices with these displays. They use the same basic
technology, except that arbitrary images are made from a matrix of small pixels, while other
displays have larger elements. LCDs can either be normally on (posiWve) or off (negaWve),
depending on the polarizer arrangement. For example, a character posiWve LCD with a
backlight will have black ledering on a background that is the color of the backlight, and a
character negaWve LCD will have a black background with the leders being of the same color
as the backlight. OpWcal filters are added to white on blue LCDs to give them their
characterisWc appearance.
LCDs are used in a wide, and indoor and outdoor signage. Small LCD screens are common in
LCD projectors and portable consumer devices such as digital cameras, watches, digital clocks,
calculators, and mobile telephones, incrange of applicaWons, including LCD televisions,
computer monitors, instrument panels, aircral cockpit displaysluding smartphones. LCD
screens are also used on consumer electronics products such as DVD players, video game
devices and clocks. LCD screens have replaced heavy, bulky cathode-ray tube (CRT) displays in
nearly all applicaWons. LCD screens are available in a wider range of screen sizes than CRT and
plasma displays, with LCD screens available in sizes ranging from Wny digital watches to very
large television receivers. LCDs are slowly being replaced by OLEDs, which can be easily made
into different shapes, and have a lower response Wme, wider color gamut, virtually infinite
color contrast and viewing angles, lower weight for a given display size and a slimmer profile
(because OLEDs use a single glass or plasWc panel whereas LCDs use two glass panels; the
thickness of the panels increases with size but the increase is more noWceable on LCDs) and
potenWally lower power consumpWon (as the display is only "on" where needed and there is
no backlight). OLEDs, however, are more expensive for a given display size due to the very
expensive electroluminescent materials or phosphors that they use. Also due to the use of
phosphors, OLEDs suffer from screen burn-in and there is currently no way to recycle OLED
displays, whereas LCD panels can be recycled, although the technology required to recycle
LCDs is not yet widespread. Adempts to maintain the compeWWveness of LCDs are quantum
dot displays, marketed as
SUHD, QLED or Triluminos, which are displays with blue LED backlighWng and a Quantum-dot
enhancement film (QDEF) that converts part of the blue light into red and green, offering
similar performance to an OLED display at a lower price, but the quantum dot layer that gives
these displays their characterisWcs cannot yet be recycled.
Since LCD screens do not use phosphors, they rarely suffer image burn-in when a staWc image
is displayed on a screen for a long Wme, e.g., the table frame for an airline flight schedule on
an indoor sign. LCDs are, however, suscepWble to image persistence. The LCD screen is more
energy-efficient and can be disposed of more safely than a CRT can. Its low electrical power
consumpWon enables it to be used in badery-powered electronic equipment more efficiently
than a CRT can be. By 2008, annual sales of televisions with LCD screens exceeded sales of CRT
units worldwide, and the CRT became obsolete for most purposes.
Keyboard 4x4
4x4 Matrix Keyboard Overview
A 4x4 matrix keyboard is a type of input device that consists of 16 budons arranged in a grid
format (4 rows and 4 columns). This configuraWon allows for efficient input and is commonly
used in applicaWons such as security systems, calculators, and user interfaces.
Key Features
1. Compact Design: The 4x4 layout allows for a large number of inputs in a small space,
making it suitable for various applicaWons.
2. Low Power ConsumpWon: The matrix design consumes less power compared to using
individual budons.
3. Easy IntegraWon: It can be easily interfaced with microcontrollers like Arduino using
simple wiring and libraries.
4. Customizable Key Mapping: Each key can be programmed to perform different
funcWons, which is useful for user-defined access codes or commands.
Components of the 4x4 Matrix Keyboard
1. Key Switches: Each budon in the matrix is a momentary switch that completes a circuit
when pressed.
2. Wiring: The keyboard has 8 pins (4 for rows and 4 for columns) that connect to the
microcontroller. When a key is pressed, it connects a specific row to a column, which
can be detected by the Arduino.
Pin ConfiguraWon
Here’s a typical pin configuraWon for a 4x4 matrix keyboard:
Keyboard Pin Arduino Pin
Row 1 Digital Pin 2
Row 2 Digital Pin 3
Row 3 Digital Pin 4
Row 4 Digital Pin 5
Column 1 Digital Pin 6
Column 2 Digital Pin 7
Column 3 Digital Pin 8
Column 4 Digital Pin 9
Biometric Sensor:
Biometric Sensor Overview
A biometric sensor is a device that captures and analyzes unique biological traits of an
individual, typically used for idenWficaWon and authenWcaWon purposes. In the context of a
smart lock system, biometric sensors olen focus on fingerprint recogniWon due to its balance
of security and user convenience.
Key Features
1. Security: Biometric authenWcaWon is generally more secure than tradiWonal password
or key-based systems, as it relies on unique physical characterisWcs.
2. User Convenience: Users can access the system quickly without the need for
remembering passwords or carrying keys.
3. IntegraWon: Many biometric sensors can easily interface with microcontrollers like
Arduino, making them suitable for DIY projects.
4. Data Storage: Some sensors have onboard storage for mulWple fingerprints, allowing for
mulWple authorized users.
Common Types of Biometric Sensors
1. Fingerprint Sensors: Most commonly used in smart locks; they scan and match
fingerprints.
2. Facial RecogniWon Cameras: Capture facial data for idenWficaWon (less common in basic
lock systems).
3. Iris Scanners: Analyze the unique paderns in the iris (rare in consumer applicaWons due
to cost).
Popular Fingerprint Sensors
1. R305: A widely used fingerprint sensor module with built-in fingerprint recogniWon
capabiliWes.
2. GT-521F52: Another popular sensor with a high level of accuracy and support for
mulWple fingerprints.
3. FPC1020: Known for its compact size and integraWon with various microcontrollers.
Pin ConfiguraWon
A typical fingerprint sensor module, such as the R305, has the following pin configuraWon:
Sensor Pin Arduino Pin
VCC 5V
GND GND
TX (Transmit) Digital Pin 10
RX (Receive) Digital Pin 11
Using the Biometric Sensor with Arduino
Wiring Diagram
Connect the sensor pins to the specified Arduino pins according to the pin configuraWon. Make
sure to power the sensor with the correct voltage (usually 3.3V or 5V).
RFID Reader &Tag:
RFID Tag
1. DefiniWon:
RFID tags are small electronic devices that store data and communicate with RFID readers
using radio waves.
2. Components:
Microchip: It holds the unique idenWfier of the tag along with other data.
Antenna: It transmits and receives radio signals for communicaWon with the reader.
Substrate: The material on which the chip and the antenna are mounted; it can be plasWc or
paper.
3. Types:
Passive RFID Tags:
No internal power source; the electromagneWc field from the reader powers.
Typically cheaper and thus more widely applied.
Range is relaWvely short (typically 10 meters).
AcWve RFID Tags:
Have a badery which allows for greater range communicaWon.
Signals can be transmided farther away (up to 100 meters)
More expensive and used with tracking larger items
4. ApplicaWons:
Inventory management
Asset tracking
Access control (example: key cards)
Supply chain management
Retail (example: anW-thel systems)
RFID Reader
1. DefiniWon:
An RFID reader is a unit that transmits radio waves and captures signals returning from RFID
tags.
2. Components:
Transmider: Produces the radio waves that will cause the RFID tags to return signals.
Receiver: Detects signals from the tags
Antenna: It may be either internal or external; it can increase range and efficiency
Processor: Decodes the informaWon from the tags.
3. Type:
StaWonary Readers
Mounted in areas for conWnuous scanning and monitoring
Installed at entry/exit points of warehouses.
Portable Readers:
Portable scanners designed to read tags on a mobile basis.
Useful in inventory checks and spot audit.
Mobile Readers
Devices that have the capabiliWes for reading and are made mobile on most the Wme
conducted applicaWons.
4. ApplicaWons:
Inventory tracking in real-Wme.
Supply Chain Management
Access point monitoring for security purposes.
Enhancement of customer experiences in retailing seUngs.
Solenoid lock:
Solenoid Lock
1. DefiniWon: A solenoid lock is an electromechanical locking device that uses an
electromagneWc solenoid to control the locking mechanism. When energized, the solenoid
retracts or extends a bolt to secure or release the lock.
2. Components:
• Solenoid Coil: An electromagneWc coil that generates a magneWc field when current
flows through it, controlling the movement of the locking mechanism.
• Armature (Bolt): The movable part that extends or retracts to lock or unlock the door.
• Housing: The casing that protects the internal components and is mounted on the door
frame.
• Power Supply: Provides the necessary voltage and current to energize the solenoid.
3. Working Principle:
• When power is supplied to the solenoid coil, it generates a magneWc field that pulls the
armature (bolt) inwards, unlocking the door.
• When power is removed, the armature returns to its original posiWon, locking the door.
• Depending on the design, solenoid locks can be configured to be normally open (NO) or
normally closed (NC).
4. Types:
• Single Solenoid Lock: Features one solenoid for locking/unlocking.
• Double Solenoid Lock: Uses two solenoids for enhanced security, requiring
simultaneous acWvaWon.
• Fail-Safe vs. Fail-Secure:
o Fail-Safe: Unlocks when power is lost, useful for emergency exits.
o Fail-Secure: Remains locked when power is lost, ensuring security.
ApplicaWons in Smart Lock Systems
1. Role in Smart Lock:
• The solenoid lock acts as the primary locking mechanism in a smart lock system,
allowing electronic control over access.
• It integrates with components like RFID readers, keypads, or mobile apps to provide
secure and convenient entry.
2. OperaWon:
• Upon successful authenWcaWon (e.g., via RFID, PIN, or smartphone app), the control
system sends a signal to energize the solenoid coil.
• The solenoid retracts the bolt, allowing the door to be opened.
• Once the door is closed, the solenoid automaWcally locks again when power is restored
or the system resets.
ImplementaWon in a Smart Lock Project
1. Requirements:
• Choose a solenoid lock with specificaWons that match your door type (e.g., size, weight)
and security needs (e.g., resistance to tampering).
• Ensure the power supply matches the solenoid’s voltage and current requirements.
2. Circuit Design:
• Control Circuit: Integrate the solenoid lock with the control system (e.g.,
microcontroller, RFID reader).
• Power Circuit: Connect the solenoid to a suitable power source, ensuring safe
operaWon.
• ProtecWon Diode: Include a flyback diode across the solenoid coil to protect the control
circuit from voltage spikes when the solenoid is de-energized.
3. Setup:
• Mount the solenoid lock securely to the door frame and ensure proper alignment with
the strike plate.
• Wire the solenoid to the control circuit, ensuring all connecWons are secure and
insulated.
4. TesWng:
• Test the locking and unlocking mechanism under different scenarios (e.g., successful
and failed authenWcaWons).
• Verify that the solenoid responds quickly and reliably to control signals.
5. Maintenance:
• Regularly inspect the solenoid lock for wear and tear.
• Clean any dust or debris that may affect its operaWon.
• Ensure connecWons remain secure and replace components if necessary.
ADVANTAGES &DISADVANTAGES OF THIS PROJECT
ADVANTAGES:
1. Enhanced Security
• MulW-Factor AuthenWcaWon: Combining RFID and fingerprint recogniWon provides a
two-factor authenWcaWon system, making unauthorized access more difficult.
• Unique IdenWfiers: Each RFID tag and fingerprint is unique, ensuring that only
authorized users can unlock the door.
2. Convenience
• Quick Access: Users can unlock the door quickly using RFID tags or their fingerprint,
eliminaWng the need for physical keys.
• Remote Control: The ESP32 can enable remote access control via a smartphone app,
allowing users to lock or unlock the door from anywhere.
3. Flexibility
• MulWple Access Methods: Users can choose between using an RFID card, fingerprint, or
even a mobile app to gain access, accommodaWng different preferences.
• User Management: Easily add or remove users from the system through solware,
allowing for flexible access control.
4. Real-Time Monitoring
• AcWvity Logs: The system can maintain logs of access adempts, recording successful
and failed entries for security audits.
• NoWficaWons: Users can receive real-Wme noWficaWons on their smartphones when
someone accesses the lock, enhancing awareness of potenWal security breaches.
5. Reliability
• Durable Components: Solenoid locks are robust and can withstand repeated use, while
the ESP32 offers reliable wireless communicaWon.
• Fail-Safe OpWons: Depending on the configuraWon, the system can be set to remain
secure even in the event of power loss (fail-secure) or unlock for emergencies (fail-
safe).
6. Easy IntegraWon
• IoT CapabiliWes: The ESP32 enables easy integraWon with IoT plaVorms, allowing for
future expansions (e.g., smart home systems, voice assistants).
• CustomizaWon: Users can customize the system seUngs (e.g., access Wmes, user
privileges) to meet specific needs.
DISADVANTAGES:
1. Dependence on Technology
• Power Dependency: The system relies on electrical power. In case of power outages or
badery failures, the lock may become inoperable unless it has a backup power opWon.
• Technical Failures: Hardware or solware malfuncWons can lead to the lock becoming
unusable, potenWally locking users out.
2. Cost
• IniWal Investment: The cost of components (RFID readers, fingerprint sensors, ESP32
modules, solenoid locks) can be higher than tradiWonal locks.
• Maintenance Costs: Regular maintenance, solware updates, or repairs may add to the
overall expense over Wme.
3. Complexity of Setup
• InstallaWon Requirements: SeUng up a smart lock system may require technical
experWse, especially in programming and integraWng the components.
• CompaWbility Issues: IntegraWng different technologies (RFID, fingerprint, and ESP32)
can lead to compaWbility issues that require troubleshooWng.
4. Security Concerns
• Hacking Risks: Wireless systems can be vulnerable to hacking, parWcularly if not
properly secured. Cybersecurity measures must be in place to protect against
unauthorized access.
• Cloning Risks: RFID tags can be cloned if not adequately encrypted, potenWally
compromising security.
APPLICATION:
1.ResidenWal Security
• Home Access Control: Smart locks provide secure access to homes, allowing family
members to enter using RFID cards or fingerprints, eliminaWng the need for tradiWonal
keys.
• Guest Access: Homeowners can provide temporary access to guests or service
personnel via RFID tags or one-Wme codes.
2. Commercial Security
• Office Entry Systems: Businesses can use smart locks to manage employee access,
allowing entry through RFID cards or fingerprint authenWcaWon.
• Restricted Areas: Secure areas can be protected with smart locks that only authorized
personnel can access, enhancing security in sensiWve environments.
3. Airbnb and VacaWon Rentals
• Keyless Entry for Guests: Hosts can provide guests with RFID tags or unique fingerprint
access for easy check-in and check-out.
• Remote Management: Hosts can control access remotely, making it easy to manage
bookings without needing to meet guests in person.
4. EducaWonal InsWtuWons
• School Access Control: Smart locks can manage access to dormitories, classrooms, and
labs, ensuring that only authorized students and staff can enter.
• Visitor Management: Schools can monitor visitors by providing temporary RFID access
or fingerprint scanning at entry points.
5. Healthcare FaciliWes
• PaWent Room Security: Hospitals can secure paWent rooms with smart locks that only
allow access to authorized personnel, improving paWent safety.
• Pharmacy Access Control: Smart locks can restrict access to medicaWon storage areas,
ensuring that only qualified staff can enter.
6. Automated Warehousing and LogisWcs
• Inventory Management: Smart locks can secure storage areas in warehouses, allowing
access based on employee RFID tags, thus streamlining inventory control.
• Loading Dock Security: Control access to loading docks and shipment areas, ensuring
that only authorized personnel can operate heavy machinery or access shipments.
Coclusion :