RFID Door Lock System using Arduino and RFID Module

Share This

Hello friends! Welcome back to ElectroDuino. This blog is based on RFID Door Lock System using Arduino. Here we will discuss Introduction to RFID Door Lock System using Arduino, Project Concept, Block Diagram, Components Required, Circuit Diagram, working principle, and Arduino code.

Introduction

In the previous age, a normal Lock and key are used to lock the door and gate. But in this modern age, some houses, hotels, offices, and other places are using Electronic door locks systems, these are basically keyless door locks i.e don’t need a key to unlock the door. Several types of access control systems are used in electronic door locks to access the door. The most used access control systems are PIN/Password (Personal Identification Number), fingerprint, and RFID based Electronic door locks systems.

In this project tutorial, we’ll learn how to make RFID based Electronic door locks systems using Arduino and RC522 RFID Module. In this system, you need a particular card or key tag and put it in front of the RFID door locks system box (RFID Reader) to unlock the door. If you put the wrong card or key tag in front of the RFID door locks system box (RFID Reader) then the door would not unlock. This system is also known as the card door lock system or key card door lock system.

 

Project Concept/Overview

The RFID Door Lock System is constructed using 4 major components these are Arduino, RFID Redder Module, RFID Card or Key Fob Tag, IR Sensor, Servo Motor, and LCD Display. Here I’ll use Arduino Nano as the main microcontroller that controls the whole system. You can use any other type of Arduino board like Arduino Uno or Mega. The RFID Redder Module is used to read the Card or Key Tag value and send the value to the Arduino. Then the Arduino matches this value with the pre-defined value in the code. If this value is matched then the microcontroller sends a command to the servo motor to unlock the door. The servo motor is used to control the lock mechanism. The IR sensor is used to check whether the door is open or closed. LCD display shows the RFID value reading status (Card correct or wrong) and the door status (open/close). LEDs and buzzer are used as door status (open/close) indicators.

Block Diagram of RFID Door Lock System using Arduino

Block Diagram of RFID Door Lock System using Arduino. Introduction to RFID Door Lock System using Arduino, Project Concept, Block Diagram, Components Required, Circuit Diagram, working principle, and Arduino code.
Block Diagram of RFID Door Lock System using Arduino

Components Required

Components NameQuantity
Arduino NANO1
RC522 RFID Module1
RFID Card or Key Fob Tag1
IR Sensor Module1
16×2 LCD Display Module1
Sg-90 Servo Motor1
220 ohm Resistor (R1, R2, R3)3
10K ohm Potentiometer (VR1)1
Red LED 1
Green LED 1
5v Buzzer1
9v Power Supply1
Rocker Switch1
PCB board1
Connecting wiresAs required in the circuit diagram

Tools Required

Tools NameQuantity
Soldering Iron1
Soldering wire1
Soldering flux1
Soldering stand1
Multimeter1
Desoldering pump1
Wirecutter1

Software Required

Arduino IDE (Integrated Development Environment)

Arduino IDE (Integrated Development Environment)

Circuit Diagram/Schematic of RFID Door Lock System using Arduino

Circuit Diagram/Schematic of RFID Door Lock System using Arduino. Introduction to RFID Door Lock System using Arduino, Project Concept, Block Diagram, Components Required, Circuit Diagram, working principle, and Arduino code.
Circuit Diagram/Schematic of RFID Door Lock System using Arduino

Working Principle

Initially, the IR sensor module checks whether the door is open or closed. When the door is open the IR sensor produces High (1) output value from the output pin. The Arduino reads this value and understands the door is open, then sends a command to the servo motor to pull back the barrel handle of the sliding lock to unlock the door. This time the LCD display screen shows the message “Door is Open! Close The Door”, and the Red LED starts blinking and the buzzer generates the “Beep Beep” sound. In this condition, the RFID Reader Module does not read the card and key fob tags.

When the door is closed the IR sensor produces Low (0) output value from the output pin. Again the Arduino reads this value and understands the door is closed, then sends a command to the servo motor to push the barrel handle of the sliding lock forward to lock the door. This time the LCD display screen shows the message “Welcome – Scan Your Card>>”, and the Red LED is turned on. In this condition, the RFID Reader Module is Ready to read the card and key fob tags.

When an RFID Card/tag comes in the range of the RFID Reader Module (transceiver), it is scanning the Card/tag and reads the value. Then Arduino Nano board reads this value from the RFID Reader and matches this value with the pre-defined value in the code. Already we have saved the value of the Card/tag in the code.

If the Card/tag value is matched, then the Arduino produces PWM output from Pin 6 to activate the servo motor. Now the servo motor will pull back the barrel handle of the sliding lock to unlock the door. For a few seconds, the LCD display screen shows the message “Welcome, Door is Open”, and the Green LED starts blinking and the buzzer generates the “Beep Beep” sound.

  • After this time if the door is not closed then the LCD display screen shows the message “Door is Open! Close The Door”, and the Red LED starts blinking and the buzzer generates the “Beep Beep” sound.
  • If the door is closed during this time period, then the servo motor pushes the barrel handle of the sliding lock forward to lock the door. Now the system is ready to read the cards again.

If the Card/tag value does not match, then the Arduino doesn’t activate the servo motor. So the door will still be locked. The LCD display screen shows two messages “Wrong Card,  Access Denied! ” then “Please, Try Again!”, Try Again”. Now the Red LED and buzzer will turn ON.

Arduino Code of RFID Door Lock System using Arduino

 

Share This

Leave a Reply

Your email address will not be published.