NFC Modules for ESP32 Projects
ESP32 works with ELECHOUSE NFC modules over SPI, I2C, or UART. The best module depends on protocol coverage, software architecture, interface, and whether Apple ECP hardware support is required.
Recommended Modules
PN532 NFC RFID Module V4 — Easiest All-Round Choice
PN532 V4 supports SPI, I2C, and UART and has the broadest beginner-oriented ESP32 examples.
- Protocols: ISO 14443A/B, MIFARE, FeliCa, and ISO 18092
- Interface: SPI / I2C / UART (switch selectable)
- Library: ELECHOUSE PN532 library
PN7160 NFC Module — NCI 2.0 and ISO 15693
The standard ELECHOUSE PN7160 module uses I2C. It is a better fit when the project needs an NFC-controller workflow, ISO 15693 / NFC-V, or alignment with Linux and Android NCI 2.0 integration.
- Protocols: ISO 14443A/B, ISO 15693, FeliCa, MIFARE, and NFC Forum Type 1–5 tags
- Interface on the standard ELECHOUSE module: I2C
- Arduino/ESP32 library: ELECHOUSE_PN7150_PN7160
PN7161 Family — Apple ECP Hardware Support
Choose PN7161 I2C for an SDA/SCL design or PN7161 MINI SPI for a compact SPI design. Both use the PN7160-compatible code path in the ELECHOUSE library.
PN7161 provides the related reader hardware capability. Apple Wallet / Apple VAS authorization, certification, application software, and access credentials remain the customer’s responsibility.
PN7160 / PN7161 RF Supply and Library Settings
For the documented 3.3 V ESP32 host workflow, connect VDD to 3.3 V and GND to GND. VANT may use either 3.3 V or 5 V, but the software power preset must match; this is not selected automatically. Never connect 5 V to VDD.
| Interface and VANT | Shared-example definitions | Default to check |
|---|---|---|
| I2C + 3.3 V | PN71XX_USE_SPI 0PN71XX_FIXED_VBAT_3V3 1 |
Shared I2C defaults the preset to 0, so enable 1 explicitly. |
| I2C + 5 V | PN71XX_USE_SPI 0PN71XX_FIXED_VBAT_3V3 0 |
Normal external-5V preset. |
| SPI + 3.3 V | PN71XX_USE_SPI 1PN71XX_FIXED_VBAT_3V3 1 |
Current shared SPI default. |
| SPI + 5 V | PN71XX_USE_SPI 1PN71XX_FIXED_VBAT_3V3 0 |
Set 0 explicitly; otherwise the shared SPI helper uses the 3.3 V preset. |
Use library source version 3.1.2, commit 10a1cb2 or later. Define the macros before Electroniccats_PN71xx_ExampleTransport.h; they take effect through pn71xxConfigureExampleTransport(nfc). A custom sketch that does not use that shared helper must call setPn7160FixedVbat3V3() before configureSettings(), or before begin() when using the shortcut initialization path.
For a custom I2C sketch, explicitly select the PN7160 model because the shorter three-argument constructor defaults to PN7150:
Electroniccats_PN7150 nfc(IRQ_PIN, VEN_PIN, 0x28, PN7160);
Power down before changing VANT. Published performance values identified as VANT=5 V remain 5 V test data and are not proof of identical 3.3 V performance.
ESP32 Wiring Summary
The pins below are a classic ESP32 manual-wiring example, not universal defaults for every ESP32 variant or every shared sketch. Check the selected board and example definitions before wiring.
| Module | Interface | Example ESP32 connections |
|---|---|---|
| PN532 V4 | SPI | SCK=18, MISO=19, MOSI=23, SS=5 |
| PN532 V4 | I2C | SDA=21, SCL=22 |
| PN532 V4 | UART | TX=17, RX=16 |
| PN7160 I2C | I2C | SDA=21, SCL=22, IRQ=14, VEN=13, VDD=3.3 V, VANT=3.3 V or 5 V, GND=GND |
| PN7161 I2C | I2C | SDA=21, SCL=22, IRQ=14, VEN=13, VDD=3.3 V, VANT=3.3 V or 5 V, GND=GND |
| PN7161 MINI SPI | SPI | SCK=18, MISO=19, MOSI=23, SS=5, IRQ=14, VEN=13, VDD=3.3 V, VANT=3.3 V or 5 V, GND=GND |
Which Module Should I Choose?
- Fastest path for common NFC cards and tags: PN532 V4.
- NCI 2.0 or ISO 15693 / NFC-V: PN7160 I2C.
- Apple ECP hardware support over I2C: PN7161 I2C.
- Apple ECP hardware support in a compact SPI module: PN7161 MINI SPI.
