

The PN532, manufactured by Elechouse, is a versatile NFC (Near Field Communication) controller designed to enable seamless communication with NFC-enabled devices. It supports multiple modes of operation, including reader/writer, card emulation, and peer-to-peer communication. This makes it an ideal choice for a wide range of applications such as contactless payments, access control, and data exchange.
The PN532 is widely used in embedded systems and IoT projects due to its compatibility with microcontrollers like Arduino and Raspberry Pi. Its robust design and support for various NFC protocols make it a reliable and efficient solution for NFC-based applications.








Below are the key technical details and pin configuration of the PN532 module:
| Parameter | Value |
|---|---|
| Manufacturer | Elechouse |
| Part ID | PN532 |
| Communication Protocols | I2C, SPI, UART |
| Operating Voltage | 3.3V to 5V |
| Current Consumption | ~50mA (active mode) |
| NFC Standards Supported | ISO/IEC 14443 Type A & B, FeliCa, NFC-IP1 |
| Operating Frequency | 13.56 MHz |
| Operating Modes | Reader/Writer, Card Emulation, P2P |
| Detection Range | Up to 5 cm (depending on antenna design) |
| Dimensions | ~40mm x 40mm |
The PN532 module typically comes with an 8-pin header. Below is the pinout and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V). |
| 2 | GND | Ground connection. |
| 3 | SDA/MOSI | I2C data line (SDA) or SPI MOSI (Master Out Slave In) line. |
| 4 | SCL/SCK | I2C clock line (SCL) or SPI clock (SCK) line. |
| 5 | IRQ | Interrupt request pin, used for signaling events to the microcontroller. |
| 6 | RSTPD | Reset and power-down pin. Active low to reset the module. |
| 7 | TXD | UART transmit pin, used for serial communication. |
| 8 | RXD | UART receive pin, used for serial communication. |
The PN532 can be used in various configurations depending on the communication protocol (I2C, SPI, or UART). Below are the steps to use the PN532 module in a circuit and some best practices:
Wiring:
VCC pin of the PN532 to the 5V pin on the Arduino UNO.GND pin of the PN532 to the GND pin on the Arduino UNO.SDA pin of the PN532 to the A4 pin on the Arduino UNO.SCL pin of the PN532 to the A5 pin on the Arduino UNO.Install Required Libraries:
Example Code: Below is an example Arduino sketch to read an NFC tag using the PN532 in I2C mode:
#include <Wire.h>
#include <Adafruit_PN532.h>
// Define the I2C pins for the PN532
#define SDA_PIN A4
#define SCL_PIN A5
// Create an instance of the Adafruit_PN532 class
Adafruit_PN532 nfc(SDA_PIN, SCL_PIN);
void setup() {
Serial.begin(9600); // Initialize serial communication
Serial.println("Initializing PN532...");
nfc.begin(); // Initialize the PN532 module
uint32_t versiondata = nfc.getFirmwareVersion();
if (!versiondata) {
Serial.println("Didn't find PN532 board");
while (1); // Halt the program if the module is not detected
}
// Display firmware version
Serial.print("Found PN532 with firmware version: ");
Serial.print((versiondata >> 16) & 0xFF, HEX);
Serial.print('.');
Serial.println((versiondata >> 8) & 0xFF, HEX);
nfc.SAMConfig(); // Configure the module to read NFC tags
Serial.println("Waiting for an NFC tag...");
}
void loop() {
uint8_t success;
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the UID
uint8_t uidLength; // Length of the UID
// Try to read an NFC tag
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
if (success) {
Serial.println("NFC tag detected!");
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); // Wait 1 second before scanning again
}
}
PN532 Not Detected:
NFC Tag Not Detected:
Intermittent Communication Errors:
Can the PN532 read all types of NFC tags?
What is the maximum range of the PN532?
Can the PN532 be used for peer-to-peer communication?
By following this documentation, users can effectively integrate the PN532 into their projects and troubleshoot common issues.