Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Communication & Wireless Modules

RFID Module Guide: RC522, PN532, and Long-Range UHF Options

RFID Module Guide: RC522, PN532, and Long-Range UHF Options

April 1, 2026 /Posted by / 0

The RFID module RC522 Arduino combination is the starting point for thousands of access control, attendance, and inventory tracking projects across India. From college attendance systems in Chennai to warehouse inventory management in Ahmedabad, RFID technology offers contactless identification at affordable prices. This guide compares the RC522, PN532, and long-range UHF readers, and shows you how to build practical RFID applications with Arduino.

Table of Contents

  • RFID Technology Basics
  • RC522 vs PN532 vs UHF: Which to Choose
  • Wiring RC522 to Arduino
  • Reading RFID Cards and Tags
  • Project: Door Access Control System
  • Project: Automated Attendance System
  • NFC Features with PN532
  • Frequently Asked Questions

RFID Technology Basics

RFID (Radio-Frequency Identification) uses electromagnetic fields to automatically identify tagged objects. An RFID system has two components:

  • Reader (Interrogator): Emits radio waves and reads data from tags. Connected to your Arduino.
  • Tag (Transponder): A small chip with an antenna. Can be a card, keychain fob, sticker, or implanted in products.

RFID operates at different frequencies with different capabilities:

Frequency Band Range Use Cases
125 kHz LF (Low Frequency) 1-10 cm Simple access control, animal tagging
13.56 MHz HF (High Frequency) 1-10 cm Smart cards, NFC, payments, attendance
860-960 MHz UHF (Ultra High Frequency) 1-12 m Inventory, supply chain, vehicle toll

RC522 vs PN532 vs UHF: Which to Choose

Feature RC522 (MFRC522) PN532 UHF Reader
Frequency 13.56 MHz 13.56 MHz 860-960 MHz
Read Range 2-5 cm 3-7 cm 1-12 metres
NFC Support Partial (read UID only) Full NFC (P2P, card emulation) No
Interface SPI SPI, I2C, UART UART, Wiegand
Card Types MIFARE Classic, Ultralight MIFARE, NTAG, FeliCa, ISO14443 EPC Gen2 / ISO18000-6C
Price (approx) ₹80-150 ₹350-600 ₹2,000-15,000
Best For Budget projects, learning NFC, phone interaction Inventory, long range

Our recommendation: Start with the RC522 for access control and attendance projects. Upgrade to PN532 if you need to interact with NFC-enabled smartphones or support more card types. Use UHF readers for warehouse inventory or vehicle tracking where long range is essential.

🛒 Recommended: RC522 RFID Card Reader Module 13.56MHz — The most popular RFID module for Arduino projects. Comes with a MIFARE Classic card and keychain tag.

Wiring RC522 to Arduino

RC522 Pin Arduino Uno ESP32
SDA (SS) D10 GPIO 5
SCK D13 GPIO 18
MOSI D11 GPIO 23
MISO D12 GPIO 19
IRQ Not connected Not connected
RST D9 GPIO 27
3.3V 3.3V 3.3V
GND GND GND

Important: The RC522 operates at 3.3V. While most breakout boards tolerate 5V on the SPI lines, always power VCC from the 3.3V rail.

Reading RFID Cards and Tags

Install the MFRC522 library by GithubCommunity from the Arduino Library Manager. Here is the basic card reading 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 - Zbotic.in");
  Serial.println("Place your card near the reader...");
}

void loop() {
  // Check for new card
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial()) return;
  
  // Print UID
  Serial.print("Card UID: ");
  for (byte i = 0; i < rfid.uid.size; i++) {
    if (rfid.uid.uidByte[i] < 0x10) Serial.print("0");
    Serial.print(rfid.uid.uidByte[i], HEX);
    if (i < rfid.uid.size - 1) Serial.print(":");
  }
  Serial.println();
  
  // Print card type
  MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
  Serial.print("Card type: ");
  Serial.println(rfid.PICC_GetTypeName(piccType));
  
  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
  
  delay(1000);
}
🛒 Recommended: 125kHz RFID Tag (5 pcs) — Budget-friendly keychain tags for access control projects, compatible with 125kHz readers.

Project: Door Access Control System

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

#define SS_PIN    10
#define RST_PIN    9
#define RELAY_PIN  7
#define BUZZER_PIN 6
#define LED_GREEN  5
#define LED_RED    4

MFRC522 rfid(SS_PIN, RST_PIN);

// Authorised card UIDs (add your card UIDs here)
byte authorisedCards[][4] = {
  {0xA3, 0xB2, 0xC1, 0xD0},  // Card 1 - Jayesh
  {0x12, 0x34, 0x56, 0x78},  // Card 2 - Visitor
  {0xAB, 0xCD, 0xEF, 0x01},  // Card 3 - Staff
};
int numCards = 3;

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  
  pinMode(RELAY_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
  pinMode(LED_RED, OUTPUT);
  
  digitalWrite(RELAY_PIN, LOW);
  digitalWrite(LED_RED, HIGH); // Red = locked
  
  Serial.println("Door Access Control System Ready");
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial()) return;
  
  if (isAuthorised(rfid.uid.uidByte)) {
    grantAccess();
  } else {
    denyAccess();
  }
  
  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
}

bool isAuthorised(byte* uid) {
  for (int i = 0; i < numCards; i++) {
    bool match = true;
    for (int j = 0; j < 4; j++) {
      if (uid[j] != authorisedCards[i][j]) {
        match = false;
        break;
      }
    }
    if (match) return true;
  }
  return false;
}

void grantAccess() {
  Serial.println("ACCESS GRANTED");
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_RED, LOW);
  digitalWrite(RELAY_PIN, HIGH);  // Unlock door
  tone(BUZZER_PIN, 2000, 200);    // Short beep
  delay(3000);                     // Keep unlocked 3 seconds
  digitalWrite(RELAY_PIN, LOW);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_RED, HIGH);
}

void denyAccess() {
  Serial.println("ACCESS DENIED");
  for (int i = 0; i < 3; i++) {    // 3 error beeps
    tone(BUZZER_PIN, 500, 200);
    delay(300);
  }
}

Project: Automated Attendance System

Combine the RC522 with an RTC (Real Time Clock) module and SD card for a standalone attendance logger:

#include <SPI.h>
#include <MFRC522.h>
#include <SD.h>
#include <Wire.h>
#include <RTClib.h>

MFRC522 rfid(10, 9);
RTC_DS3231 rtc;

// Student database
struct Student {
  byte uid[4];
  const char* name;
  const char* rollNo;
};

Student students[] = {
  {{0xA3, 0xB2, 0xC1, 0xD0}, "Rahul Sharma", "CS101"},
  {{0x12, 0x34, 0x56, 0x78}, "Priya Patel",  "CS102"},
  {{0xAB, 0xCD, 0xEF, 0x01}, "Amit Kumar",   "CS103"},
};
int numStudents = 3;

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  rtc.begin();
  SD.begin(4); // CS pin for SD card
  
  Serial.println("Attendance System Ready");
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial()) return;
  
  int studentIndex = findStudent(rfid.uid.uidByte);
  
  if (studentIndex >= 0) {
    DateTime now = rtc.now();
    
    // Log to SD card
    File logFile = SD.open("attend.csv", FILE_WRITE);
    if (logFile) {
      logFile.print(students[studentIndex].rollNo);
      logFile.print(",");
      logFile.print(students[studentIndex].name);
      logFile.print(",");
      logFile.printf("%02d/%02d/%04d", now.day(), now.month(), now.year());
      logFile.print(",");
      logFile.printf("%02d:%02d:%02d", now.hour(), now.minute(), now.second());
      logFile.println();
      logFile.close();
    }
    
    Serial.printf("%s (%s) marked present at %02d:%02dn",
      students[studentIndex].name,
      students[studentIndex].rollNo,
      now.hour(), now.minute());
    
    tone(6, 2000, 200); // Confirmation beep
  } else {
    Serial.println("Unknown card!");
    tone(6, 500, 500);  // Error beep
  }
  
  rfid.PICC_HaltA();
  delay(2000); // Prevent double tap
}

int findStudent(byte* uid) {
  for (int i = 0; i < numStudents; i++) {
    bool match = true;
    for (int j = 0; j < 4; j++) {
      if (uid[j] != students[i].uid[j]) { match = false; break; }
    }
    if (match) return i;
  }
  return -1;
}
🛒 Recommended: PN532 NFC RFID Read/Write Module V3 Kit — Supports NFC peer-to-peer communication with smartphones, read/write MIFARE and NTAG tags.

NFC Features with PN532

The PN532 goes beyond simple RFID reading — it supports full NFC functionality:

  • Card emulation: The PN532 can emulate an NFC tag, allowing an Android phone to read data from your Arduino
  • Peer-to-peer: Exchange data between the PN532 and an NFC-enabled smartphone
  • Read/Write NTAG: Write custom data (URLs, contact info, WiFi credentials) to NFC stickers
  • Multiple protocols: ISO14443A/B, FeliCa, and ISO18092 support

The PN532 module supports SPI, I2C, and UART interfaces. Use I2C for the simplest wiring (just SDA and SCL) or UART for the most reliable communication.

🛒 Recommended: 13.56MHz RFID IC Key Tag (2 pcs) — Compact keychain tags for access control and attendance, compatible with RC522 and PN532 modules.

Frequently Asked Questions

Can RC522 read my metro card or credit card?

The RC522 can detect and read the UID of MIFARE-based metro cards (Delhi Metro, Mumbai Metro). However, it cannot read the encrypted data on these cards. Credit/debit cards use different protocols and security — the RC522 can detect them but cannot read payment data.

What is the maximum read range of RC522?

The RC522 reads cards at 2-5 cm distance. This is by design — short range prevents accidental reads. For longer range (1-12 metres), you need UHF RFID readers which are significantly more expensive.

Can I write data to RFID cards?

Yes. MIFARE Classic cards have 1K or 4K of writable memory divided into sectors. You can write names, IDs, balance values, or any data using the MFRC522 library’s write functions. Each sector is protected by a key (default: FFFFFFFFFFFF).

How many cards can I store in Arduino?

An Arduino Uno has 2K SRAM and 32K flash. You can store approximately 500 card UIDs (4 bytes each) in flash using PROGMEM. For larger databases, use an SD card or ESP32 with SPIFFS/LittleFS filesystem.

Is RC522 waterproof for outdoor use?

No. The RC522 module is not weatherproof. For outdoor access control in Indian weather conditions, mount the module inside a waterproof enclosure (IP65 or higher) with the card reading area behind a thin non-metallic window.

Conclusion

RFID technology with the RC522 module offers an incredibly affordable entry point into contactless identification projects. At under ₹150 per module, you can build access control systems, attendance trackers, and inventory management solutions that would cost tens of thousands of rupees commercially. For more advanced NFC features and smartphone interaction, upgrade to the PN532. For long-range inventory scanning, step up to UHF RFID.

Start your RFID project today. Browse our collection of RFID modules, cards, and tags at Zbotic.in for the best prices and fast delivery across India.

Tags: access control, Arduino, PN532, rc522, rfid
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Best Waveshare Products for Be...
blog best waveshare products for beginners starter recommendations 612585
blog 4 channel relay module guide wiring safety and projects 612587
4-Channel Relay Module Guide: ...

Related posts

Svg%3E
Read more

ESP-NOW: Direct ESP32-to-ESP32 Communication Without WiFi

April 1, 2026 0
ESP-NOW ESP32 communication is a game-changing protocol developed by Espressif that enables direct peer-to-peer wireless communication between ESP32 boards without... Continue reading
Svg%3E
Read more

SDR Getting Started: HackRF and RTL-SDR Projects India

April 1, 2026 0
Software Defined Radio (SDR) lets you explore the electromagnetic spectrum using your computer, replacing expensive hardware radios with affordable USB... Continue reading
Svg%3E
Read more

Zigbee vs WiFi vs BLE: Choosing the Right Wireless Protocol for IoT

April 1, 2026 0
Choosing between Zigbee vs WiFi vs BLE for your IoT project is one of the most important design decisions you... Continue reading
Svg%3E
Read more

RS485 Modbus Communication: Industrial Sensors with Arduino

April 1, 2026 0
RS485 Modbus Arduino interfacing opens the door to industrial-grade sensor communication. Unlike hobbyist I2C or SPI sensors, RS485 Modbus sensors... Continue reading
Svg%3E
Read more

WiFi Mesh Network with ESP32: Whole-Home IoT Coverage

April 1, 2026 0
An ESP32 WiFi mesh network lets you extend IoT sensor coverage across your entire home, office, or campus without worrying... Continue reading

Add comment Cancel reply

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

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now