Smart RFID Access Control System Using ESP32 Dev Board and UHF RFID Reader Module

 

Smart RFID Access Control System using ESP32 Dev Board and UHF RFID Reader Module

This project demonstrates a smart RFID-based access control system built using an ESP32 development board, UHF RFID reader, 16x2 LCD display, buzzer, and LED indicator. It provides secure identification and authentication for smart homes, offices, warehouses, and industrial automation environments.

The system verifies RFID tag data and provides real-time visual and audio feedback for access approval or denial.


 How the System Works

  1. The UHF RFID Reader Module scans RFID tags within range.

  2. Tag data is transmitted to the ESP32 Dev Board via UART (Serial2).

  3. The ESP32 compares the tag ID with stored authorized credentials.

  4. If authorized:

    • LCD displays “Access Granted”

    • LED turns ON

    • Buzzer gives confirmation beep

  5. If unauthorized:

    • LCD displays “Access Denied”

    • Warning buzzer tone activates


 Key Components Used

  • ESP32 Dev Board (WiFi + Bluetooth enabled)

  • UHF RFID Reader Module

  • 16x2 LCD Display (I2C – 0x27)

  • Buzzer

  • LED with 220Ω resistor

  • Breadboard & jumper wires


 Pin Configuration

ComponentESP32 Pin
RFID RXGPIO17
RFID TXGPIO16
LEDGPIO2
BuzzerGPIO4
LCD SDAGPIO21
LCD SCLGPIO22

 System Operation Flow

RFID Tag Scanned

ESP32 Reads Tag ID

Check Authorization
↓ ↓
Authorized Unauthorized
↓ ↓
LED ON Warning Tone
Beep Access Denied
LCD Display LCD Display

 Key Features

✔ Long-range UHF RFID detection
✔ Real-time LCD status display
✔ Audio + visual feedback
✔ Secure authentication logic
✔ WiFi & Bluetooth capability
✔ Expandable cloud integration
✔ Low power consumption
✔ Industrial-ready design


IoT Expansion Possibilities

Since the ESP32 Dev Board supports WiFi:

  • Cloud-based access logging

  • Mobile app notifications

  • Google Sheets attendance tracking

  • Web dashboard monitoring

  • MQTT server integration

  • Firebase database storage


 Applications

  • Smart door lock systems

  • Office employee attendance tracking

  • Warehouse inventory authentication

  • Parking management systems

  • Asset tracking

  • Industrial security automation

  • Smart hostel entry system

  • School ID authentication system


 Educational Value

This project helps students learn:

  • UART communication on ESP32

  • RFID technology basics

  • I2C LCD interfacing

  • Authentication logic

  • Embedded security systems

  • IoT integration concepts

Perfect for:

  • Engineering final-year projects

  • IoT & Embedded Systems labs

  • Polytechnic diploma projects

  • Smart city innovation models

  • Science exhibitions


 Project Advantages

  • Scalable authentication system

  • Supports multiple tag IDs

  • Wireless IoT-ready platform

  • Real-time monitoring

  • Easy to upgrade with:

    • Relay module (for door lock control)

    • Servo motor (automatic door)

    • Cloud database

    • Face recognition integration

Code:

/*
 * Smart RFID Access Control System
 *
 * This Arduino sketch is designed for an ESP32-based smart RFID access control
 * system. It interfaces with a UHF RFID reader to detect RFID tags, controls
 * an LED to indicate access status, and uses a buzzer for audio feedback. The
 * system also includes a 16x2 I2C LCD to display messages.
 *
 * Connections:
 * - UHF RFID: RX to GPIO17, TX to GPIO16, VCC to V, GND to G
 * - LED: Anode to GPIO2, Cathode through 220 Ohm resistor to G
 * - Buzzer: PIN to GPIO4, GND to G
 * - LCD: SDA to GPIO21, SCL to GPIO22, VCC to V, GND to G
 */

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

#define RFID_RX_PIN 17
#define RFID_TX_PIN 16
#define LED_PIN 2
#define BUZZER_PIN 4
#define LCD_ADDRESS 0x27
#define LCD_COLUMNS 16
#define LCD_ROWS 2

LiquidCrystal_I2C lcd(LCD_ADDRESS, LCD_COLUMNS, LCD_ROWS);

void setup() {
  Serial.begin(9600);
  Serial2.begin(9600, SERIAL_8N1, RFID_RX_PIN, RFID_TX_PIN);
 
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);
 
  lcd.begin();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("RFID Access");
  lcd.setCursor(0, 1);
  lcd.print("System Ready");
 
  delay(2000);
  lcd.clear();
}

void loop() {
  if (Serial2.available() > 0) {
    String rfidTag = Serial2.readStringUntil('\n');
    rfidTag.trim();
   
    if (isAuthorized(rfidTag)) {
      grantAccess();
    } else {
      denyAccess();
    }
  }
}

bool isAuthorized(String tag) {
  // Replace with actual authorized tag IDs
  return (tag == "1234567890");
}

void grantAccess() {
  digitalWrite(LED_PIN, HIGH);
  tone(BUZZER_PIN, 1000, 500);
  lcd.setCursor(0, 0);
  lcd.print("Access Granted");
  delay(2000);
  digitalWrite(LED_PIN, LOW);
  lcd.clear();
}

void denyAccess() {
  tone(BUZZER_PIN, 500, 500);
  lcd.setCursor(0, 0);
  lcd.print("Access Denied");
  delay(2000);
  lcd.clear();
}


 How the System Works

  1. The UHF RFID reader scans RFID tags within range.

  2. Tag data is transmitted to the ESP32 microcontroller.

  3. The ESP32 verifies the tag ID against stored credentials.

  4. If authorized:

    • LCD displays “Access Granted”

    • LED turns ON

    • Buzzer gives confirmation beep

  5. If unauthorized:

    • LCD displays “Access Denied”

    • Buzzer alerts warning


 Key Features

  • Long-range UHF RFID tag detection

  • Real-time LCD status display

  • Audio and visual access indicators

  • Secure authentication system

  • WiFi/Bluetooth capability for IoT integration

  • Expandable for cloud-based access logging


 Applications

  • Smart door access control systems

  • Warehouse inventory tracking

  • Employee attendance systems

  • Parking management systems

  • Asset tracking solutions

  • Industrial security automation


 Project Advantages

This ESP32 RFID access control system is scalable, secure, and ideal for IoT-enabled security solutions. With wireless connectivity support, it can be integrated with cloud dashboards, mobile apps, or centralized monitoring platforms for advanced automation.

 

IOT & SMART SYSTEM PROJECTS

  1. IoT Weather Monitoring System (NodeMCU ESP8266 + DHT11 + Rain Sensor)
  2. ESP8266 NodeMCU Smart Health & Environment Monitoring System with Pulse, Temperature and Motion Sensors
  3. ESP32 Wi-Fi Weight Sensor with HX711
  4. Smart RFID Access Control System Using ESP32 Dev Board and UHF RFID Reader Module
  5. Smart IoT Motor Control System Using ESP32 Dev Board and L298N Motor Driver Module
  6. Smart Waste Management System Using Arduino Nano, Ultrasonic Sensor & GSM Module – Solar Powered IoT Solution
  7. Raspberry Pi Zero W and GSM SIM900 Based Ultrasonic Distance Measurement System
  8. Arduino UNO Smart Surveillance System with ESP8266 WiFi, PIR Motion Sensor & Camera Module
  9. Arduino UNO Environmental Monitoring System with OLED & 16x2 I2C LCD Display
  10. Arduino UNO-Based Smart Home Automation System with Flame and IR Sensors 
  11. Arduino Nano-Based Landslide Detection System with GSM Alerts – Smart Disaster Monitoring Project
  12. Arduino Nano Rain-Sensing Stepper Motor System
  13. Arduino Based Automatic Tire Inflator Using Pressure Sensor, Relay Module and LCD Display
  14. Arduino-Based Automatic Cooker Using Servo Motors, DC Stirrer Motor, Temperature Sensor and Relay-Controlled Heater
  15. Arduino Sketch for Plastic Bottle and Can Reverse Vending Machine

 TRAFFIC & SMART CITY PROJECTS
  1. RFID-Based Smart Traffic Control System (Arduino Mega)
  2. Arduino UNO Traffic Light Control System – Smart LED Signal Project
  3.  Arduino UNO Controlled Traffic Light System with Joystick Interface

ROBOTICS PROJECTS
  1. Arduino UNO Smart Obstacle Avoiding Robot (Ultrasonic + IR + GSM)
  2. Arduino-Powered Autonomous Obstacle Avoidance Robot with Servo Control
  3. Arduino Nano Bluetooth Controlled Line Follower Robot Using L298N Motor Driver
  4. Arduino UNO Bluetooth Controlled 4WD Robot Car Using L298N Motor Driver
  5. Arduino UNO Multi-Sensor Obstacle Avoidance & Bluetooth Controlled Robot Car Using L298N
  6. Raspberry Pi Motor Control Robot (L298N + Li-ion)
  7. RC Car Simulation with L298N Motor Driver and Joystick Control using Arduino (CirkitDesign Simulation)
  8. Raspberry Pi Robotic Arm Control System with Camera Module and Motor Driver – Smart Automation & Vision-Based Robotics Project
  9. ESP32-Based 4WD Robot Car Using Dual L298N Motor Drivers – Circuit Diagram and IoT Control Project

LORA & WIRELESS COMMUNICATION PROJECTS
  1. Arduino LoRa Communication Project Using Adafruit RFM95W LoRa RadioArduino Nano with RFM95 SX1276 LoRa
  2. Arduino Nano with RFM95 LoRa SX1276 Module – Long Range Wireless Communication Project
  3. Arduino Nano Digital Clock Using DS3231 RTC and TM1637 4-Digit Display – Circuit Diagram and Project Guide

 LED, LIGHTING & DISPLAY PROJECTS
  1. Arduino UNO Controlled NeoPixel Ring Light Show
  2. Wi-Fi Controlled NeoPixel Ring (ESP8266)
  3. Chained NeoPixel Rings with Arduino – Addressable RGB LED Control Project
  4. Arduino Nano-Controlled Lighting System with Gesture and Sound Interaction
  5. Raspberry Pi GPIO Multi-LED Control System – Beginner-Friendly Embedded Electronics Project
  6. 4 Channel Relay Module with Arduino UNO

 SENSOR & DETECTION PROJECTS
  1. Arduino UNO Color Sensor + Proximity System (TCS3200 + Inductive)
  2. Arduino Color Detection Project Using Adafruit TCS34725 RGB Color Sensor
  3. Arduino Gas Leakage Detection and Safety Alert System Using MQ-2 Gas Sensor
  4. MQ-135 Air Quality Detector Using Arduino | Cirkit Designer Simulation Project
  5. Pulse Sensor Using Arduino – Complete Guide with Simulation 
  6. HX711 Load Sensor Demo Using Arduino | Digital Weight Measurement Project
  7. Track Time with DS1307 RTC and Display on Arduino Uno with 16x2 LCD | Cirkit Designer Project
  8. Parking Sensor Simulator using Arduino Uno and HC-SR04 Ultrasonic Sensor

 FUN & INTERACTIVE PROJECTS
  1. Pong Game with Arduino UNO and OLED Display – Project Explanation
  2.   Arduino UNO Bluetooth-Controlled Servo Motor System
  3. Arduino UNO-Based Interactive Touch and Distance Sensing System with LED Indicators and Servo Control

 INDUSTRIAL / AUTOMATION PROJECTS
  1. Arduino UNO Smart Waste Sorting System Using Ultrasonic Sensor, Moisture Sensor, Servo, Stepper Motor and LCD
  2. Arduino-Based Smart Waste Segregation System Using Metal, Plastic and Moisture Sensors with Stepper and Servo Control
  3. ESP32-Based Digital Weighing Scale Using 50kg Load Cell, HX711 Module and 16x2 LCD Display
  4. Arduino-Based Smart Toll Gate Automation System with RFID, GSM, Ultrasonic Sensor and LCD Display

  5. Arduino-Based Automatic Pill Dispenser Machine with LCD Display, Servo Motor and Buzzer Reminder

  6. Arduino UNO Smart Water Quality Monitoring System with pH Sensor, Turbidity Sensor and LCD Display

  7. Arduino-Based Ocean Cleaning Boat Robot with Dual IBT-2 Motor Drivers and Conveyor Belt System

  8. IoT-Based Accident Detection and Health Monitoring System Using Raspberry Pi with GSM, GPS and Camera Integration

  9. Raspberry Pi RFID and Keypad Based Smart Door Lock System with LCD Display and L298N Motor Driver

  10. Smart Shopping Trolley Using Arduino UNO & RFID | Automatic Billing System

  11. Arduino UNO Based Automatic Liquid Hand Sanitizer & Soap Dispenser System

  12. Arduino Based Robotic Weeding Machine with Ultrasonic Obstacle Detection and L298N Motor Driver

  13. Arduino UNO Based Biometric Electronic Voting System with LCD Display and Fingerprint Authentication

  14. Arduino UNO Based Electronic Voting System with ILI9341 TFT Display

Comments