PN5321 MINI Documentation

PN5321 MINI Documentation provides quick start steps, pin mapping, ESP32 wiring examples, troubleshooting notes, and revision details for the ELECHOUSE PN5321 MINI w/ Interference-Resistant Antenna.

Quick Start

  1. Select the interface on the module by solder jumper: I2C, SPI, or HSU (UART).
  2. Power the module from 2.7V to 5.5V. For ESP32 designs, 3.3V power is recommended.
  3. Connect the antenna and keep it away from large metal areas during first tests.
  4. Install the ELECHOUSE PN532 Arduino library or another PN532-compatible library.
  5. Run a basic card-read example to confirm the board is responding.

Technical Summary

  • Controller: NXP PN532
  • Frequency: 13.56 MHz
  • Protocols: ISO/IEC 14443 A/B, ISO 15693, FeliCa
  • Interfaces: I2C, SPI, HSU (UART)
  • Supply voltage: 2.7V to 5.5V
  • I/O logic: 3.3V
  • Board size: 25 × 16.4 × 4.4 mm
  • Antenna options: 10×25 mm or 40×50 mm, ferrite-backed
  • Antenna connectors: MX1.25 and IPEX4

Pinout / Multi-Function Signal Mapping

Silkscreen I2C Mode SPI Mode HSU / UART Mode Notes
GND GND GND GND Ground
5V (or 3V3) 2.7–5.5V 2.7–5.5V 2.7–5.5V Board power input
RST RST RST RST Active-low reset, optional but recommended
SCK SCK SPI clock
MISO MISO SPI MISO
TX/MOSI/SDA SDA MOSI TX Multiplexed signal pin
RX/SS/SCL SCL SS RX Multiplexed signal pin

ESP32 Wiring

I2C (recommended for quick bring-up)

ESP32 PN5321 MINI Notes
3V3 5V/3V3 Prefer 3.3V supply for unified logic
GND GND Common ground
GPIO4 RST Optional active-low reset
GPIO21 TX/MOSI/SDA I2C SDA
GPIO22 RX/SS/SCL I2C SCL

SPI (VSPI default pins)

ESP32 PN5321 MINI Notes
3V3 5V/3V3 Logic is 3.3V
GND GND Common ground
GPIO4 RST Optional reset
GPIO18 SCK SPI clock
GPIO19 MISO Host input
GPIO23 TX/MOSI/SDA MOSI
GPIO5 RX/SS/SCL Chip select

HSU / UART2

ESP32 PN5321 MINI Notes
3V3 5V/3V3 Logic is 3.3V
GND GND Common ground
GPIO4 RST Optional reset
GPIO17 (TX2) RX/SS/SCL Module RX ← ESP32 TX2
GPIO16 (RX2) TX/MOSI/SDA Module TX → ESP32 RX2

HSPI note: if you use ESP32 HSPI (GPIO14 / 12 / 13 / 15), remember that GPIO12 and GPIO15 are strapping pins and can affect boot mode if they are pulled incorrectly during reset.

Supported Platforms

  • ESP32 (I2C, SPI, or UART)
  • Arduino boards with PN532-compatible libraries
  • Raspberry Pi / Linux through SPI or I2C
  • Compact embedded and OEM designs needing a remote ferrite-backed antenna

Initialization Method

  1. Choose the interface by solder jumper.
  2. Wire the module according to the selected mode.
  3. Use the matching PN532 transport wrapper in software.
  4. Call begin(), then check firmware response before testing cards.

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("PN5321 MINI not found");
    while (1) {}
  }

  nfc.SAMConfig();
  Serial.println("PN5321 MINI ready");
}

void loop() {
}

For first tests, start with a simple read example before moving to NDEF, P2P, or card emulation workflows.

Libraries and Resources

Common Errors

  • No response from board: interface jumper and code wrapper do not match.
  • ESP32 boot issues: HSPI strapping pins are being pulled in the wrong state.
  • Poor read distance: antenna is too close to metal, switching power circuitry, or high-current traces.
  • Unstable communication: supply is noisy, ground is weak, or the reset line is floating.

Troubleshooting

  • The included antenna is already ferrite-backed. In normal installations, no extra ferrite sheet is required.
  • Keep the antenna trace short and the cable routing clean.
  • Separate the antenna from switching regulators, motor drivers, and high-speed data pairs.
  • Start with I2C or VSPI on ESP32 before trying more complex interface combinations.

Version Differences

  • Product A and Product B in the manual share the same NXP PN532 chip and feature set.
  • The PN5321 MINI differs mainly by its compact board form factor and ferrite-backed external antenna arrangement.
  • Certified variants may differ only by antenna size (10×25 mm / 40×50 mm) or connector style (MX1.25 / IPEX4).

Update History

  • v1.1 manual: English edition, added ESP32 wiring tables for I2C, VSPI, UART2, and HSPI; clarified on-board I2C pull-ups and ferrite-backed antenna note.
  • v1.0 manual: Initial draft.
  • 2026-04-05: First public documentation page for PN5321 MINI published on ELECHOUSE docs.

Related Pages

Shopping Cart