Skip to content

Muthukuttan/Access-Control-system-Using-RFID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

📘 RFID-Based Access Control System (LPC21xx)

A simple and efficient RFID-based Access Control System built using the LPC2129 microcontroller. This project reads RFID card data via UART, verifies it against a predefined list, and controls a door mechanism using a motor while displaying status messages on an LCD.


🚀 Features

  • 📡 Reads RFID card data via UART
  • ✅ Validates card against stored authorized IDs
  • ❌ Displays Access Denied for unauthorized users
  • 🔓 Opens door for authorized access
  • 🔒 Automatically closes door after a delay
  • 📟 LCD interface for real-time feedback
  • ⚙️ Motor control using GPIO pins

🛠️ Hardware Requirements

  • LPC2129 Microcontroller
  • RFID Reader (UART-based, e.g., EM-18)
  • 16x2 LCD Display
  • Motor / Door Lock Mechanism
  • Motor Driver (L293D or similar)
  • Power Supply
  • Connecting wires

💻 Software Requirements

  • Embedded C (Keil / GCC ARM)
  • Flashing tool (Flash Magic or similar)

📂 Project Structure

RFID_Access_Control/
├── main.c             # Main application code
├── display_driver.h   # LCD driver header
├── delay.c            # Timing utilities
└── README.md          # Project documentation

⚙️ Working Principle

  • System initializes UART and LCD
  • LCD displays: "WAVE THE CARD"
  • RFID reader sends 12-byte card ID via UART
  • Microcontroller stores received data
  • Compares scanned ID with stored authorized IDs

✅ If Match Found:

  • Displays ACCESS APPROVED
  • Opens door (motor rotates forward)
  • Waits for a few seconds
  • Closes door (motor rotates reverse)

❌ If No Match:

  • Displays ACCESS DENIED

🧠 Code Highlights

📌 RFID Data Storage

UC8 rfid_data[5][14] = {
    "030067849F7A",
    "477326494638",
    "478326494638",
    "478326494637",
    "06003B683762"
};

📌 RFID Comparison

if (strcmp(rfid_dat, rfid_data[i]) == 0)

📌 Motor Control

IOSET0 = a;   // rotate forward
IOCLR0 = b;

IOSET0 = b;   // rotate reverse
IOCLR0 = a;

🔌 Pin Configuration

Component Pin
Motor A P0.12
Motor B P0.13
UART RX P0.0
UART TX P0.1

📟 LCD Messages

WAVE THE CARD
ACCESS DENIED
ACCESS APPROVED
DOOR IS OPENING
DOOR IS OPEN
DOOR IS CLOSING

🧪 How to Run

  1. Compile the code using Keil or GCC
  2. Generate the .hex file
  3. Flash the code to LPC21xx using Flash Magic
  4. Connect RFID reader, LCD, and motor driver
  5. Power ON the system
  6. Scan RFID card to test functionality

📌 Key Highlights

  • UART-based RFID communication
  • Real-time access validation system
  • Embedded motor control for door mechanism
  • LCD-based user interaction
  • Simple and efficient embedded design

👨‍💻 Author

Amal Leven

About

A simple RFID-based Access Control System built using an LPC2129 microcontroller. The system verifies RFID card IDs and controls a door (via motor) while displaying status messages on an LCD.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages