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.
- RFID-based student identification
- Automatic Check-In / Check-Out
- Calculates total time spent on campus
- Duplicate check-in prevention
- Export attendance records to Excel
- RFID-based student identification
- Book Issue / Return system
- Shows currently issued (unreturned) books
- Export records to Excel
- 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
| 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 |
- ESP32 Development Board
- MFRC522 RFID Reader
- RFID Cards / Tags
- Buzzer
- Jumper Wires
- Breadboard (optional)
- USB Cable
- Computer running Python 3.x
- Python 3.10+
- Arduino IDE
- ESP32 Board Package installed in Arduino IDE
Python libraries are listed in requirements.txt.
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).
RFID-Campus-Management-System
│
├── README.md
├── LICENSE
├── .gitignore
├── requirements.txt
│
├── app/
│ ├── gui.py
│ └── database.py
│
├── firmware/
│ └── rfid_detector.ino
│
├── db/
├── bills/
└── exports/
Clone the repository
git clone https://github.com/<username>/RFID-Campus-Management-System.gitInstall dependencies
pip install -r requirements.txtInitialize the database
python app/database.pyUpload the firmware to the ESP32 using Arduino IDE.
Run the application
python app/gui.pyInside gui.py, modify
ESP_PORT = "COM5"to match the COM port assigned to your ESP32.
Example
ESP_PORT = "COM7"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.
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.
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 |
RFID Card
│
▼
MFRC522 Reader
│
▼
ESP32
│
Bluetooth Serial
│
▼
Python Application
│
SQLite Database
│
▼
GUI / Excel / PDF Reports
- Wi-Fi communication
- MQTT support
- Cloud database
- Multi-device synchronization
- Authentication system
- Analytics dashboard
- Mobile application
- Email bill delivery
This project is licensed under the MIT License.