Skip to content

This repository contains the source code and documentation for a DIY RFID-based access control system built using NodeMCU (ESP8266) microcontroller. The project aims to provide a cost-effective and customizable solution for managing access to secure areas using RFID (Radio-Frequency Identification) technology.

Notifications You must be signed in to change notification settings

VedKathe/RFID-based-access-control-using-nodemcu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

RFID-Based Access Control using NodeMCU

This project implements an RFID-based access control system using NodeMCU (ESP8266) microcontroller, allowing you to control access to secure areas using RFID cards/tags.

Table of Contents

  1. Overview
  2. Prerequisites
  3. Hardware Setup
  4. Web Interface
  5. NodeMCU - RC522 Connection
  6. Node.js API Setup
  7. Usage
  8. License

Overview

This project aims to provide a cost-effective and customizable solution for access control using RFID technology. It combines the power of NodeMCU with the RC522 RFID module to securely manage access to a designated area.

RFID Module

Prerequisites

  • Basic knowledge of Arduino programming.
  • Familiarity with NodeMCU and the Arduino IDE.
  • RC522 RFID module.
  • Access to the Arduino IDE and a compatible USB cable for NodeMCU.

Hardware Setup

Follow these steps to set up the hardware:

  1. Connections: Connect the components as shown in the following Fritzing diagram:

Fritzing Diagram

  1. Assembly: Assemble the components into the access control system, ensuring proper connections and power supply.

Web Interface

The web interface allows you to configure authorized RFID cards/tags and view access logs. Here's a preview:

Web Interface

NodeMCU - RC522 Connection

The table below shows the pin connections between NodeMCU and the RC522 RFID module:

NodeMCU RFID-RC522
D4 SDA
D5 SCK
D7 MOSI
D6 MISO
NOT CONN IRQ
GND GND
D3 RST
3V 3.3V

Node.js API Setup

  1. Clone the repository to your local machine.
  2. Navigate to the "API" folder.
  3. Install the required npm packages by running npm install in the "API" folder.
  4. Edit the "index.js" file to configure your MySQL connection.
  5. Create a MySQL database and two tables using the following queries:
CREATE DATABASE mydatabase;

USE mydatabase;

CREATE TABLE rifds (
  id varchar(100)
);

CREATE TABLE usedata (
  id varchar(100),
  datetime varchar(100)
);

Start the Node.js API by running node index.js in the "API" folder.

Usage

  1. Upload the Arduino code to the NodeMCU using the Arduino IDE.
  2. Configure the system using the web-based interface as explained above.
  3. Connect the RFID reader and electronic lock/gate to the NodeMCU as outlined.
  4. Start managing access to your secure area!

License

This project is licensed under the MIT License.

About

This repository contains the source code and documentation for a DIY RFID-based access control system built using NodeMCU (ESP8266) microcontroller. The project aims to provide a cost-effective and customizable solution for managing access to secure areas using RFID (Radio-Frequency Identification) technology.

Topics

Resources

Stars

Watchers

Forks