Blogs
PN532 NFC RFID Read/Write Module V3 Kit
PN532 NFC RFID Read/Write Module V3 Kit
Advanced Near Field Communication for Arduino and Embedded Systems
Introduction
The PN532 NFC RFID Module V3 is a highly integrated transmission module for 13.56MHz contactless communication. Based on NXP’s PN532 chipset, it supports read/write operations with various NFC and RFID tags including Mifare, NTAG, and FeliCa.
Key Features
Multi-Protocol Support
Works with NFC, Mifare, ISO/IEC 14443 A/B, FeliCa
Multiple Interfaces
I2C, SPI, and UART communication options
Fast Operation
Supports up to 424kbps data transfer rate
Easy Integration
Works with 3.3V or 5V systems including Arduino
Technical Specifications
Operating Frequency | 13.56MHz |
---|---|
Supported Protocols | NFC, Mifare, ISO/IEC 14443 A/B, FeliCa |
Communication Range | Up to 5cm (depending on antenna) |
Interface Options | I2C, SPI, HSU (UART) |
Operating Voltage | 3.3V – 5V DC |
Current Consumption | ~100mA during operation |
Data Transfer Rate | Up to 424kbps |
Pin Configuration

Pin | Label | Description | Arduino Connection |
---|---|---|---|
1 | VCC | Power (3.3V or 5V) | 5V |
2 | GND | Ground | GND |
3 | SDA | I2C Data | A4 |
4 | SCL | I2C Clock | A5 |
5 | IRQ | Interrupt Request | D2 |
6 | RST | Reset | D3 |
Note: The module includes jumpers to select between I2C, SPI, and UART interfaces
Wiring with Arduino (I2C)
1 2 3 4 5 6 7 8 9 |
// Basic I2C Connections: // VCC → 5V // GND → GND // SDA → A4 (SDA) // SCL → A5 (SCL) // IRQ → D2 (optional) // RST → D3 (optional) // For SPI interface, different connections are required |
Important: Ensure correct interface jumpers are set before powering the module
Basic Tag Reading Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
// PN532 NFC Reader Basic Example (using Adafruit_PN532 library) #include <Wire.h> #include <Adafruit_PN532.h> #define PN532_IRQ (2) #define PN532_RESET (3) Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET); void setup() { Serial.begin(9600); nfc.begin(); uint32_t versiondata = nfc.getFirmwareVersion(); if (!versiondata) { Serial.println("PN532 not found"); while (1); } Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC); nfc.SAMConfig(); Serial.println("Waiting for NFC tag..."); } void loop() { uint8_t success; uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; uint8_t uidLength; success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength); if (success) { Serial.println("Found NFC tag!"); Serial.print("UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes"); Serial.print("UID Value: "); for (uint8_t i=0; i < uidLength; i++) { Serial.print(" 0x"); Serial.print(uid[i], HEX); } Serial.println(); delay(1000); } } |
Advanced Features
Tag Emulation
1 2 3 |
// Configure as NFC tag nfc.setPassiveActivationRetries(0xFF); nfc.startPassiveTargetIDDetection(PN532_MIFARE_ISO14443A); |
Mifare Classic Auth
1 2 3 4 |
// Authenticate with Mifare Classic uint8_t keya[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; success = nfc.mifareclassic_AuthenticateBlock( uid, uidLength, 4, 0, keya); |
NDEF Message Writing
1 2 3 4 |
// Write NDEF URL to NTAG uint8_t ndefprefix = NDEF_URIPREFIX_HTTP; uint8_t url[] = { 'e', 'k', 'o', 's', 't', 'r', 'a', '.', 'c', 'o', 'm' }; success = nfc.ntag2xx_WriteNDEFURI(ndefprefix, url, sizeof(url)); |
Peer-to-Peer
1 2 3 4 |
// Initialize NFC P2P nfc.InitDepTarget(); // Configure as Initiator/Target nfc.TgInitAsTarget(); |
Troubleshooting
Module Not Detected
- Verify interface jumpers are correctly set
- Check I2C/SPI address with scanner
- Ensure proper voltage (3.3V or 5V)
No Tag Detection
- Move tag closer to antenna (1-5cm)
- Check tag compatibility (Mifare, NTAG, etc.)
- Verify antenna connections
Communication Errors
- Check wiring connections
- Add pull-up resistors if using I2C
- Try lower communication speed