Attendance Record System

I have been given a task to build an attendance system for staff. The requirements are quite straight-forward. It needs to be standalone (without computer), fingerprint is preferred, record real time and the record should be in SD card.

1.0 Introduction

There has been various kinds of attendance record system in the market, RFID-based, fingerprint scanning-based and barcode-based, etc. Talking about this attendance system, you may think that it is quite complex and hard to build it. However, after you read this article, it might change your perception. In this tutorial, we are going to demonstrate how to make a simple attendance system using Cytron current on-sale product including Arduino Mega board, SM630 fingerprint module, Breakout Board Micro SD and other devices such as LCD display shield and RTC (Real Time Clock).

1.1 Feature

The objective of this tutorial is to build an example of  standalone attendance record system.

Below are the features of the system:

  • built using Arduino Mega 2560 main board 
  • utilizes SM630 fingerprint module for fingerprint scanning purpose and extra storage.
  • utilizes embedded microSD slot on Breakout Board Micro SD  to store attendance information which can be easily accessed by user.
  • includes LCD Keypad shield that displays time and attendance information.It also contains 5 buttons (not including reset button) in which the user can use them as navigation buttons.
  • includes RTC module to store real date and clock time information.
  • includes other device such as buzzer as indicator.

2.0 Getting Started

2.1 Components

The components you need:

Electronic components:


Fingerprint module UART connection:

RTC Module System:

  • 1 x Arduino Type Header pin

BreakoutBroad Micro SD:

  • 1 x Arduino Type Header pin

2.2 Basic Connection:

The system is built by stacking up the main board and shields as shown below.


Before stacking up, we need build a circuit consists of all necessary systems on prototyping shield.

prototype circuit




2.22 Indicator

In this project, we add a buzzer in the system to indicate the completion of attendance record process. For example, one beep sound indicates login success and 2 beep sounds means logout. If there are 3 beep sounds, error occurs such as improper installation of microSD card, unfound employee fingerprint, etc.

In the circuit, user just needs to connect one leg (longer leg) of buzzer to 5V and another to GND.

User can customize their own indicator systems. User can even include some visual indicatiors like LEDs.


2.23 Fingerprint Module UART Connection

The figure below shows the connection between the connector and Arduino prototyping shield.


2.24 RTC module 

User can either directly solder the module to prototyping shield or solder a 5 pin or 6 pin header on the shield for easy removal of the module like we did.  This RTC module stores current time information with the power of a coin cell lithium battery.

Note**: Removal of the battery will instantly erase the information stored and reset the time. Handle with care!

We are going to use 4 pins only :VCC, SCL, SDA and GND. Leave others as not connected.


You can either use jumper wires to connect to the legs of female header pin, or solder 2 wires onto the board as SDA and SCL wires.


Connect the SDA wire to pin 20 and SCL to pin21. There should labels for you as guidance.


While inserting battery, make sure the side of battery with “+” sign attached to the surface of coin cell holder with “+” sign.


3.0 Programming

Below is the flow diagram sketch of the designed system. The full sketch can be downloaded here.


Basically the programming involves 4 major parts:

  • fingerprint scanning process and teaching process
  • information storing and accessing with fingerprint module and micro SD,
  • time settings and display
  • menu interface for time setup, fingerprint teaching ,etc.


How does SM630 Fingerprint module work? It is using packet data communication. If we wants the module to carry out some operations, we need to send a string of bytes in serial to the device ascommand. After the device receives the data bytes, it will send back a string of bytes in serial asresponse. It is our job to do some programming to ‘write’ and  ‘read’ these bytes to determine the outcome of the device.

Generally the communication packet includes the following:

  • packet head – 2 bytes
  • packet flag – 1 byte
  • packet length – 1 byte
  • packet content – N bytes
  • checksum – 1 byte

Let say we want to add fingerprint at position(id) 2, what should we send?

  • packet head : 0x4D and 0x58
  • packet flag: 0x01 (command)
  • packet length:adding operation requires 3 data bytes for packet content, thus here we should put 0x03
  • packet content:  0x40 (command code as stated in user manual), 0x00(high byte of value 2), 0x02 (low byte of value 2)
  • checksum : 0xFA (low byte of total sum from packet head to packet content data)

So we should send a string of data bytes  {0x4D,0x58,0x01,0x03,0x40,0x00,0x02,0xFA} in serial to the fingerprint module.

This is just a brief explanation on the working principle of fingerprint module. To know more details on how to communicate with the module and execute other functions, user can refer to the SM630 Fingerprint Module User’s Manual.

Below is the sample code of sending command and receive response. This sample code is not optimized to full functionality. User can play around to add in more functions or modify the program for the best performance.




Related Post

Getting Started with Tilt Sensor (SN-TILT)

Getting Started with Vibration Sensor Module (Normally Off) (SN-VIBRATE-MOD)

How to Upload Arduino Codes to Arduino Yun Through WiFi

ESPresso Lite V2 with AT Firmware

Leave a Reply

Your email address will not be published. Required fields are marked *