top ads

RFID BASED ATTENDANCE SYSTEM USING ARDUINO UNO,LCD MODULE AND PYTHON

 

RFID BASED ATTENDANCE SYSTEM USING ARDUINO AND PYTHON

 

INTRODUCTION:

The RFID-based attendance system is a modern and efficient approach to automate the attendance management process. It utilizes Radio Frequency Identification (RFID) technology along with Arduino microcontroller and Python programming to accurately record and store attendance data. This project aims to eliminate the manual process of taking attendance, reducing human error and saving time for both students and instructors. This project not only showcases the application of RFID technology in attendance systems but also highlights the integration of hardware (Arduino) and software (Python) to create an effective and user-friendly solution. It provides a foundation for further enhancements, such as integrating a database or web-based interface for comprehensive attendance management.

COMPONENTS REQUIRED:

Component

Description

Quantity

ARDUINO UNO

Arduino Uno or Arduino Nano

1

RFID READER

MFRC522 or compatible RFID reader module

1

RFID TAG

Unique RFID tags assigned to each student

1

LCD DISPLAY

16x2 or 20x4 character LCD display

1

BUZZER

Small buzzer for providing audible indication

1

JUMPER WIRES

Male-to-male and male-to-female jumper wires

FEW WIRES

RESISTOR

Depending on LCD and buzzer requirements

2

 

BLOCK DIAGRAM:

 

WORKING:

The RFID-based attendance system works by using an RFID reader, LCD display, buzzer, Arduino, and Python script to automate the process of tracking student attendance. Here's a simplified explanation of how the system operates.

When a student approaches the RFID reader with their assigned RFID tag, the reader detects the tag's unique identification code. This information is then sent to the Arduino, which processes it. The Arduino triggers the LCD display to show the student's name and register number, providing a visual representation of the attendance.

Simultaneously, the Arduino activates the buzzer, producing an audible sound to indicate that the RFID tag has been successfully detected. This alerts the user or instructor that attendance has been recorded.

The Arduino also establishes a connection with a computer running a Python script. It transmits the student's attendance information to the Python script via a serial communication link.

The Python script receives the data from the Arduino and extracts the relevant information, such as the student's name and register number. It utilizes the openpyxl library to interact with an Excel file, where the attendance records are stored.

The Python script then writes the extracted attendance information to the Excel file, effectively recording the student's attendance.

In summary, the RFID-based attendance system automates the process of tracking student attendance. It detects RFID tags, displays student information on an LCD display, triggers a buzzer for acknowledgment, and stores the attendance data in an Excel file using Arduino and Python. This streamlines attendance management, eliminates manual effort, and improves accuracy in tracking student attendance.

CODE:

 CODE FOR ARDUINO:

#include<SPI.h>

#include<MFRC522.h>
#include<LiquidCrystal.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 rfid(SS_PIN, RST_PIN);

String rfidCard;
LiquidCrystal lcd(2,3,4,5,6,7);
void returnValue();

void setup() {
  Serial.begin(9600);
  //Serial.println("Starting the RFID Reader...");
  SPI.begin();
  rfid.PCD_Init();
  pinMode(8, OUTPUT);

  lcd.begin(16, 2);  // Initialize the LCD module with 16 columns and 2 rows
  lcd.clear();      // Clear the LCD screen
  lcd.setCursor(0, 0);
  lcd.print("RFID Reader");
  lcd.setCursor(0, 1);
  lcd.print("Ready (Group 4)");
}

void loop() {
  digitalWrite(8,HIGH);
  //rfidCard="172 222 56 99";
  //delay(10000);
 if (rfid.PICC_IsNewCardPresent()) {
    if (rfid.PICC_ReadCardSerial()) {
      rfidCard = String(rfid.uid.uidByte[0]) + " " + String(rfid.uid.uidByte[1]) + " " + String(rfid.uid.uidByte[2]) + " " + String(rfid.uid.uidByte[3]); 
      //Serial.println(rfidCard); 
    

      if (rfidCard == "172 222 56 99") {
        //If Card Is True
        Serial.println("163EC21031");
        lcd.clear();          // Clear the LCD screen
        lcd.setCursor(0, 0);  // Set the cursor to the first line
        lcd.print("163EC21031");
        lcd.setCursor(0, 1);  // Set the cursor to the second line
        lcd.print("Name: Johnson");
        delay(2000);
        returnValue();
        
      } else if(rfidCard == "28 18 52 100") 
      {
         //If Card Is false
        Serial.println("163EC21014");

        lcd.clear();          // Clear the LCD screen
        lcd.setCursor(0, 0);  // Set the cursor to the first line
        lcd.print("163EC21014");
        lcd.setCursor(0, 1);  // Set the cursor to the second line
        lcd.print("Name: Harish");
        
        delay(2000);
        returnValue();
      }
        else {
          
    lcd.clear();      // Clear the LCD screen if no card is present
    lcd.print("Invalid Tag");
  }
    }
    
    rfid.PICC_HaltA();
  }
}



void returnValue(){
 
char returnedValues=Serial.read();
if (returnedValues == 't' && Serial.available() && Serial.read() == 'r' && Serial.available() && Serial.read() == 'u') {
lcd.clear();
lcd.print("Attendance");
lcd.setCursor(0,1);
lcd.print("Stored");
 delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("RFID Reader");
  lcd.setCursor(0, 1);
  lcd.print("Ready");
}
}
Python Code:
import xlwings as xw
from datetime import datetime
import serial

# Open the workbook
wb = xw.Book('C:\\Users\\hp\\Documents\\attedanceliststudents.xlsx')
sht1 = wb.sheets['Sheet1']
ser = serial.Serial('COM9', 9600,timeout=0.1)

def store_data(register_number, name):
    # Find the next available row in column A (register number column)
    empty_row = sht1.cells(sht1.cells.rows.count, 1).end('up').row + 1

    # Store the data in the respective columns
    sht1.cells(empty_row, 1).value = register_number
    sht1.cells(empty_row, 2).value = name
    sht1.cells(empty_row, 3).value = datetime.now().date()
    sht1.cells(empty_row, 4).value = datetime.now().time().strftime('%H:%M:%S')

    # Return the cell address of the stored data
    cell_address = f"A{empty_row}"
    return cell_address

# Input register number and name
#register_number = input("Enter register number: ")
#name = input("Enter name: ")





###############################################################################################################
while True:
    if ser.in_waiting>0:
        register_number = ser.readline().decode().strip()
        print(register_number)
    
   
        
        if(len(register_number)>0):


            if register_number=="163EC21031":
                status=store_data(register_number,"Johnson")
            elif register_number=="163EC21014":
                status=store_data(register_number,"Harish")

            if status is None:
                continue
            else:
                result="tru"
                print("redcord")
                ser.write(result.encode())
                


ADVANTAGES AND DISADVANTAGES:

Advantages of the RFID-Based Attendance System:

  1. Automation: The system automates attendance tracking, reducing manual effort and saving time
  2. Accuracy: RFID technology ensures accurate identification of students, minimizing attendance discrepancies.
  3. Real-time tracking: The system provides real-time attendance data for immediate access and reporting.
  4. Easy implementation: The project uses commonly available components and is relatively easy to set up.
  5. Data analysis: The stored attendance data can be used for analysis, providing insights into attendance patterns.

 

 

Disadvantages of the RFID-Based Attendance System:

  1. RFID tag dependency: Students need to have and carry their RFID tags for accurate attendance recording.
  2. Limited range: RFID technology has a limited range, requiring close proximity between the RFID reader and tags.
  3. Security concerns: There may be security considerations related to the storage and management of student data.

APPLICATIONS:

 

  1. Schools and Universities: Streamlining attendance recording for students.
  2. Corporate Attendance Management: Automating employee attendance tracking.
  3. Events and Conferences: Monitoring attendee presence and access control.
  4. Research Studies and Experiments: Accurately tracking participant involvement.

 

COST OF THE PROJECT:

Component

Cost

Arduino Uno

900/-

RFID Reader And Tag

100/-

Liquid Crystal Display (LCD)

110/-

Buzzer

15/-

Resistor

2/-

Total

1130/-

           

CONCLUSION:

In conclusion, the RFID-based attendance system project successfully developed an automated solution for tracking student attendance. By integrating RFID technology, an Arduino board, an LCD display, a buzzer, and Python programming, the project achieved efficient and accurate attendance management. The system eliminates manual record-keeping, reduces human error, and provides real-time attendance data. It offers a practical and reliable solution for streamlining attendance tracking in various educational and organizational settings.                                                                      

REFERENCE:

https://google.com/

https://chat.openai.com/

https://how2electronics.com/rfid-based-attendance-system-using-arduino/

https://www.topiccenter.live/2024/06/broadband-amplifier-in-depth-guide.html

Post a Comment

0 Comments