This is an old revision of the document!
* Grupa: 335CA
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.
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.
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:
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
Flow Overview
For debug reasons, I also print the UID of the card and the message in the serial monitor.
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.