We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
61
62
63
64
65
66
67
68
69
10
SMART DOOR LOCK
REPORT
Ahmed Elsayed Saber
Hisham Elsayed Fathy
Mohamad Saber Mohamad
Mohamad Fathi Ali
Omar Osama Mohamed
Mahmoud Ahmad Elsaied
Ahmed roshdy mohamed ali
Ahmed Mohamed Abdellatif Mohamed
Aya Essam Abdel Razek
Sara Abdelrahman MohammedPage 02AM UPI LR)
Arduino is used to control an electronic
door lock. The lockPin is connected to the
lock mechanism, and the buttonPin is
connected to a button or sensor that
triggers the door to open.
6 Keyhbad
Py
Arduino is used to control an electronic door lock
using a 4x4 keypad. The keypad is connected to | H
the Arduino using the Keypad library.
The setup() function initializes the lockPin as an
output and sets the debounce time for the keypad.
The loop() function continuously checks for a key press on the
keypad. When a key is pressed, the function checks if it's part of the
password. If the entire password is entered correctly, the
unlockDoor() function is called, which sets the lockPin to HIGH to
unlock the door. After a 5-second delay, the lockDoor() function is
called, which sets the lockPin to LOW to lock the door again.
Page 03,The unlockDoor() and lockDoor() functions control the state of
the electronic lock by setting the lockPin to HIGH or LOW,
respectively. These functions also print a message to the Serial
Monitor to indicate the state of the door.
You can customize this code to fit your specific electronic door
lock setup and password requirements.
Arduino is used to control an electronic door
lock using a 4x4 keypad, and the status of the
door is displayed on an LCD screen.
The setup() function initializes the lockPin as an output, sets the
debounce time for the keypad, and initializes the LCD display with a
"Door Locked" message.
The loop() function continuously checks for a key press on the
keypad. When a key is pressed, the function checks if it's part of the
password. If the entire password is entered correctly, the
unlockDoor() function is called, which sets the lockPin to HIGH to
unlock the door and displays a "Door Unlocked" message on the LCD.
After a 5-second delay, the lockDoor() function is called, which sets
the lockPin to LOW to lock the door and displays a "Door Locked"
message on the LCD.
The unlockDoor() and lockDoor() functions control the state of the
electronic lock by setting the lockPin to HIGH or LOW, respectively.
These functions also clear the LCD and display the appropriate
message.
You can customize this code to fit your specific electronic door lock
setup, password requirements, and LCD display preferences.
Page 04=
A relay is an electrically controlled switch. It uses a small electrical
current to switch a much larger electrical circuit on or off. This is
useful for controlling high-voltage or high-current devices with a
low-voltage microcontroller like Arduino.
How to connect a relay to Arduino:
« Connect one end of the relay coil to the
Arduino's VCC pin and the other end to
GND.
Connect one side of the relay's contact to
the power source you want to control
(e.g., 220V) and the other side to the
device you want to turn on/off (e.g., a
lamp).
Connect the control pin of the relay to a
digital output pin on the Arduino.
Programming:
* Write an Arduino program to control the digital output pin
connected to the relay.
+ When the digital pin is set to HIGH, current flows through
the relay coil, activating the relay and closing the main
circuit.
+ When the digital pin is set to LOW, the current stops
flowing, and the relay opens the main circuit.
Page 05RFID Function: Identifying and Tracking with Radio Waves
RFID (Radio Frequency Identification) is a technology that uses
radio waves to automatically identify and track objects, animals, or
people.
It's like a wireless barcode system, but without the need for line-
of-sight
How it works:
RFID tags: These small
electronic devices are
attached to objects
RFID is simply a cost-effective
technology that uses radio waves
to send a signal
from a chip to a receiver. RFID stands for Radio Frequency
Identification, and this type of wireless technology has two parts: a
tag and a receiver. The tag contains a microchip with a unique
code, and the receiver contains components to process the signal
sent by the tag.
Tags can be either passive (battery-free, activated by the receiver) or
active (battery-powered, sends out a signal that the receiver picks
up). RFID tags are very small but can contain a lot of information
ranging from identification numbers to pages of text; they are often
embedded in merchandise tags, key chains, name badges, credit
cards, and even pet tags! In a clothing store, for example, an
employee can use an RFID reader to instantly scan merchandise
embedded with the tag to learn more information about the item or
contact them at check-out, similar to how a barcode is used.
Page 06Doom
A door lock is a device used to secure a door.
It prevents unauthorized entry and protects the property within.
Basic Components of a Door Lock:
* Latch: The part that
retracts when the handle
is turned, allowing the
door to open. \
+ Deadbolt: A separate locking mechanism that provides
additional security.
¢ Keyhole: The opening where a key is inserted to operate the
lock.
¢ Cylinder: The internal mechanism that receives the key
Page 07Pag AEE
or locks serve a fundamental purpose: security. They protect
ple and property from unauthorized access. However, their
plications extend beyond this basic function.
Residential Applications:
* Home Security: Protecting residents
¢ and belongings from intruders.
¢ Privacy: Ensuring personal spaces are secure.
* Child Safety: Preventing accidental access to hazardous
areas.
Commercial Applications:
« Access Control: Restricting entry to
* authorized personnel.
¢ Security: Protecting assets, inventory,
¢ and sensitive information.
* Emergency Exits: Facilitating quick evacuation in case of
emergencies.
Industrial Applications:
* Security: Protecting valuable equipment and
materials.
* Access Control: Limiting entry to specific
areas.
¢ Safety: Preventing unauthorized access to
hazardous zones.
Page 08Liquidcrystal_12C 1cd(@x27, 16, 2)
5 RFID
MFRC522 rfid(SS_PIN, RST_|
Page 09SIMULATION
RFID with Arduino
RFID-ACS22
‘SDA
Page 10Keypad with Arduino & LCD
Page 11Keypad with Arduino & LCD
Page 12cota ee
peeaneninent ery
pereee ene eres
Peseta}
Pier ete nt ae)
rent nay
pinMode(redLED, OUTPUT)
ore sunt)
eos crs uma a)
eerie)
digitalWrite(greenLED, LOW)
digitalnrite ty
digitalwrite(buzzerPin, Low)
digitalwrite(relayPin, LOW)
Page 13Errore
erreur 5
ae eee
preienett
eects)
Page 14,Pater ern eet OMe Racca er ore ees
fist)
Bearer mare Ret cate)
ee Cem coy
sree henes)
reece
perme ans
digitalWrite(Lockoutput, HIGH
Gigitalwrite(greenLéD, HIGH)
digitalWeite(relayPin, HIGH)
popenreter eres)
pacetecneer nett}
preterit}
area
[Link]()
creme)
preety ,
digitalWrite(redLED, HIGH)
digitalWrite(buzzerPin, HIGH)
Pesresmercae tata)
GigitalWeite(buzzerPin, LOW)
Pena ats)
nes a
ee ,
Preceteecncreit wc)
digitalneite(buzzerPin, HIGH
peer)
Tetons acm)
rcs teatet crete sU maT.
Page 15a Ria LODet
Cees
A Coe We Oe SEA) |
ooo
void printWelcomeMessage()
pecmoteire)
ct
ct
cee
Jed. print(
int duratil
digitalkrite(buzzerPin, HIGH
delay (duration)
digitalurite(buzzerPin, Low)
Page 16