Arduino Projects

Attendance System Using EM-18 Module,GSM Module And Arduino

attendance system arduino

Introduction

In this article, we will guide you through the process of creating an attendance system using an Arduino Nano microcontroller board. The system will utilize various components including a 16×2 LCD display with an I2C interface, an EM-18 module for RFID scanning, an LM2596 voltage regulator, and a GSM SIM800L module for sending attendance data via SMS. This system will provide a convenient and efficient way to track attendance in various settings such as schools, offices, or events.

Components Needed

  1. Arduino Nano
  2. EM-18 RFID Module
  3. 16×2 LCD Display with I2C
  4. GSM sim800l Module
  5. LM2596 Step Down Conveter
  6. Wire
  7. Zero PCB
  8. 9V power supply

Arduino Nano

The Arduino Nano is a compact and versatile development board based on the ATmega328P microcontroller. It is similar to the Arduino Uno but comes in a smaller form factor, making it suitable for projects with space constraints.

Components2 1

Microcontroller

    • The Arduino Nano is built around the ATmega328P microcontroller from Atmel (now Microchip). It is an 8-bit microcontroller with 32KB of flash memory, 2KB of SRAM, and 1KB of EEPROM.

Board Layout and Pins

    • The Arduino Nano features a small rectangular board with two rows of pin headers along the sides for connecting to external components and peripherals.
    • It typically has 14 digital input/output (I/O) pins, 8 analog input pins, UART (serial communication) pins, I2C and SPI pins, power pins, and other auxiliary pins.
    • Some variations of the Arduino Nano also include additional features like integrated USB connectivity or built-in sensors.

EM-18 RFID Module

The EM-18 RFID (Radio Frequency Identification) module is a compact and cost-effective RFID reader module widely used for various applications. It allows for easy integration of RFID functionality into projects requiring identification and tracking capabilities.

Components2

RFID Technology

    • RFID is a technology that uses electromagnetic fields to wirelessly identify and track tags or cards that contain electronically stored information.
    • The EM-18 RFID module is specifically designed to work with EM4100 family RFID tags, which operate at a frequency of 125kHz.

Hardware Components

    • The EM-18 RFID module consists of an antenna coil, control circuitry, and necessary support components, all integrated into a compact module.
    • It typically has three pins for connection: VCC (power supply), GND (ground), and DATA (data output).

Operating Principle

    • When an RFID tag is brought into the proximity of the EM-18 RFID module, the module emits a low-frequency electromagnetic field.
    • The RFID tag receives power from this field and sends back its unique identification information to the module.
    • The module reads this information and outputs it through the DATA pin.

Data Output

    • The EM-18 RFID module uses a simple 9600 baud serial communication protocol to output the data read from the RFID tag.
    • The DATA pin of the module is connected to a microcontroller or other serial-enabled device to receive the RFID tag data.
    • The data is usually transmitted as a string of characters or hexadecimal values representing the tag’s unique identification number.

16×2 LCD Display with I2C

A 16×2 LCD display with I2C (Inter-Integrated Circuit) is a popular combination for displaying information in Arduino and other microcontroller projects. It combines a 16-character by 2-line liquid crystal display (LCD) module with an I2C backpack module, which simplifies the connection and control of the display.

111

LCD Display

    • The LCD module consists of a monochrome display panel with 16 columns and 2 rows, allowing for a total of 32 characters to be displayed.
    • Each character position can display alphanumeric characters, symbols, or custom-defined characters.
    • The display is typically backlit, with options for different backlight colours such as blue, green, yellow, or white.

I2C Backpack

    • The I2C backpack is an additional module that attaches to the back of the LCD display module.
    • It incorporates an I2C communication interface, which allows for easy and efficient communication between the display and the microcontroller.
    • The backpack module includes an I2C-to-parallel converter chip (such as PCF8574) that reduces the number of I/O pins required for controlling the LCD display.

I2C Communication

    • I2C is a serial communication protocol that enables data transfer between integrated circuits using two signal lines: SDA (data line) and SCL (clock line).
    • The I2C backpack module acts as an interface between the microcontroller and the LCD display, translating the commands and data received via I2C to the appropriate signals for the display.

Simplified Connection

    • The I2C backpack significantly reduces the number of wires required to connect the LCD display to the microcontroller.
    • Instead of using multiple digital pins for data and control signals, the I2C backpack only requires two wires (SDA and SCL) for communication with the microcontroller.
    • This simplifies the wiring and frees up additional digital pins on the microcontroller for other purposes.

GSM sim800l Module

The GSM SIM800L module is a compact and affordable module that allows communication over the Global System for Mobile Communications (GSM) network. It enables devices to connect to the internet, send and receive SMS messages, make phone calls, and perform various other tasks.

14

  • The GSM SIM800L module is a small-sized module that can be easily integrated into various projects.
  • It typically operates on low voltage (3.4V to 4.4V) and requires a stable power supply.
  • The module includes various interface pins for power supply, UART communication, antenna connection, and other control signals.

Circuit Diagram

circuit diagram 29

Arduino Nano and 16×2 LCD Display

    • Connect the VCC pin of the LCD display to the 5V pin on the Arduino Nano.
    • Connect the GND pin of the LCD display to the GND pin on the Arduino Nano.
    • Connect the SDA pin of the LCD display to the A4/SDA pin on the Arduino Nano.
    • Connect the SCL pin of the LCD display to the A5/SCL pin on the Arduino Nano.

Arduino Nano and EM-18 Module

    • Connect the VCC pin of the EM-18 module to the 5V pin on the Arduino Nano.
    • Connect the GND pin of the EM-18 module to the GND pin on the Arduino Nano.
    • Connect the TX pin of the EM-18 module to the RX pin on the Arduino Nano.

Arduino Nano and LM2596

    • Connect the VIN pin of the LM2596 to the 9V pin on the Arduino Nano.
    • Connect the GND pin of the LM2596 to the GND pin on the Arduino Nano.

Arduino Nano and GSM SIM800L Module

    • Connect the VCC pin of the GSM SIM800L module to the 3.7V pin on the Arduino Nano.
    • Connect the GND pin of the GSM SIM800L module to the GND pin on the Arduino Nano.
    • Connect the TX pin of the GSM SIM800L module to the D2 pin on the Arduino Nano.
    • Connect the RX pin of the GSM SIM800L module to the D3 pin on the Arduino Nano.

Source Code

GitHub

Libraries

    • The code uses two libraries: SoftwareSerial and LiquidCrystal_I2C. SoftwareSerial is used to create a software serial connection for communicating with the SIM module, while LiquidCrystal_I2C is used to control a 16×2 LCD display using I2C communication.

Pin Definitions

    • The code defines the pin assignments for the buzzer (buzzerPin), yellow LED (yellow), and green LED (green).

Variable Declarations

    • Various variables are declared to store RFID tag numbers, states, and other values used in the program.
    • number, number1, number2, and number3 store phone numbers to which SMS messages will be sent.
    • state1, state2, state3, and state4 represent the states of different individuals.
    • page is a string variable used to store web page data?
    • input is a character array used to store RFID tag data received from the reader?
    • count keeps track of the number of characters received from the RFID reader.

setup() Function

    • Initializes the LCD display, sets the baud rate for serial communication, and initializes the SIM module and pins.
    • Displays a welcome message on the LCD for 4 seconds.

loop() Function

  • Calls the rfid() function repeatedly.
  • rfid() Function

  • Checks if there is data available from the RFID reader (Serial communication).
  • If data is available, it reads the RFID tag number and stores it in the input array.
  • It then compares the received tag number with predefined tag numbers to determine the user and their state.
  • Based on the tag number and state, it performs the following actions:
  • Turns on the buzzer, lights up the corresponding LED, and displays useful information on the LCD.
  • Calls the info() function to display an authorized access message.
  • Calls the respective SendPrateek(), SendSonu(), SendPunit(), or SendRam() function to send an SMS message to the corresponding phone number.
  • If the received tag number does not match any predefined tags, it denies access, sounds the buzzer, and displays an access denied message.

SMS Sending Functions

    • These functions are responsible for sending SMS messages using the SIM module.
    • They set the SIM module to SMS text mode, specify the recipient’s phone number, and send the appropriate message based on the user’s state.

Other Helper Functions

    • smsSend(): Displays a message on the LCD indicating that an SMS is being sent.
    • beepON(): Turns on the buzzer for a short duration to generate a beep sound.

    • info(): Displays user information on the LCD.

Video

Conclusion

By following the provided circuit diagram and implementing the Arduino code, you can create an efficient and convenient attendance tracking system suitable for various environments. This system offers seamless integration of RFID technology, LCD display, and SMS functionality to simplify attendance management.

More Arduino Tutorial

Prateek

Hi, Prateek Here I’m interested in Electronics That's why I Make Soo Many Projects, I’m currently Pursuing M Tech.. if you Relay Like To My Blog Plz Comment Below...Thanks To All Electronics Lover...❤️

Leave a Reply

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

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker