Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Wednesday, 5 March 2025

How to Build an RFID Door Lock System Using Arduino



Learn how to build an  RFID-based door lock system using an Arduino Uno, an RFID module, and a servo motor. The system scans an RFID card, checks its ID, and unlocks the door if it’s authorized. This setup is useful for home security, office access control, and smart automation projects.

Components Required

  • Arduino Uno (or compatible board)
  • RC522 RFID Module (to read RFID tags)
  • RFID Cards & Key Fobs (for authentication)
  • Servo Motor (to control the lock)
  • Buzzer & LED Indicators (for access feedback)
  • Jumper Wires & Breadboard (for connections)


Components Required to make RFID Door Lock System Using Arduino
Components Required to make RFID Door Lock System Using Arduino

RFID Door Lock System using Arduino Circuit Diagram


Circuit Diagram RFID Door Lock System using Arduino
Circuit Diagram RFID Door Lock System using Arduino

The RFID door lock system works by scanning an RFID card or key fob using the RC522 RFID module. When a card is scanned, the Arduino reads its unique ID and checks if it matches a pre-stored authorized ID. If the card is recognized, the servo motor unlocks the door, allowing access. If the card is not authorized, the system triggers a buzzer and an LED indicator to signal access denial. After a short delay, the lock resets and waits for the next scan, ensuring continuous operation.

Arduino Code to Read RFID Card UID

To find your authorized RFID card UID, compile and upload the code to your Arduino. No hardware modifications are needed.

Complete Hardware Setup of RFID Door Lock System using Arduino
Complete Hardware Setup of RFID Door Lock System using Arduino

Code for RFID Door Lock System using Arduino

This Arduino-based RFID door lock system reads an RFID card’s UID, checks it against a predefined UID, and unlocks the door for 10 seconds using a relay and solenoid lock while displaying the status on an LCD.

Step-by-Step Guide

Step 1: Setting Up the Hardware

Start by assembling the required components. Connect the RC522 RFID module to the Arduino Uno using SPI communication. Attach the relay module and solenoid lock for door control, and connect the LCD display to show access status. Ensure the power supply is stable for reliable operation.

Step 2: Uploading the UID Retrieval Code

To get the unique ID (UID) of your RFID card, compile and upload the UID retrieval code to the Arduino. This step doesn’t require any hardware modifications. Once uploaded, open the Serial Monitor in the Arduino IDE to view the scanned UID.

Step 3: Storing the Authorized UID

After retrieving the UID, update the main code by replacing the default UID with your card’s UID. This ensures that only the authorized card can unlock the door. Save and re-upload the modified code to the Arduino.

Step 4: Implementing the Door Lock System

The main program continuously scans for RFID cards. When a card is detected, the Arduino checks if its UID matches the stored UID. If authorized, the relay activates the solenoid lock, unlocking the door for 10 seconds. Meanwhile, the LCD display updates the door status.

Step 5: Testing and Final Adjustments

Test the system by scanning different RFID cards. If unauthorized, the lock remains closed, and the system displays an access denied message. Adjust the servo angles, delay timings, or security features as needed for better performance.


Final Testing of our RFID Door Lock System
Final Testing of our RFID Door Lock System
Working Demo video : 

Enhancements & Customization

  • Store multiple RFID card IDs for multi-user access.
  • Add an OLED display to show authentication messages.
  • Integrate Wi-Fi or Bluetooth for remote access control.
  • Connect to a database for logging entry records.

This RFID-based door lock system offers a simple yet effective way to manage access control. It can be expanded with additional features to enhance security and functionality. 


Learn more about this tutorial  How to make an RFID Door Lock System using Arduino?

Get the more projects with full code and schematics on our https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|


Wednesday, 7 February 2024

Proximity Sensors: Types and Applications

Proximity sensors are important tools used in industries to detect the presence of objects without needing physical contact. They serve various purposes, including enhancing automation, safety, and efficiency in different applications.


These sensors come in several types:

Inductive Proximity Sensors: Detect metal objects by using electromagnetic induction. They find applications in position sensing, object detection, and automated machinery.

Capacitive Proximity Sensors: Identify a wide range of materials, including conductive and non-conductive substances, by measuring changes in electrical capacitance. They are used in level sensing, liquid detection, and object proximity sensing.

Ultrasonic Proximity Sensors: Utilize sound waves to detect objects and measure their distance by analyzing the time it takes for sound waves to bounce back. They are effective in presence detection, level sensing, and collision avoidance systems.

Photoelectric Proximity Sensors: Use light to detect the presence or absence of objects. They come in various types such as through-beam, retro-reflective, and diffuse reflective, and are widely used in conveyor systems, packaging, and object counting applications.

Magnetic Proximity Sensors: Identify the presence of objects by detecting changes in magnetic fields. They are commonly used in speed sensing, door position detection, and security systems.

Each type of sensor operates differently and has its own unique applications, contributing to the efficiency and safety of industrial processes. Check out the given link to know much more about the different types of proximity sensor.



Tuesday, 21 February 2017

Surveillance Camera using Raspberry and Webcam

This DIY talks about building a simple security system using Raspberry Pi and webcam which captures motion in the area. This is a great and very cheaper security tool, which have many configurable options and can be built in few minutes. Here we are using only Raspberry Pi and a USB web camera to build this Motion Capture camera. We have Raspbian Jessie OS installed on our Raspberry Pi board.



Here is the step by step guide to turn your raspberry pi into a security camera.