กลับไปหน้ารวมไฟล์
attendance-system-with-arduino-rfid-tag-a41084-en.md

Data Logging: RFID Attendance System

While the RFID Race Timer tracks high-speed athletes, the Attendance System focuses heavily on database management, string parsing, and reliable, long-term non-volatile data storage. It is the perfect project to learn how to write to physical SSD/SD files directly from C++.

stock_counter_lcd_setup_1772706693516.png

Database Array Management

The system must recognize hundreds of employees.

  1. The Hash Table: The Arduino code contains massive arrays connecting UIDs to human names. String userUIDs[3] = {"04EAF12B", "1A2B3C4D", "9F8E7D6C"}; String userNames[3] = {"Alice", "Bob", "Charlie"};
  2. The Scan: Bob taps his white card to the MFRC522 reader module.
  3. The Arduino loops through the userUIDs array. It finds a match at index 1. It knows it's Bob!

Constructing the CSV Log (MicroSD)

The Arduino must save this data permanently so HR can read it on Microsoft Excel.

  • It queries the DS3231 RTC Module to get the timestamp: 2026-10-25 08:55:00.
  • The code uses the native <SD.h> library to open log.csv on the MicroSD card.
  • The Construction: dataFile.print(userNames[1]); dataFile.print(","); dataFile.println(timestamp);
  • Output: The file now securely holds a flawless, un-erasable line Bob, 2026-10-25 08:55:00.
  • The Arduino plays a happy beep, flashes a green LED, and writes "Welcome Bob" to the 16x2 Text LCD.

Necessary Office Hardware

  • Arduino Uno/Nano/Mega.
  • MFRC522 RFID 13.56MHz SPI Module + Keychain Tags.
  • DS3231 RTC I2C Module.
  • MicroSD Card SPI Breakout Module.
  • 16x2 I2C LCD Display.
  • Piezo Buzzer for audio confirmation of a successful scan.

ข้อมูล Frontmatter ดั้งเดิม

title: "Attendance System With Arduino & Rfid Tag"
description: "Clock in automatically! Build a corporate-grade personnel tracking system using the MFRC522 scanner, local SD card logging, and an I2C clock to eliminate paper timesheets."
category: "Security"
difficulty: "Intermediate"