How to Build an RFID Attendance System

An RFID attendance system replaces the messy paper register with a quick tap of a card, and it is one of the most practical electronics projects for schools, labs, and small offices. This guide builds a complete system end to end. If matching the reader to the right board and cards feels fiddly, Compoden's AI build assistant can ship the whole kit with sample code already set up.

What you'll build

A standalone attendance terminal. Each person carries an RFID card or tag; tapping it on the reader records their ID with a timestamp. The system shows a confirmation on a small display, makes a short beep, and stores the record so you can pull a register later. An ESP32 version can push records to the cloud automatically.

Parts you need (rough BOM)

  • Arduino Uno or an ESP32 (ESP32 if you want Wi-Fi logging)
  • RC522 RFID reader module (13.56MHz)
  • A pack of RFID cards and key tags
  • 16x2 I2C LCD or a small OLED display
  • Active buzzer for tap feedback
  • Real-time clock module (DS3231) for accurate timestamps
  • MicroSD card module for local logging (Arduino version)
  • Breadboard, jumper wires, and a 5V supply

How it works

Each RFID card holds a unique ID. When a card enters the reader's field, the RC522 powers it and reads that ID over SPI. The microcontroller checks the ID against a known list, looks up the person's name, fetches the current time from the RTC, and writes a record. Feedback goes to the display and buzzer so the user knows the tap registered.

Wiring overview

The RC522 communicates over SPI: connect SDA, SCK, MOSI, MISO, and RST to the matching SPI pins, and power it from 3.3V, not 5V. The I2C display and the DS3231 RTC share the I2C bus (SDA and SCL). The buzzer goes to any spare digital pin. On an Arduino build, the SD card module also sits on the SPI bus with its own chip-select pin. Keep grounds common.

Build steps

  1. Wire the RC522 first and run a sketch that prints any card's UID to the serial monitor.
  2. Record the UIDs of each card and map them to names in your code.
  3. Add the I2C display and show a simple welcome message.
  4. Wire the RTC and set the correct date and time once.
  5. Add the buzzer and SD card (or Wi-Fi upload on ESP32).
  6. Combine everything: read card, look up name, fetch time, log, and confirm.
  7. Test with several cards, including an unknown one to confirm it is rejected.
  8. Mount the parts in an enclosure with the reader and display facing out.

Code outline

  • Initialise SPI, the RC522, the display, and the RTC in setup().
  • In loop(), poll for a new card; if none, do nothing.
  • Read the UID and compare it against your stored list.
  • On a match, read the RTC time and build a record string.
  • Write the record to the SD card or send it to the cloud.
  • Show the name on the display and beep, then add a short delay to avoid double scans.

Troubleshooting

If the reader never detects a card, confirm it is powered from 3.3V and that all SPI pins are correct, because the RC522 is unforgiving about wiring. If cards read intermittently, hold them flatter and closer; range is short by design. Wrong timestamps mean the RTC battery is dead or the time was never set. If the SD log is empty, check the chip-select pin and that the card is formatted FAT32.

Going further

Add a web dashboard on the ESP32 so staff can view and export attendance from a browser. You can send a daily summary by email, flag late arrivals, or add a second reader for entry and exit times. For larger deployments, store records in a small database instead of a flat file.

Build it with Compoden's AI

Describe an attendance system to Compoden's AI build assistant and it matches a kit with the RC522, cards, display, RTC, and logging module, then ships sample code that already prints UIDs and writes records. You avoid the common 3.3V wiring mistakes and start from a working base. Browse parts at /collections/all.

Ready to retire the paper register? Tell Compoden's AI what you need and build your attendance terminal this week.

FAQ

Can I register new cards without reflashing the code? Yes. Add an admin card that puts the system into enrolment mode, then store new UIDs and names to the SD card or memory so you never recompile.

Why does my RC522 only work on 3.3V? The module's chip is rated for 3.3V logic. Feeding it 5V can damage it, though its input pins usually tolerate 5V signals from the microcontroller.

Do I need internet for this to work? No. The Arduino version logs locally to an SD card. Internet is only needed if you choose the ESP32 cloud-upload option.

Back to blog