RFID based access control system with ESP8266 NodeMCU

ESP8266 25-03-25
49 0

Tutorial plan

1- What is an access control system ?

2- Presentation of RFID based access control system by ESP8266

3- Required Components

4- Circuit Connections of system

5- Micropython program of system

 

 

What is an access control system ?

An access control system is a security mechanism that regulates who or what can enter or exit a specific area, system, or resource. It is commonly used to protect buildings, restricted areas, digital systems, and confidential data.

Types of Access Control Systems

1. Physical Access Control – Controls access to physical locations, such as buildings, offices, or rooms, using devices like:

RFID cards and readers

Keypads and PIN codes

Biometrics (fingerprint, facial recognition)

Smart locks and electronic doors

2. Logical Access Control – Controls access to digital resources, such as:

Computer systems and networks

Files and databases

Cloud services and applications

How It Works

1. Authentication – The system verifies the identity of the user via a credential (e.g., RFID card, password, fingerprint).

2. Authorization – If the credential is valid, the system checks whether the user has permission to access the resource.

3. Access Grant/Denial – If authorized, access is granted; otherwise, access is denied.

4. Logging & Monitoring – The system records access attempts for security auditing.

Examples of Access Control Systems

Office entry systems using RFID badges

Fingerprint-based access to mobile devices

Secure login systems with multi-factor authentication (MFA)

Smart home locks controlled by mobile apps

Presentation of RFID based access control system by ESP8266

An RFID access control system is a security system that uses Radio Frequency Identification (RFID) technology to grant or restrict access to a secured area, device, or system. It works by using RFID tags (such as keycards or fobs) and RFID readers to authenticate users.

Our system uses an RFID card or key fob to authenticate users and either grant or deny access based on a stored list of authorized IDs. The LCD I2C display shows access messages.

How It Works

1- User presents an RFID card/tag to the RC522 RFID reader.

2- RFID reader reads the unique ID (UID) stored in the RFID tag.

3- ESP8266 processes the UID and checks if it matches a list of authorized IDs stored in its memory.

4- If UID is authorized: The LCD displays “Access Granted”

5- If UID is NOT authorized: The LCD displays “Access Denied”

 

Required Components

ESP8266 NodeMCU (Microcontroller)

- Acts as the brain of the system.

- Reads data from the RFID RC-522 module.

- Checks the UID (Unique Identifier) of the RFID tag against stored values.

- Controls LCD I2C display to show messages.

RFID Module RC-522

- Reads the RFID card/tag using radio frequency signals.

- Communicates with ESP8266 via SPI protocol.

- Retrieves UID from the card and sends it to the microcontroller.

RFID Tags or Cards

- Acts as the user identification key.

- Each card has a unique UID (e.g., 0xABC12345).

- When scanned, the UID is sent to ESP8266 for authentication.

LCD I2C Display

- Displays system messages such as "Scan Your Card", "Access Granted", or "Access Denied".

Breadboard:

Breadboard

- Provides a temporary connection for components without soldering.

Jumper Wires:

Jumper wires

- Used to connect ESP8266, RFID module, LCD, relay, buzzer, and LEDs.

Circuit Connections of system

 

RFID-RC522 to ESP8266 NodeMCU connections

RFID-RC522 Pin

ESP8266 NodeMCU Pin

SDA

GPIO 15 (D8)

SCK

GPIO 14 (D5)

MOSI

GPIO 13 (D7)

MISO

GPIO 12 (D6)

GND

GND

RST

GPIO 0 (D3)

3V3

3V3

I2C LCD to ESP8266 NodeMCU connections

LCD I2C Screen Pin

ESP8266 NodeMCU Pin

VCC

VIN

GND

GND

SDA

GPIO 4 (D2)

SCL

GPIO 5 (D1)

 

Micropython program of system

Before running the code, install the necessary libraries:

- MFRC522 (for RFID module)

- i2c_lcd and lcd_api for I2C LCD screen

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info