Skip to content

About

RFID-based campus management system integrating attendance tracking, library management, and cafeteria billing using ESP32, MFRC522, Python, Tkinter, and SQLite. Supports real-time RFID scanning, Excel exports, and PDF bill generation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RFID-Based Multi-Module Campus Management System

Python SQLite ESP32 Arduino License

A desktop-based RFID-enabled campus management system that integrates attendance tracking, library management, and cafeteria billing into a single application.

The project combines embedded systems, wireless communication, database management, GUI development, and document generation to simulate a lightweight campus ERP.


Features

Attendance Module

  • RFID-based student identification
  • Automatic Check-In / Check-Out
  • Calculates total time spent on campus
  • Duplicate check-in prevention
  • Export attendance records to Excel

Library Module

  • RFID-based student identification
  • Book Issue / Return system
  • Shows currently issued (unreturned) books
  • Export records to Excel

Cafeteria Module

  • RFID-based ordering
  • Multiple items per student
  • Automatic bill calculation
  • Individual PDF bill generation
  • Bulk bill generation for all students
  • Export cafeteria records to Excel

Technologies Used

Component Technology
Programming Language Python
GUI Tkinter
Database SQLite
Serial Communication PySerial
Data Processing Pandas
PDF Generation ReportLab
Microcontroller ESP32
RFID Reader MFRC522
Firmware Arduino IDE

Hardware Requirements

  • ESP32 Development Board
  • MFRC522 RFID Reader
  • RFID Cards / Tags
  • Buzzer
  • Jumper Wires
  • Breadboard (optional)
  • USB Cable
  • Computer running Python 3.x

Software Requirements

  • Python 3.10+
  • Arduino IDE
  • ESP32 Board Package installed in Arduino IDE

Python libraries are listed in requirements.txt.


Hardware Connections

Connect the MFRC522 to the ESP32 as follows:

MFRC522 Pin ESP32 Pin
SDA (SS) GPIO 5
SCK GPIO 18
MOSI GPIO 23
MISO GPIO 19
RST GPIO 22
3.3V 3.3V
GND GND

Buzzer connection:

Buzzer Pin ESP32
Positive GPIO 2
Negative GND

These connections match the provided firmware (rfid_detector.ino).


Project Structure

RFID-Campus-Management-System
│
├── README.md
├── LICENSE
├── .gitignore
├── requirements.txt
│
├── app/
│   ├── gui.py
│   └── database.py
│
├── firmware/
│   └── rfid_detector.ino
│
├── db/
├── bills/
└── exports/

Installation

Clone the repository

git clone https://github.com/<username>/RFID-Campus-Management-System.git

Install dependencies

pip install -r requirements.txt

Initialize the database

python app/database.py

Upload the firmware to the ESP32 using Arduino IDE.

Run the application

python app/gui.py

Configuration

COM Port

Inside gui.py, modify

ESP_PORT = "COM5"

to match the COM port assigned to your ESP32.

Example

ESP_PORT = "COM7"

Bill Storage Location

The current implementation stores generated bills in a user-defined folder.

It is recommended to replace any hardcoded path with

os.path.join(os.getcwd(), "bills")

This ensures generated PDF bills are saved inside the repository's bills/ folder regardless of the operating system.


Export Location

Attendance, library, and cafeteria records are exported as Excel files.

For portability, it is recommended to save exported files relative to the project directory, for example:

exports/
    attendance.xlsx
    library.xlsx
    cafeteria.xlsx

instead of using absolute Windows paths.


Database

The application creates four SQLite tables automatically.

Table Purpose
students Student information and RFID UID mapping
attendance Check-In / Check-Out records
library_records Book Issue / Return history
cafeteria_records Food orders and billing

System Workflow

RFID Card
     │
     ▼
MFRC522 Reader
     │
     ▼
ESP32
     │
Bluetooth Serial
     │
     ▼
Python Application
     │
SQLite Database
     │
     ▼
GUI / Excel / PDF Reports

Future Improvements

  • Wi-Fi communication
  • MQTT support
  • Cloud database
  • Multi-device synchronization
  • Authentication system
  • Analytics dashboard
  • Mobile application
  • Email bill delivery

License

This project is licensed under the MIT License.

About

RFID-based campus management system integrating attendance tracking, library management, and cafeteria billing using ESP32, MFRC522, Python, Tkinter, and SQLite. Supports real-time RFID scanning, Excel exports, and PDF bill generation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages