NFC Access Control System Documentation

Welcome to the documentation for the NFC Access Control System, a student project developed for the NFC Technology course at RWU (Ravensburg-Weingarten University). This project demonstrates the progression from basic NFC tag operations to a complete access control system using the PN532 NFC reader with advanced card management capabilities.

Contents:

Overview

The NFC Access Control System demonstrates a progressive learning approach to NFC technology, from basic operations to a complete embedded system. Built on Arduino Nano with the PN532 NFC module, it provides both educational value and practical functionality.

Learning Path

Task 1: Reading NFC Tags

Master the fundamentals of NFC communication by detecting and reading card UIDs. This forms the foundation for all NFC applications.

Task 2: Writing to NFC Tags

Learn to write data to different card types, understanding memory structures and authentication requirements.

Extended Project: Full Access Control

Integrate reading and writing into a complete system with persistent storage, user interface, and physical access control.

Key Features

Core Functionality

  • Multi-card Support: Store up to 40 authorized cards in EEPROM

  • Smart Card Cloning: Clone any Mifare Classic card using custom sector technology

  • Real-time Access Control: Instant card verification with relay output

  • Interactive Menu System: Full-featured LCD menu with button navigation

  • IRQ-based Detection: Fast, non-blocking card detection using interrupts

Educational Features

  • Progressive Examples: Simple read/write examples for course tasks

  • Well-Documented Code: Extensive comments explaining every operation

  • Practical Application: Real-world system demonstrating concepts

  • Modular Design: Easy to understand and extend

Advanced Card Management

  • Custom Sector Technology: Uses Sector 1 (blocks 4-7) for cloned UID storage

  • Dual UID System: Supports both physical and cloned UIDs

  • Automatic UID Selection: Intelligently selects appropriate UID

  • No Magic Cards Required: Clone to any standard Mifare Classic 1K/4K card

Quick Start

For Course Tasks (Beginners)

  1. Start with Examples to complete Task 1 (reading) and Task 2 (writing)

  2. See Hardware Setup for wiring the PN532 module

  3. Follow Installation to set up PlatformIO

  4. Upload and test the basic examples

For Full System (Advanced)

  1. Review Introduction to understand system architecture

  2. Complete hardware setup following Hardware Setup

  3. Build and upload the full application from src/

  4. Explore Usage Guide for operating the complete system

  5. Learn about Card Cloning Technology for advanced features

Project Outcomes

This project covers the following technical areas:

Hardware Integration

  • Arduino Nano programming and configuration

  • SPI and I2C communication protocols

  • Interfacing with NFC modules (PN532)

  • LCD display control

  • Button input handling

  • Relay control for physical outputs

Software Implementation

  • Embedded C++ programming

  • State machine design patterns

  • Non-blocking code implementation

  • EEPROM persistent storage

  • Menu system development

  • Error handling strategies

NFC Technology Concepts

  • NFC/RFID fundamentals at 13.56 MHz

  • Card UID reading and verification

  • Memory structures (blocks vs pages)

  • Authentication mechanisms for Mifare Classic

  • Data writing and verification

  • Card cloning techniques

Documentation Structure

This documentation is organized to support both learning and reference:

Introduction

Project overview, architecture, and design philosophy. Start here to understand the system’s purpose and structure.

Examples

Practical examples for Task 1 (reading) and Task 2 (writing). Essential for course participants and beginners.

Hardware Setup

Component requirements, wiring diagrams, and pin configurations. Follow this for physical setup.

Installation

Software setup, PlatformIO configuration, and build instructions.

Usage Guide

Complete guide to operating the full access control system, including menu navigation and card management.

API Reference

Technical reference for all classes, methods, and data structures.

Card Cloning Technology

Advanced feature: clone card UIDs without magic cards using custom sector technology.

EEPROM Memory Layout

Deep dive into EEPROM storage structure and card database management.

Class Diagrams

Visual representations of system architecture, state machines, and workflows.

Troubleshooting

Common issues and solutions for hardware and software problems.

Quick Start - Building Documentation

Quick reference for building documentation (for contributors).

Indices and tables