This is an old revision of the document!


Smart Gate

* Nume si Prenume: Armasu Octavian

* Grupa: 335CA

Introduction

This project aims to implement an access control system using an Arduino board and an NFC card reader. The system works as follows: by default, a red LED is on and the display shows the message “Door Locked”. When a valid NFC card is presented to the reader, the system checks the card's authentication. If the card is valid, the red LED turns off, a green LED lights up, a buzzer emits a sound, and the display shows “Door Open”. After a few seconds, the system automatically “locks” the door again by turning the red LED back on, emitting another buzzer sound, and changing the display message back to “Door Locked”.

Additionally, every valid access is recorded on an SD card along with the exact date and time of the event, using a real-time clock (RTC) module to generate the timestamp.

General Description

This project presents a basic access control system using an Arduino microcontroller and NFC technology. When a valid NFC card is presented to the reader, the system authenticates the user, triggers a visual and audio response (using LEDs and a buzzer), displays the access status on a screen, and logs the event with a timestamp to an SD card. The setup demonstrates simple hardware integration for secure access applications and data logging, combining user feedback, real-time tracking, and storage capabilities in an embedded environment.

Hardware Design

The following table lists the main components used in this project:

Component Description
Arduino Microcontroller
151051RS11000 Red color led
151031VS06000 Green color led
SSD1306 Display LCD
RC522 NFC Reader
PS1440P02BT Buzzer
DS1307 RTC

Electrical schematics:

Note: The OLED display (SSD1306, 0.96”, I2C interface) and the RC522 NFC reader used in this project are represented using generic connector symbols (Conn_01x04 and Conn_01x07) due to the absence of exact component symbols in the library.

OLED Display Pin Mapping (Conn_01x04): • Pin 1 – GND → Ground • Pin 2 – VCC → 5V Supply • Pin 3 – SCL → Arduino A5 • Pin 4 – SDA → Arduino A4

RC522 NFC Reader Pin Mapping (Conn_01x07): • SDA → Arduino D10 (Chip Select / SS) • SCK → Arduino D13 (SPI Clock) • MOSI → Arduino D11 (SPI Data In) • MISO → Arduino D12 (SPI Data Out) • GND → Ground • 3.3V → Arduino 3.3V

Final Product:

Software Design

Purpose of the code

This program implements an access control system using RFID cards, based on an Arduino microcontroller. The system integrates an RC522 NFC reader, an OLED display, a real-time clock module (DS3231), LEDs, and a buzzer. When a card is detected, the system displays the access information, provides visual and sound feedback, and logs the timestamp of the event.

Main Software Components

  1. RC522 RFID Reader
    • The RC522 module is configured to trigger an interrupt signal via its IRQ pin when a card is presented.
    • This interrupt is connected to pin D2 on the Arduino and is handled using attachInterrupt(…).
    • The interrupt service routine cardDetected() sets a global flag (cardInterrupt).
    • The main loop() checks this flag and processes the card only when the flag is true.
    • There are advantages using this method: the microcontroller stays idle until an actual card is detected, reducing unnecessary polling and improving efficiency.
  2. OLED Display
    • It is used to display information for the user.
    • When a card is valid and the “door” opens, on the display it will be showed the following message: “Valid Card\n Timestamp\n Door opened”.
    • When waiting for a card to be provided, the message will be: “Please scan your card…”.
  3. Real Time Clock
    • Provides the current date and time for each access event.
  4. LEDs and Buzzer
    • The red LED indicates the default state (door closed).
    • The green LED and buzzer are activated when a valid card is detected.
    • After a delay of 3 seconds, the system goes back to its default state.

Rezultate Obţinute

Care au fost rezultatele obţinute în urma realizării proiectului vostru.

Concluzii

Download

O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-).

Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin.

Bibliografie/Resurse

Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.

Export to PDF

pm/prj2025/abirlica/octavian.armasu.1748186785.txt.gz · Last modified: 2025/05/25 18:26 by octavian.armasu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0