17  RFID Hardware & Programming

Key Concepts
  • RFID Reader Interface: The hardware connection (USB, Ethernet, RS-232, Wiegand, OSDP) between an RFID reader and the host system or access controller
  • Wiegand Protocol: A legacy unidirectional serial protocol for transmitting card data from RFID readers to access control panels; lacks encryption and authentication
  • OSDP (Open Supervised Device Protocol): A modern bidirectional secure protocol for reader-controller communication, replacing Wiegand with AES-128 encryption
  • GPIO (General Purpose Input/Output): Digital I/O pins on microcontrollers used to control RFID reader enable/disable lines, antenna switching, and relay outputs
  • GPIO Control: Reading tag data via hardware interrupt on the reader’s data-ready pin, triggering firmware processing without polling
  • SPI Reader Interface: Some compact RFID reader ICs (e.g., MFRC522) connect to microcontrollers via SPI for embedded integration
  • Antenna Multiplexer: A hardware module that connects one RFID reader to multiple antennas sequentially, expanding coverage without additional readers

17.1 In 60 Seconds

This chapter provides hands-on RFID hardware integration with Arduino, ESP32, and Raspberry Pi platforms. You will learn to wire RC522 modules, read/write MIFARE tags, build Python-based readers, and develop software simulators – essential skills for prototyping any RFID-enabled IoT system.

17.2 Learning Objectives

By the end of this chapter, you will be able to:

  • Construct RFID Circuits: Wire RC522 modules to Arduino and ESP32 platforms using correct SPI pin mapping and voltage levels
  • Implement Tag Reading Code: Develop firmware to detect, authenticate, and extract UIDs from MIFARE Classic and Ultralight tags
  • Program Tag Write Operations: Store and retrieve custom data blocks on MIFARE 1K sectors with proper key authentication
  • Diagnose Reader Failures: Troubleshoot common RC522 integration issues including voltage mismatches, clock misconfiguration, and SPI errors
  • Develop Python RFID Readers: Integrate Raspberry Pi GPIO with the MFRC522 library for read/write operations
  • Design RFID Simulators: Build software-based tag and inventory simulators to validate system logic before hardware deployment

What is this chapter? Practical RFID hardware wiring and programming exercises for Arduino, ESP32, and Raspberry Pi platforms.

When to use:

  • After studying RFID fundamentals
  • When building your first RFID project
  • To understand reader-tag communication at code level

Hardware You’ll Need:

Component Purpose Cost
RC522 Module 13.56 MHz HF reader $3-5
MIFARE cards Test tags $0.50 each
Arduino/ESP32 Microcontroller $5-15
Jumper wires Connections $2

Recommended Path:

  1. Complete RFID Fundamentals
  2. Work through hardware examples here
  3. Build complete systems in RFID Labs

17.3 Prerequisites

Before diving into this chapter, you should be familiar with:

  • RFID Fundamentals and Standards: Understanding RFID operating principles, frequency bands (LF, HF, UHF), tag types (passive, active, semi-passive), and ISO standards
  • Programming fundamentals: Familiarity with Arduino/C++ or Python programming
  • Basic electronics: Understanding GPIO pins, SPI communication, and hardware interfacing

17.4 Arduino RFID Reader Integration

⏱️ ~20 min | ⭐⭐⭐ Advanced | 📋 P08.C26.U01

17.4.1 Example 1: RC522 Module (13.56 MHz HF)

Hardware:

  • Arduino Uno (or compatible Arduino board)
  • RC522 RFID module
  • RFID cards/tags (13.56 MHz)
Voltage and Logic-Level Warning (RC522)

Most RC522 modules are 3.3V-only for both power and signal levels. If you’re using a 5V Arduino Uno, use a level shifter (or at minimum resistor dividers) on SPI lines and power the module from 3.3V. Do not connect the RC522 to 5V.

Wiring:

RC522 Pin Arduino Pin
SDA Pin 10
SCK Pin 13
MOSI Pin 11
MISO Pin 12
IRQ Not connected
GND GND
RST Pin 9
3.3V 3.3V

Code:

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10
#define RST_PIN 9

MFRC522 rfid(SS_PIN, RST_PIN);

void setup() {
    Serial.begin(9600);
    SPI.begin();
    rfid.PCD_Init();

    Serial.println("RFID Reader Ready!");
    Serial.println("Scan your card...");
}

void loop() {
    // Look for new cards
    if (!rfid.PICC_IsNewCardPresent())
        return;

    // Select one of the cards
    if (!rfid.PICC_ReadCardSerial())
        return;

    // Print card UID
    Serial.print("Card UID: ");
    for (byte i = 0; i < rfid.uid.size; i++) {
        Serial.print(rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
        Serial.print(rfid.uid.uidByte[i], HEX);
    }
    Serial.println();

    // Halt PICC
    rfid.PICC_HaltA();

    // Stop encryption on PCD
    rfid.PCD_StopCrypto1();
}
RFID Card Types

MIFARE Classic 1K:

  • 1KB storage
  • 16 sectors × 4 blocks
  • Each block = 16 bytes
  • Factory default keys (often FF FF FF FF FF FF)

MIFARE Ultralight:

  • 64 bytes storage
  • Lower cost
  • No encryption (read-only use cases)

17.4.2 Example 2: Python RFID Reader

# Python RFID Reader using RC522
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522

# Create reader object
reader = SimpleMFRC522()

try:
    print("RFID Reader Ready!")
    print("Place tag near reader...")

    while True:
        # Read tag
        id, text = reader.read()

        print(f"ID: {id}")
        print(f"Data: {text}")
        print("-" * 40)

except KeyboardInterrupt:
    print("\nStopping...")
    GPIO.cleanup()

Writing to RFID Tags:

import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522

reader = SimpleMFRC522()

try:
    print("Place tag to write...")
    text = input("Enter text to write: ")

    reader.write(text)
    print("Written successfully!")

finally:
    GPIO.cleanup()

17.5 Python RFID Simulators

17.5.1 RFID Tag Simulator

Simulates different RFID tag types and their operational characteristics:

Expected Output:

=== RFID Tag Simulator ===

UHF Reader scanning...
  UID: E280116060000209
  Data: Product SKU: 12345
  Distance: 4.23 m
  RSSI: -45.2 dBm

Passive HF Tag Read Test:
  0.1m: ✓ Success (RSSI: -28.4 dBm)
  0.5m: ✓ Success (RSSI: -42.1 dBm)
  1.0m: ✓ Success (RSSI: -48.5 dBm)
  1.5m: ✗ Out of range
  2.0m: ✗ Out of range

17.5.2 RFID Inventory Management System

Complete inventory tracking system with database integration:

Expected Output:

=== RFID Inventory Management System ===

✓ Registered: Arduino Uno R3 (SKU001)
✓ Registered: Raspberry Pi 4 (SKU002)
✓ Registered: ESP32 DevKit (SKU003)
✓ Registered: RFID Reader RC522 (SKU004)

--- Simulating RFID Scans ---
  Scanned: Arduino Uno R3 at Warehouse A (RSSI: -52.3 dBm)
  Scanned: Raspberry Pi 4 at Shipping Dock (RSSI: -48.7 dBm)
  Scanned: ESP32 DevKit at Warehouse A (RSSI: -55.1 dBm)
  Scanned: RFID Reader RC522 at Assembly Line (RSSI: -41.2 dBm)

--- Inventory Report ---
  Total Items: 120 (4 unique)
  Recent Scans (24h): 4

  By Location:
    Warehouse A: 75 items
    Shipping Dock: 15 items
    Assembly Line: 30 items

--- Missing Items Check ---
  ✓ All items accounted for

17.5.3 RFID Security Analyzer

Analyzes RFID security vulnerabilities and attack vectors:

Expected Output:

=== RFID Security Analyzer ===

============================================================
System: MIFARE Classic 1K
============================================================

Security Score: 35.0/100
Security Level: MEDIUM

Vulnerabilities Found: 6
  Critical: 2
  High: 1
  Medium: 3

Top Vulnerabilities:
  • [CRITICAL] Uses factory default keys (e.g., FFFFFFFFFFFF for MIFARE)
  • [CRITICAL] Tag UID and data can be copied to blank tag
  • [HIGH] Uses broken cryptography (e.g., MIFARE Classic Crypto1 - broken in 2008)

Top Recommendations:
  [CRITICAL] Change all keys to strong, random values during deployment
  [CRITICAL] Use anti-cloning features, unique derived keys
  [HIGH] Upgrade to AES-128 or stronger encryption

============================================================
System: MIFARE DESFire EV3
============================================================

Security Score: 95.0/100
Security Level: CRITICAL

Vulnerabilities Found: 1
  Critical: 0
  High: 0
  Medium: 1

Top Vulnerabilities:
  • [MEDIUM] RF signals can be intercepted with high-gain antennas

Top Recommendations:
  [MEDIUM] Use encryption and limit transmission power

============================================================
SECURITY COMPARISON
============================================================

Most Secure: MIFARE DESFire EV3
Least Secure: EPC Gen2 UHF (Basic)
Average Security Score: 58.8/100

Ranking:
  1. MIFARE DESFire EV3: 95.0/100 (CRITICAL)
  2. EPC Gen2 UHF (Secured): 90.0/100 (CRITICAL)
  3. MIFARE Classic 1K: 35.0/100 (MEDIUM)
  4. EPC Gen2 UHF (Basic): 15.0/100 (BASIC)

17.6 Worked Examples

Worked Example: MIFARE Classic 1K Memory Layout for Access Control

Scenario: A corporate office is deploying RFID access cards using MIFARE Classic 1K tags. Each card must store: employee ID (8 digits), department code (4 digits), access zones (16 zones as bitmap), and last entry timestamp. Security requires sector-level key authentication.

Given:

  • MIFARE Classic 1K structure: 16 sectors, 4 blocks per sector, 16 bytes per block
  • Total memory: 16 × 4 × 16 = 1,024 bytes
  • Sector 0, Block 0: UID and manufacturer data (read-only)
  • Each sector has 1 trailer block (last block) for keys and access control
  • Usable data per sector: 3 blocks × 16 bytes = 48 bytes
  • Key A: Read access, Key B: Write access

How much usable data fits in a MIFARE Classic 1K card? Total memory = \(16 \text{ sectors} \times 4 \text{ blocks/sector} \times 16 \text{ bytes/block} = 1{,}024\) bytes. But not all is writable:

  • Sector 0, Block 0 (16 bytes): UID + manufacturer data — READ-ONLY
  • Every sector’s Block 3 (16 sectors × 16 bytes = 256 bytes): Sector trailers with Keys A/B and access bits — RESERVED

Total unusable = \(16 + 256 = 272\) bytes. Usable data = \(1{,}024 - 272 = 752\) bytes. Per sector: \(3 \text{ blocks} \times 16 \text{ bytes} = 48\) bytes. For 15 writable sectors (Sector 0 has only Blocks 1-2): \(15 \times 48 + 32 = 752\) bytes. This is why MIFARE 1K is called “1K” (total memory) but only stores ~750 bytes of user data.

Steps:

  1. Calculate data requirements:

    • Employee ID (8 digits): Stored as BCD = 4 bytes
    • Department code (4 digits): Stored as BCD = 2 bytes
    • Access zones (16 zones): Bitmap = 2 bytes
    • Last entry timestamp (Unix): 4 bytes
    • Checksum/CRC: 2 bytes
    • Total required: 14 bytes
  2. Design sector allocation:

    Sector 0: UID (read-only) - Skip
    Sector 1: Employee data (our application)
      Block 4:  [EmployeeID:4B][DeptCode:2B][Zones:2B][Timestamp:4B][CRC:2B][Reserved:2B]
      Block 5:  Reserved for future expansion (16 bytes)
      Block 6:  Reserved for future expansion (16 bytes)
      Block 7:  Sector trailer (Key A: 6B, Access bits: 4B, Key B: 6B)
    Sectors 2-15: Available for other applications (MAD)
  3. Configure access control bits for Sector 1:

    • Key A: 0xA0A1A2A3A4A5 (read access for card readers)
    • Key B: 0xB0B1B2B3B4B5 (write access for enrollment stations)
    • Access bits: C1=0, C2=0, C3=1 (Key A read, Key B write)
    • Trailer access: Key B required for key changes
  4. Implement data encoding:

    Employee ID: 12345678 → BCD: 0x12 0x34 0x56 0x78 (4 bytes)
    Department: 0042 → BCD: 0x00 0x42 (2 bytes)
    Zones 1,3,5,7 access → Bitmap: 0b0000000010101010 = 0x00AA (2 bytes)
    Timestamp: 1736640000 → 0x67842D00 (4 bytes, big-endian)
    CRC16: Calculated over 12 data bytes
  5. Calculate total memory utilization:

    • Sector 1 Block 4: 14/16 bytes used (87.5%)
    • Total card utilization: 14/752 usable bytes (1.9%)
    • Remaining capacity: 738 bytes for additional applications

Result: One sector (Sector 1) stores complete employee access credentials in 14 bytes. The card supports multi-application storage per MIFARE Application Directory (MAD) standard, leaving sectors 2-15 for cafeteria payments, parking, or time attendance.

Key Insight: MIFARE Classic 1K’s sector-based security allows multiple applications on one card with independent keys. Always use the trailer block to enforce access control: Key A for readers (read-only), Key B for enrollment (read-write). Remember that MIFARE Classic uses Crypto1 which has known vulnerabilities; for high-security applications, use MIFARE DESFire EV2/EV3 with AES encryption.

Worked Example: LF RFID Reader Power Budget for Battery-Powered Handheld

Scenario: A veterinary clinic needs a battery-powered handheld reader to scan pet microchips (ISO 11784/11785 at 134.2 kHz). The reader must operate for a full 8-hour shift without recharging. Design the power budget to select appropriate battery capacity.

Given:

  • Microchip standard: ISO 11784/11785 FDX-B at 134.2 kHz (LF RFID)
  • Scan operation: 200 ms active read, 2 second average between scans
  • Expected scans per shift: ~500 animals
  • Reader components:
    • LF RFID module (EM4095): 100 mA @ 5V during read
    • Microcontroller (STM32L4): 15 mA active, 0.5 mA sleep
    • LCD display: 20 mA when on, 1 mA standby
    • Buzzer (during read): 30 mA for 100 ms
  • Display on time: 3 seconds after each scan
  • Battery: Lithium-ion 3.7V nominal

Steps:

  1. Calculate energy per scan cycle:

    RFID module read (200ms): 100 mA × 0.2s = 20 mAs = 5.56 μAh
    MCU during read (200ms): 15 mA × 0.2s = 3 mAs = 0.83 μAh
    Buzzer (100ms): 30 mA × 0.1s = 3 mAs = 0.83 μAh
    Display (3s): 20 mA × 3s = 60 mAs = 16.67 μAh
    Total per scan: 86 mAs = 23.89 μAh
  2. Calculate standby power between scans:

    Average time between scans: (8 hours × 3600) / 500 = 57.6 seconds
    Active period: ~3.3 seconds (scan + display)
    Sleep period: 57.6 - 3.3 = 54.3 seconds
    
    Sleep current: MCU 0.5 mA + Display 1 mA = 1.5 mA
    Sleep energy per cycle: 1.5 mA × 54.3s = 81.45 mAs = 22.63 μAh
  3. Calculate total shift consumption:

    Per scan cycle: 23.89 + 22.63 = 46.52 μAh
    500 scans: 500 × 46.52 = 23,260 μAh = 23.26 mAh
    
    Plus background (continuous MCU + display standby):
    8 hours standby baseline: 1.5 mA × 8 hours = 12 mAh
    
    Total 8-hour consumption: 23.26 + 12 = 35.26 mAh at 5V
  4. Convert to battery capacity at 3.7V:

    Power = 35.26 mAh × 5V = 176.3 mWh
    At 3.7V battery: 176.3 mWh / 3.7V = 47.6 mAh
    Add 20% for boost converter inefficiency: 47.6 × 1.2 = 57.2 mAh
    Add 20% safety margin: 57.2 × 1.2 = 68.6 mAh
  5. Select battery:

    • Minimum required: 68.6 mAh at 3.7V
    • Common options: 100 mAh (tight), 500 mAh (comfortable), 1000 mAh (multi-day)
    • Recommendation: 500 mAh LiPo provides 7+ days operation

Result: A 500 mAh 3.7V LiPo battery provides approximately 7 days of operation (500/68.6 = 7.3 days) between charges with 500 scans per day. For single-shift operation, even a 100 mAh battery is sufficient, but 500 mAh provides excellent margin and allows for intensive use days.

Key Insight: LF RFID (125-134 kHz) readers consume significantly more power than HF/NFC readers because they must generate a stronger magnetic field for longer wavelength coupling. The 100 mA read current is typical for LF modules but only 15-30 mA for HF. Sleep current often dominates total energy when duty cycle is low; optimizing sleep modes has more impact than reducing read time.

Max the Microcontroller was excited! He had just received a shiny new RC522 RFID reader module. “I can read invisible name tags!” he said.

“But how do you talk to it?” asked Sammy the Sensor. Max explained: “I use special wires called SPI – it’s like having four different phone lines. One for sending messages (MOSI), one for receiving (MISO), one for keeping time (SCK), and one for saying ‘Hey, I’m talking to YOU!’ (SDA).”

Lila the LED joined in: “And when Max reads a tag, I light up green for friends and red for strangers! It’s like a magic doorbell that knows who’s knocking.”

Bella the Battery reminded everyone: “Remember, the RC522 only likes 3.3 volts – give it 5 volts and it gets a tummy ache! Always check your voltage before plugging things in.”

Key idea: RFID hardware integration is like building with LEGO – connect the right pins, load the right code, and your microcontroller can read invisible radio tags!

17.7 Knowledge Check

Q1: When connecting an RC522 RFID module to an Arduino Uno, why must you use the 3.3V pin instead of 5V?

  1. The 3.3V pin provides more current
  2. The RC522 operates at 3.3V logic levels and can be damaged by 5V
  3. The 5V pin is reserved for the USB connection
  4. There is no difference between the two

B) The RC522 operates at 3.3V logic levels and can be damaged by 5V – The RC522 module is designed for 3.3V operation. Applying 5V directly can damage the module’s internal components. When using a 5V Arduino, you should also use level shifters on the SPI data lines.

Q2: In the MIFARE Classic 1K memory structure, how much usable data can be stored per sector?

  1. 64 bytes (4 blocks x 16 bytes)
  2. 48 bytes (3 blocks x 16 bytes, since the trailer block stores keys)
  3. 16 bytes (1 block only)
  4. 1,024 bytes (the full card)

B) 48 bytes (3 blocks x 16 bytes) – Each sector has 4 blocks of 16 bytes, but the last block (trailer) is reserved for Key A, access bits, and Key B. Only the first 3 blocks are available for user data, giving 48 bytes per sector.

Q3: Why does the LF RFID reader in the power budget example consume approximately 100 mA during a read, compared to 15-30 mA for an HF reader?

  1. LF readers transmit more data per read cycle
  2. LF requires a stronger magnetic field due to longer wavelength coupling
  3. LF readers operate at higher voltage
  4. LF tags are larger and need more power to activate

B) LF requires a stronger magnetic field due to longer wavelength coupling – At 125-134 kHz, the wavelength is approximately 2,200 meters. Generating an adequate magnetic field at these frequencies for inductive coupling requires more current through the reader antenna coil compared to HF (13.56 MHz), which uses a much shorter wavelength.

Common Mistake: Forgetting Clock Speed Configuration for MFRC522

The Problem: A developer connects an RC522 module to an Arduino, uploads the MFRC522 library example code, and finds that tags are detected but the UID is always garbage (e.g., FF FF FF FF or random values that change on every scan). Re-wiring, replacing tags, and swapping modules does not fix it.

Why It Happens: The MFRC522 library assumes the RC522 module is using its internal 13.56 MHz crystal oscillator by default. Some RC522 clone modules ship with the crystal disabled or configured incorrectly in firmware. The Arduino SPI bus runs at 4 MHz by default, which works fine, but the RC522’s internal timing registers expect a 13.56 MHz reference clock for the RF carrier and data decoding. If the clock is wrong, the tag communication fails silently – the reader detects presence but cannot decode the modulated backscatter signal.

How To Fix:

  1. Check the crystal: Verify your RC522 module has a physical 13.56 MHz crystal soldered near the MFRC522 chip. Some ultra-cheap clones omit it entirely.

  2. Initialize the clock explicitly:

    rfid.PCD_Init();
    // Explicitly configure the internal timer for 13.56 MHz
    rfid.PCD_WriteRegister(rfid.TModeReg, 0x8D);    // TAuto=1, TAutoRestart=1
    rfid.PCD_WriteRegister(rfid.TPrescalerReg, 0x3E); // Timer prescaler
    rfid.PCD_WriteRegister(rfid.TReloadRegH, 0x00);   // Reload timer high byte
    rfid.PCD_WriteRegister(rfid.TReloadRegL, 0x1E);   // Reload timer low byte: 30 decimal
  3. Verify the library version: Some older MFRC522 library versions have incorrect default register values. Update to the latest version via Arduino Library Manager.

  4. Test with a known-good tag: Use a factory-sealed MIFARE Classic 1K card (not a random key fob) to rule out tag compatibility issues.

  5. Add serial debug output:

    Serial.print("PCD version: 0x");
    Serial.println(rfid.PCD_ReadRegister(rfid.VersionReg), HEX);
    // Expected: 0x91 (version 1.0) or 0x92 (version 2.0)

The Lesson: When RF communication mysteriously fails despite correct wiring and power, always check clock configuration. RF protocols are timing-sensitive – a misconfigured clock breaks modulation/demodulation even when DC power and logic levels are correct.

17.8 Best Practices for RFID Hardware Integration

Choose Right Frequency: Match frequency to environment and range needs ✅ Plan for Interference: Test in actual deployment environment ✅ Implement Security: Encrypt sensitive data, use authentication ✅ Test Multi-Tag Performance: Verify anti-collision in high-density scenarios ✅ Consider Privacy: Label RFID-enabled products, provide opt-out ✅ Standardize: Use ISO/EPC standards for interoperability ✅ Monitor Reader Health: Track read rates, detect reader failures

Common Pitfalls

Wiegand transmits card data in the clear with no authentication. An attacker within cable reach can inject arbitrary card numbers. Fix: use OSDP with AES-128 encryption for all new access control reader-controller connections.

An antenna with the wrong impedance for the reader IC causes reflected power, reducing read range and potentially damaging the reader. Fix: tune the antenna matching network to the reader IC’s specified impedance (typically 50 Ω) using a network analyser or follow the reference design in the IC’s datasheet.

RF signals at 13.56 MHz or 860–960 MHz are susceptible to interference from switching regulators on the same PCB. Fix: use a separate ground plane for the RF section and add ferrite beads on power supply lines entering the RF section.

17.10 Summary

This chapter covered RFID hardware integration and programming:

  • Arduino RC522 Integration: SPI wiring and MFRC522 library usage for reading 13.56 MHz HF tags
  • Python RFID Programming: Raspberry Pi GPIO integration with SimpleMFRC522 for reading and writing tags
  • Tag Types: MIFARE Classic 1K memory structure (16 sectors × 4 blocks) vs MIFARE Ultralight (64 bytes)
  • Security Considerations: Crypto1 vulnerabilities in Classic vs AES-128 in DESFire EV3
  • Power Budgeting: LF readers draw ~100 mA vs 15-30 mA for HF due to stronger magnetic field requirements
  • Simulator Development: Software-based testing before physical hardware deployment

17.11 Knowledge Check

17.12 Concept Relationships

Builds On:

  • RFID Fundamentals - Frequency bands and tag types inform reader selection
  • SPI communication protocol enables Arduino/ESP32 to RC522 integration

Enables:

Related Concepts:

  • MIFARE Classic memory sectors enable multi-application cards (access + payment)
  • LF readers (125-134 kHz) consume 100 mA vs HF readers (15-30 mA) due to wavelength
  • Python SimpleMFRC522 library abstracts PN532 complexity for Raspberry Pi

17.13 See Also

Hardware Modules:

Development Boards:

Tag Programming:

17.14 Try It Yourself

Beginner Challenge: Build the Arduino + RC522 circuit from Example 1. Upload the code and scan an RFID card. The UID should appear in the Serial Monitor. Compare the UID format: is it 4 bytes (MIFARE Classic/Ultralight) or 7 bytes (NTAG series)?

Intermediate Challenge: Write custom data to a MIFARE Classic 1K tag. Use the MFRC522 library’s MIFARE_Write() function to store your name in Sector 1, Block 4. Then read it back using MIFARE_Read(). Remember to authenticate with Key A before writing (default: 0xFFFFFFFFFFFF).

Advanced Challenge: Calculate the power budget for a battery-powered handheld RFID reader (ESP32 + RC522). Measure actual current consumption: (1) deep sleep = 10 µA, (2) idle with reader = 50 mA, (3) active reading = 100 mA. For 500 scans/day at 200ms each, calculate 18650 battery life (3000 mAh).

Production Upgrade: Replace the basic UID authentication with MIFARE DESFire EV2 challenge-response. Use the PN532’s InDataExchange function to send APDU commands for AES-128 mutual authentication. Measure authentication latency: UID check (<50ms) vs DESFire auth (~300ms).

17.15 What’s Next

Continue building your RFID skills with these related chapters:

Next Chapter Focus Area
RFID Industry Applications Real-world deployments in supply chain, retail, and healthcare
RFID Labs and Assessment Complete hands-on projects: access control, inventory systems
RFID Security and Privacy Crypto1 vulnerabilities, cloning attacks, and countermeasures
RFID Fundamentals and Standards Frequency bands, ISO standards, and tag classification review
NFC Introduction Transition from RFID to NFC: 13.56 MHz reader/writer applications