0% found this document useful (0 votes)
34 views3 pages

Smart RFID Door Lock System Guide

Iot exp

Uploaded by

krito.kazuto9919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

Smart RFID Door Lock System Guide

Iot exp

Uploaded by

krito.kazuto9919
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment 8
Student Name: Harinder Singh UID: 22BCS10280
Branch: BE-CSE Section/Group: IOT-606/A
Semester: 5th Date of Performance: 03/10/24
Subject Name: IOT Lab Subject Code: 22CSP-329

1. Aim: To Create a Smart door lock system-using RFID.

2. Objective:
• Prevent unauthorized access by only allowing registered RFID tags.
• Logs access history for auditing who enters and exits.
• Deactivate lost or stolen RFID tags to prevent misuse.
• Keyless entry using RFID cards, tags, or smartphones with NFC.
• Automatic unlocking when an authorized RFID tag is detected.
• Simplified access management—easy to add or remove users.

3. Equipment Used:
• Arduino Uno R3 board
• RFID RC522
• SG-90 Servo Motor
• 16×2 LCD

4. Procedure:
• D0 – D7: Pin number 7-14 are data bus lines that are used to send data
from Arduino which you want to display on LCD. With these 8 data
lines, data can be transferred either in an 8-bit format or in a 4-bit format.
• Contrast Select (VEE): It will help to control the contrast of PIXELS
according to the 16X2
• LCD light.

• RS: This pin is known as a register select pin. It helps to toggle the
command/data register.
• R/W: The signal on this pin will decide whether it is going to read from
LCD or write on it.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
• EN: Enable pin will help to transfer the instruction from the data pins
and another command pin
• to the LCD. It acts as permission to internal registers.
• VSS: It’s a ground pin for common grounds.
• VCC: The power pin will use for voltage input to the 16X2 LCD.

5. Code:
//Arduino Code - RC522 Read RFID Tag UID
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 7
MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class
MFRC522::MIFARE_Key key;
void setup() {
Serial.begin(9600);
SPI.begin(); // Init SPI bus
rfid.PCD_Init(); // Init RC522
}
void loop() {
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when
idle.
if ( ! rfid.PICC_IsNewCardPresent()) return;
// Verify if the NUID has been readed if
( ! rfid.PICC_ReadCardSerial()) return;
MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
Serial.print(F("RFID Tag UID:"));
printHex(rfid.uid.uidByte,
rfid.uid.size); Serial.println("");
rfid.PICC_HaltA(); // Halt PICC
}
//Routine to dump a byte array as hex values to Serial. void
printHex(byte *buffer, byte bufferSize) {
for (byte i = 0; i < bufferSize; i++) {
Serial.print(buffer[i] < 0x10 ? " 0" : " ");
Serial.print(buffer[i], HEX);
}
}

7. Output:
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

8. Conclusion;-
The smart door lock system using RFID successfully meets the objective of
enhancing security by allowing access only to authorized users through RFID
tags. The system ensures keyless entry, logs access history for audit purposes,
and provides flexibility in managing user access. With the use of an Arduino
Uno, RFID reader, and servo motor, the system efficiently locks and unlocks
doors based on RFID tag verification.

You might also like