Time Attendance System With RFID Using Arduino, SD Card Module and Real Time Clock

About: Share Knowledge about Arduino, ESP,GSM,Basic Electronics, DIY PROJECTS, Raspberry pi

Attendance has been an indispensable part since the times when professional lives came into existence whether be it schools, offices, colleges and other work places. Attendance marked up as an important record of the people who are at work and also the time according to which the people should be present at work.

This blog is all about building a time attendance system with RFID reader and Arduino. When we swipe an RFID tag next to the RFID reader, it saves the user-id and timing in SD card and it also shows if you are late or according to time and if late then how much late.

The RFID stands for Radio Frequency Identification. The RFID uses electromagnetic field to transmit data over short distances. It is also usefull identify people and make transactions and much more.

Components Required -:

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Making Connections/Schematics

Make connections according to the given schematics. Download schematics

MFRC522 RFID reader pinout

Pin Wiring to ARDUINO UNO

SDA == Digital 10

SCK == Digital 13

MOSI == Digital 11

MISO == Digital 12

IRQ == Don't Connect


RST == Digital 9

3.3V == 3.3 V

RTC module pinout

PIN == Wiring to Arduino Uno

SCL == A5

SDA == A4

VCC == 5V


SD card module pinout

Pin Wiring to Arduino Uno

VCC == 3.3V

CS == Digital 4

MOSI == Digital 11

CLK == Digital 13

MISO == Digital 12


Step 2: Preparing the SD Card

Preparing the SD Card will have the following steps -:

  • Formatting the SD Card as F8032 or F8016

For formatting the SD Card, insert it in your computer and go to "this PC" > right click on the SD Card option and select formatt. A dialogue box will pop-up, Select F8032 from it and press start to initialize the process.

Step 3: Checking and Uploading Code

The code starts from importing the libraries MFRC5224 and RFID reader, SD fro the SD Card module and an RTC lib for the RTC module. Here we also include SPI library for SPI communication with RFID in SD Card module.

  • pins are defined for RFID and SD Card module
  • A file named "My file" is created to store our data.
  • Create an instance for the RFID and the RTC.
  • After this we create a string variable that contains the UID tag.
  • Certain variables are defined to hold the check-in time, hour and minute.
  • We also need to introduce variables to hold the user check-in hour.
  • Now upload code to your Arduino board.

Click here for the code

Step 4: Open Serial Monitor and Check Working

The correct timings to arrive and leave are entered into the code and system or module works automatically.

  • If you are late according to the time set in the code then a red led glow and serial monitor would display "You are late".
  • If you are on time according to the time set in the code then a green led will glow and serial monitor will display " You're Welcome".
  • Here UID's can also be checked and user name can also be displayed.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest