Arduino Attendence Logger

28,083

262

25

About: I am an engineer and a maker who loves technology challenges.

Intro: Arduino Attendence Logger

I am always wondering how many hours per month I spend working on my projects. Hopfully I was designing atendance logger for local company and imidiatelly saw potential in this simple logger. First prototype was made with Arduino and was only a proof of concept. Becouse of that company allowed me to share this project.

System that company is using today grew up Arduino's performance and got many more features today.

RFID module was used in initial phase of development. NFC module could be used instead.

Step 1: What You'll Need?

We will need:

- Arduino Mega 2560

- Ethernet Shield W5100 with microSD slot

- Tiny RTC module

- RFID module RC522 with some tags

- 9V PSU and project housing

- Ethernet cable, breadboard and some wires

- LED (green and red or double colored) with 220 ohm resistor

- 8 ohm speaker (or buzzer)

Step 2: Plans

Before westarted with designing our system we set some demands:

- Every employee must be able to have his own tag and must be identified with it.

- For every employee there displaying history must be enabled.

- Hour or arrival and departure from work must be saved. In addition working hours must be calculated from time of arrival and time of departure.

Defining a problem

We can divide problem into three sub problems: identifying employee, saving history and calculating working hours, display of history. First sub problem can be tackled with RFID reader and some tags. Second sub problem, saving history, can be resolved with some kind of external memory module, like SD card. Third one is composed from communication and GUI. These can be resolved with simple Web Server.

Specification

Bloc diagram of our solution is presented in picture above. Central part is Arduino Mega 2560 platform. RFID reader, Ethernet shield and microSD card are connected to Arduino via SPI communication.Tiny RTC module is connected via I2C communication interface. Also we added LED and small speaker for indicating successful card read.

Step 3: Hardware Setup

Picture above is presenting connections among modules. For SPI communication we are using hardware SPI (MISO, MOSI and CLK are all the same, SS pin for Ethernet is on pin 10, for SD card is on pin 4 and for RFID reader is pin 6, and RST pin for RFID is on pin 7). LED is connected to pin 2 and 3, and speaker is connected to pin. Tiny RTC module is connected via I2C module to pins 20 and 21. 9V PSU is connected to Arduino’s external PSU connector. Ethernet shield is connected to computer (or router) via UTP cable.

Step 4: Arduino Code

Flowchart above is presenting, how code should work. We wrote Web Server from examples in Ethernet library. The rest of the code is from RFID library example, SD library example and RTC library example.

We designed web interface in Notepad++ using HTML and some CSS code. Code is well documented, therefore I won’t do this once again.

Step 5: Testing RFID Data Logger With Web Server

We tested all three desired functions: we can now read RFID tag, identify it, store time of arrival, time of departure and working hours of an employee. We made a short video of our system in action.

Step 6: Conclusion

In the end we made a validation of our demands. Here are results:

- We can identify an employee with a RFID tag.

- We can display history for employees.

- We can store time of arrival, time of departure and working hours within a month.

From results from validation we can conclude that project was carried out successfully. Project served us as a platform for application that is daily in use in local company.

Share

    Recommendations

    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest
    • Audio Contest 2018

      Audio Contest 2018

    25 Discussions

    0
    None
    Aung Win Htut

    4 weeks ago

    My dear friend, I am trying to connect both sd card reader and RFID reader at the same time with SPI protocol. But it is not working for me. Please let me know the solution.

    0
    None
    LukasG16

    3 months ago

    I can't change UID when I try to scan it just denying it.

    0
    None
    KushalS13

    1 year ago

    Can you help with more rfid cards to be logged in SD card.

    0
    None
    vica070808

    1 year ago

    Hi guys, i need help for arduino UNO. i can't use this script

    1 reply
    0
    None
    vonPongracvica070808

    Reply 1 year ago

    It is too big for Arduino Uno. My initial plan was to use Uno, but there was not enough Flash memory.

    0
    None
    Rookie89

    1 year ago

    Hi Guys,
    I've been searching for a totorial of an portable RFID attendance logger, with obviously only SD card for storing data. Any help or suggestions?

    0
    None
    NicoD6

    2 years ago

    Hi sir, I think this schematic is wrong? Why is the 3.3v on the mega is connected to the grounds of rfid and ethernet sd shield?

    0
    None
    LukasG16

    2 years ago

    how do i get the website up?

    0
    None
    LithanA

    2 years ago

    I've tried to do the same with uno but when i plug the rc522 as spi slave, nothing works...no rfid readings...any help ?

    2 replies
    0
    None
    cnadeau3LithanA

    Reply 2 years ago

    The Ethernet and the RFID reader are using the same pins( 50, 51,52) which are somewhere in the library. I gave up trying to find them so, I plugged the Ethernet Shield into a Uno and used a mega for the RFID reader. But to connect these two boards together you need to use pins 20 and 21 of the Mega which are used by the RTC module, which i gave up using as well. Unless you can find where you can change the pins, 50, 51 and 52 in the library, I have no idea how else this will work. As for the library for the RFID reader, I just created and Integer that reads and remembers the chip data, if you want to print them you have to manually enter the 8 digit number it will give you to the serial monitor or were ever else you want it. I hope this helped a little, but its all i got.

    0
    None
    vonPongraccnadeau3

    Reply 2 years ago

    They both should use SPI pins (those that you have listed). Only difference is Chip Select pins (Ethernet is using pin 10 and RFID is using pin 6). There is no need to change them since both Ethernet Shield and RFID module are using SPI library.

    0
    None
    cnadeau3

    2 years ago

    How did you get your RFID reader to work? also were do you enter the library for the RFID chips? Please help

    Can I use my Intel Galileo Gen 2? It has an ethernet and a micro SD card slot.

    0
    None
    DavezDesignz

    3 years ago on Introduction

    I have run into a problem with this... here is the log as you can see it added more hours than it should have... 2nd line from 21:44 to 0:1 == 21 hours 43 mins?

    8-22-2015 19:33, 21:44, 2:11, 20;
    8-22-2015 21:44, 0:1, 21:43, 42;
    8-23-2015 0:1, 0:27, 0:26, 42;

    does anyone know what the problem could be?

    0
    None
    DavezDesignzvonPongrac

    Reply 3 years ago

    ok thank you I will have to check it out ... I have an 1284p chip somewhere I will have to check if that will work... I wasn't thinking of the size of the sketch just the pins

    0
    None
    DavezDesignzDavezDesignz

    Reply 3 years ago

    well I was able to try this out but had some differences with my setup to get it working properly ... I am going to make some changes and see about using a esp8266 for wireless instead and would like to add a screen for some status messafes(preferably with micro SD slot) ... would be nice to save clock in values in case of loss of power as well ... I'm going to try the project as is later but using the ethernet2 library to see if that shrinks the code enough to fit it on an uno or pro micro ... nice job on this project!

    0
    None
    jpsimmonds

    3 years ago on Introduction

    If you wanted longer data logging, perhaps something as shown in this projected on Freetronics

    http://forum.freetronics.com/viewtopic.php?f=6&t=5361

    Personally I am building something similar, but much more complicated and many more features using RFID, NFC & Bluetooth, although it may require multiple bluetooth connections to achieve what I want, but we will see

    Very nice project. Only 1 thing that doesn't make sense. I've figured the Ethernet shield is not mounted on the mega unless you remove some of the pins on the shield. The power connections from the mega to Ethernet shield is wrong in the schematic I would say, or I'm I missing something? Also, the rfid reader's 3.3v pin would go to the mega and not the shield to get the voltage?