PN7161 Documentation covers both major ELECHOUSE PN7161 variants: the standard PN7161 I2C module and the PN7161 MINI V1 — SPI. This page helps you choose the right interface, wire the board correctly, and start testing on Raspberry Pi, ESP32, and Linux-based systems.
PN7161 Variants at a Glance
| Variant | Interface | Typical Use |
|---|---|---|
| PN7161 standard module | I2C | General embedded NFC projects using SDA/SCL |
| PN7161 MINI V1 | SPI | Compact designs, ESP32 VSPI, Raspberry Pi SPI, and SPI-based controllers |
Which Version Should You Choose?
- Choose PN7161 I2C when your controller and firmware are built around an I2C NFC workflow.
- Choose PN7161 MINI SPI when your hardware uses SPI, board space is limited, or you want the existing VANT=5 V-tested Raspberry Pi / ESP32 SPI path.
- Choose the PN7161 family instead of PN7160 when your project needs Apple-related NFC capability such as Apple ECP support.
RF Supply Modes: 3.3 V or 5 V
The PN7161 I2C and PN7161 MINI SPI modules support either 3.3 V or 5 V on VANT when the host uses the matching PMU/TXLDO configuration. VDD is the host-I/O logic supply; keep it at the host logic voltage and never connect 5 V to VDD. VANT is not detected automatically.
| Mode | Typical 3.3 V-host wiring | Shared I2C example | Shared SPI example |
|---|---|---|---|
| 3.3 V RF supply | VDD=3.3 V, VANT=3.3 V, common GND | PN71XX_USE_SPI 0PN71XX_FIXED_VBAT_3V3 1 |
PN71XX_USE_SPI 1PN71XX_FIXED_VBAT_3V3 1 (current shared SPI default) |
| 5 V RF supply | VDD=3.3 V, VANT=5 V, common GND | PN71XX_USE_SPI 0PN71XX_FIXED_VBAT_3V3 0 (current shared I2C default) |
PN71XX_USE_SPI 1PN71XX_FIXED_VBAT_3V3 0 (must be set explicitly) |
Use ELECHOUSE library source version 3.1.2, commit 10a1cb2 or later. Put the definitions before including Electroniccats_PN71xx_ExampleTransport.h. They take effect through pn71xxConfigureExampleTransport(nfc); custom sketches that do not use the shared helper must call setPn7160FixedVbat3V3() directly before configureSettings(). Because begin() calls configureSettings() internally, select the preset before begin() when using that path.
The library exposes PN7150 and PN7160 selections. Use the PN7160-compatible path for both PN7161 variants. A custom I2C sketch must explicitly select PN7160 because the shorter three-argument constructor defaults to PN7150:
Electroniccats_PN7150 nfc(IRQ_PIN, VEN_PIN, 0x28, PN7160);
For a custom SPI sketch, explicitly select PN7160 in the SPI constructor as well. Power down before changing VANT or the preset, then cold-start and verify RF discovery and card reading.
Electroniccats_PN7150 nfc(IRQ_PIN, VEN_PIN, SS_PIN,
SCK_PIN, MISO_PIN, MOSI_PIN,
PN7160, &SPI);
PDF update notice: this web page reflects current dual-supply support. Until the linked guides are revised, a guide that shows VANT=5 V only documents the supported 5 V mode; use the configuration above for 3.3 V operation.
PN7161 I2C Quick Reference
The standard PN7161 module follows the same practical wiring style as PN7160 I2C boards.
Typical I2C Signals
- SDA
- SCL
- IRQ
- VEN
- VDD
- VANT
- GND
- DWL (optional)
Raspberry Pi 4 I2C Wiring
| PN7161 I2C | Raspberry Pi 4 | Notes |
|---|---|---|
| SDA | Pin 3 (SDA) | I2C data |
| SCL | Pin 5 (SCL) | I2C clock |
| IRQ | Pin 16 / GPIO23 | Interrupt |
| VEN | Pin 18 / GPIO24 | Enable / reset |
| VDD | Pin 1 / 17, 3.3V | Logic supply |
| VANT | 3.3 V mode: stable 3.3 V supply (Pi Pin 1 / 17 only if rail budget is sufficient); 5 V mode: Pin 2 / 4 | RF supply; Linux PMU/TXLDO configuration must match |
| GND | Pin 6 | Ground |
ESP32 I2C Wiring
| PN7161 I2C | ESP32 | Notes |
|---|---|---|
| SDA | GPIO21 | I2C data |
| SCL | GPIO22 | I2C clock |
| IRQ | GPIO14 | Interrupt |
| VEN | GPIO13 | Enable / reset |
| VDD | 3.3V | Logic supply |
| VANT | 3.3 V or 5 V | RF supply; select the matching software preset |
| GND | GND | Common ground |
| DWL | GPIO19 | Optional control pin in the guide |
I2C Reference Files
- Quick Guide I2C PDF
- ESP32 and PN7160 / PN7161 Arduino guide
- ELECHOUSE_PN7150_PN7160 (GitHub) for PN7150 / PN7160 / PN7161 Arduino and ESP32 development
- I2C address setting guide
PN7161 MINI V1 — SPI Quick Reference
The PN7161 MINI V1 — SPI is the SPI version of the PN7161 family. It is suitable for compact embedded designs and has an existing VANT=5 V validation path for Raspberry Pi and ESP32. The copy-paste 3.3 V Linux configuration remains under validation as described below.
Main SPI Signals
- MOSI
- MISO
- NSS
- SCK
- IRQ
- VEN
- VDD
- VANT
- GND
- DWL
Raspberry Pi 4 SPI Wiring
| PN7161 MINI SPI | Raspberry Pi 4 |
|---|---|
| MOSI | Pin 19 MOSI |
| MISO | Pin 21 MISO |
| NSS | Pin 24 NSS |
| SCK | Pin 23 SCLK |
| IRQ | Pin 16 GPIO23 |
| VEN | Pin 18 GPIO24 |
| VDD | Pin 1 / 17, 3.3V |
| VANT | 3.3 V mode: stable 3.3 V supply (Pi Pin 1 / 17 only if rail budget is sufficient); 5 V mode: Pin 2 / 4 |
| GND | Pin 6 GND |
| DWL | Pin 22 |
ESP32 VSPI Wiring
| PN7161 MINI SPI | ESP32 Dev Module | Notes |
|---|---|---|
| SCK | GPIO18 | SPI clock |
| MISO | GPIO19 | SPI MISO |
| MOSI | GPIO23 | SPI MOSI |
| SS / NSS | GPIO5 | Chip select |
| IRQ | GPIO14 | Interrupt |
| VEN | GPIO13 | Enable / reset |
| VDD | 3.3V | Logic supply |
| VANT | 3.3 V or 5 V | RF supply; select the matching software preset |
| GND | GND | Common ground |
Power reminder for ESP32 and similar MCUs: connect VDD to the 3.3 V host-logic rail and GND to GND. Connect VANT to either 3.3 V or 5 V and use the matching fixed-3.3V or normal external-5V preset.
SPI Software Notes
- On Raspberry Pi, enable SPI and use the
linux_libnfc-ncistack. - Set
NXP_TRANSPORT=0x03andNXP_NFC_DEV_NODE="/dev/spidev0.0"inlibnfc-nxp.conf. - On ESP32 and Arduino-compatible platforms, use ELECHOUSE library source version 3.1.2, commit
10a1cb2or later: ELECHOUSE_PN7150_PN7160 (GitHub). - Shared SPI examples default to the 3.3 V preset. When VANT is 5 V, explicitly set
PN71XX_FIXED_VBAT_3V3 0before the shared transport header. - PN7161 MINI SPI uses the library’s PN7160-compatible path.
- Validated card detection includes NFC-A, NFC-B, NFC-F, NFC-V, ISO15693, and MIFARE.
SPI Reference File
- Quick Guide SPI PDF
- ELECHOUSE_PN7150_PN7160 (GitHub) for PN7161 MINI V1 SPI Arduino and ESP32 development
- PN7161 MINI V1 — SPI product page
Linux Workflow Notes
Choose the NXP transport and device node that match the module interface:
- For I2C boards, enable I2C and use the corresponding I2C device setup.
- For SPI boards, enable SPI and map the Linux stack to
/dev/spidev0.0.
Power configuration is separate from transport configuration. The Arduino API and PN71XX_FIXED_VBAT_3V3 macro do not configure the NXP Linux NFC stack. Linux requires PMU/TXLDO values in the NXP middleware that match the physical VANT supply.
A copy-paste ELECHOUSE 3.3 V Linux configuration is still being validated. Do not copy Arduino preset bytes into libnfc-nxp.conf. Until a validated procedure for the exact middleware and module revision is published, use a 5 V configuration already validated for that setup or contact ELECHOUSE support.
Troubleshooting
- No response on I2C version: verify SDA, SCL, IRQ, VEN, power rails, and I2C address.
- No response on SPI version: verify MOSI, MISO, SCK, NSS, IRQ, VEN, and SPI transport settings.
- ESP32 communicates but does not read a tag: confirm VDD and VANT wiring, library source commit, and that the selected 3.3 V / 5 V preset is applied by
configureSettings(). - Linux stack starts but no tags are detected: re-check transport type, device node, IRQ/VEN wiring, and that the NXP PMU/TXLDO configuration matches VANT.
Related Pages
Update History
- 2026-08-28: Added software-matched 3.3 V and 5 V RF supply modes, clarified different shared I2C/SPI defaults, and separated Linux PMU/TXLDO configuration from Arduino macros.
