PN532 V4 Documentation covers quick start steps, wiring references, supported platforms, code examples, and troubleshooting for the ELECHOUSE PN532 NFC RFID Module V4.
Quick Start
- Select the communication interface on the module before wiring it. PN532 V4 supports I2C, SPI, and HSU (High Speed UART).
- Wire the module to your host board using the header that matches the selected interface.
- Install the ELECHOUSE PN532 Arduino library.
- Open a basic example such as
readMifareoriso14443a_uid, compile, and upload. - Open the serial monitor at 115200 baud and tap a tag or card to verify communication.
Pinout and Wiring Reference
The board exposes separate headers for I2C and SPI. Follow the silkscreen on the module.
I2C Header
| Module Pin | Typical Arduino Uno | Notes |
|---|---|---|
| SCL | A5 | I2C clock |
| SDA | A4 | I2C data |
| VCC | 5V | Module supports 3.3V to 5V supply |
| GND | GND | Common ground required |
SPI Header
| Module Pin | Typical Arduino Uno | Notes |
|---|---|---|
| RSTO | Optional GPIO | Reset output / optional depending on sketch |
| IRQ | Optional GPIO | Interrupt line if used by your firmware |
| GND | GND | Common ground |
| VCC | 5V | Board supports 3.3V to 5V supply |
| SS | D10 | SPI chip select |
| MOSI | D11 | SPI MOSI |
| MISO | D12 | SPI MISO |
| SCK | D13 | SPI clock |
Note: PN532 V4 also supports HSU/UART mode. If you use HSU, make sure the module interface selection matches your wiring and chosen library wrapper.
Supported Platforms
- Arduino Uno, Mega, Leonardo, Nano, Due
- ESP32 and ESP8266
- Raspberry Pi through SPI or I2C
- Linux systems using
libnfcornfcpy - Windows hosts through a suitable serial or USB bridge workflow
Initialization Method
- Confirm the module is in the correct communication mode.
- Install the ELECHOUSE PN532 library from GitHub.
- Choose the correct transport wrapper in code:
PN532_I2C,PN532_SPI, orPN532_HSU. - Call
nfc.begin()and checkgetFirmwareVersion()before reading tags.
Example Code
#include <Wire.h>
#include <PN532_I2C.h>
#include <PN532.h>
PN532_I2C pn532_i2c(Wire);
PN532 nfc(pn532_i2c);
void setup() {
Serial.begin(115200);
nfc.begin();
uint32_t version = nfc.getFirmwareVersion();
if (!version) {
Serial.println("Didn't find PN53x board");
while (1) {}
}
nfc.SAMConfig();
Serial.println("PN532 ready");
}
void loop() {
}
Useful examples in the ELECHOUSE repository:
readMifareiso14443a_uidmifareclassic_memdumpemulate_tag_ndefp2p_raw
Drivers and Libraries
- ELECHOUSE PN532 library
- NDEF examples may also rely on Don’s NDEF library as noted in the repository README
- Linux users can test with
libnfcornfcpy
Common Errors
- No firmware response: the module interface selection and code wrapper do not match.
- No tag detected: wrong wiring, low supply voltage, or the tag is out of range / not supported.
- Unstable output: serial baud rate mismatch or loose jumper / breadboard wiring.
- Short read distance: metal nearby, poor tag orientation, or heavy electrical noise.
Troubleshooting
- Re-check the interface setting on the board before changing code.
- Use only one communication interface at a time.
- Start with a simple example such as
readMifarebefore trying NDEF or P2P. - Keep the antenna area clear of large metal objects during testing.
- If you move from V3 to V4, existing code should still work as long as the interface mode is correct.
V4 vs V3
| Metric | PN532 V3 | PN532 V4 |
|---|---|---|
| Reading distance (Mifare tag, PVC) | 5–6 cm | 6–8 cm |
| Reading distance (SRT512, PVC) | 1–2 cm | 2–4 cm |
| Compatibility | V4 is hardware- and software-compatible with V3 | |
Downloads and Support
Update History
- 2026-04-05: First public documentation page for PN532 V4.
- Hardware note: V4 improves reading performance while remaining compatible with V3 mechanical and software workflows.
