PN7160 Documentation covers quick start steps, I2C wiring, Raspberry Pi and ESP32 setup, address configuration, libraries, and troubleshooting for the ELECHOUSE PN7160 NFC RFID Module.
Quick Start
- Use the module as an I2C NFC controller. This board is designed around NXP PN7160 with native NCI 2.0 firmware.
- Connect VDD, VANT, SDA, SCL, IRQ, VEN, GND, and optional DWL as required by your host platform.
- On Raspberry Pi, enable I2C first, then install linux_libnfc-nci.
- On ESP32 / Arduino IDE, use the ELECHOUSE_PN7150_PN7160 library workflow referenced below. This repository now covers PN7150, PN7160, and PN7161-related Arduino development.
- Run a basic poll / tag-detect example to confirm the module is responding.
Key Technical Facts
- Chip: NXP PN7160
- Interface: I2C via 8-pin 1.25 mm lockable connector
- NFC protocol stack: NCI 2.0
- VDD: 1.8V or 3.3V
- VANT: 2.5V to 5.8V
- Antenna: on-board PCB antenna
- Board size: 42.83 mm × 40.53 mm
- Modes: Reader/Writer, Peer-to-Peer, Card Emulation
Pinout / Wiring Reference
| PN7160 Pin | 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 control |
| VDD | Pin 1 / 3.3V | Logic supply |
| VANT | Pin 2 or 4 / 5V | Antenna supply |
| GND | Pin 6 / GND | Common ground |
| DWL | Pin 22 | Optional download / maintenance pin |
ESP32 Wiring (Arduino IDE guide)
| PN7160 | ESP32 | Notes |
|---|---|---|
| DWL | GPIO19 | Download / control pin used by sample workflow |
| SDA | GPIO21 | I2C data |
| SCL | GPIO22 | I2C clock |
| IRQ | GPIO14 | Interrupt |
| VEN | GPIO13 | Enable / reset control |
| VDD | 3V3 | Logic supply |
| GND | GND | Common ground |
| VANT | 5V | Antenna supply |
Supported Platforms
- Raspberry Pi
- Linux systems using NXP
linux_libnfc-nci - ESP32 in Arduino IDE
- Android / embedded Linux systems using NCI 2.0 workflows
- i.MX, LPC, Kinetis, and other embedded platforms with I2C support
Initialization Method
Raspberry Pi / Linux
- Enable I2C in
raspi-config. - Verify
/dev/i2c-1exists. - Install prerequisites:
autoconf automake libtool git. - Clone
linux_libnfc-nciand use the PN7160 branch / config flow from the quick guide. - Set
NXP_TRANSPORT=0x02andNXP_NFC_DEV_NODE="/dev/i2c-1"inlibnfc-nxp.conf. - Build, install, and test with
nfcDemoApp poll.
ESP32 / Arduino IDE
- Install the ELECHOUSE_PN7150_PN7160 library from GitHub.
- Wire the board as shown above.
- Open the example sketch, update pin definitions if needed, and upload.
- Open Serial Monitor to verify tag detection.
Libraries and Drivers
- NXP linux_libnfc-nci for Linux-based NCI workflows
- ELECHOUSE_PN7150_PN7160 (GitHub) for PN7150 / PN7160 / PN7161 Arduino and ESP32 development
- Quick Guide (Raspberry Pi / I2C)
- ESP32 and PN7160 in Arduino IDE
- I2C address setting guide
- Schematic PDF
I2C Address Options
The module supports multiple 7-bit I2C addresses through resistor configuration on the address pins:
- 0x28
- 0x29
- 0x2A
- 0x2B
The ELECHOUSE address-setting PDF also lists the corresponding 8-bit read / write values for each configuration.
Example Workflow
# Raspberry Pi / Linux quick test
sudo raspi-config
# enable I2C
ls /dev/i2c*
git clone https://github.com/NXPNFCLinux/linux_libnfc-nci.git -b NCI2.0_PN7160
cd linux_libnfc-nci
./bootstrap
./configure
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
nfcDemoApp poll
Common Errors
- No device found on Raspberry Pi: I2C is not enabled or wiring is incomplete.
- Build succeeds but no polling response:
libnfc-nxp.conftransport / device node settings are wrong. - ESP32 sketch uploads but no tag read: VEN / IRQ / DWL pins do not match the example configuration.
- Wrong address: the board resistor configuration does not match the address expected by the host.
Troubleshooting
- Start with the official Raspberry Pi quick guide before changing the software stack.
- Verify both VDD and VANT are supplied correctly.
- Use a short, stable I2C connection during bring-up.
- If multiple NFC modules are present, confirm the selected I2C address.
Version Differences
- PN7160 is the base NCI 2.0 module in this family.
- PN7161 is the closely related upgrade path when Apple ECP support is required.
Update History
- 2026-04-05: First public PN7160 documentation page published.
- Reference documents: quick guide, ESP32 guide, and I2C address guide incorporated into this page.
Related Pages
- PN7160 Product Page
- PN7160 vs PN7161
- PN532 vs PN7160 vs ST25R3916
- Best NFC Module for Raspberry Pi / Linux
RFID & NFC Module Selection Guide
Not sure which module fits your project? See the full comparison with protocol support, interface options, and use case guidance in our RFID & NFC Module Selection Guide.
Related Documentation
- PN7160 Documentation – I2C NFC module, good alternative for most projects
- PN532 V4 Documentation – versatile NFC module with I2C, SPI, UART
- PN532 vs PN7160 vs ST25R3916 Comparison
- PN532 V4 vs PN5321 MINI Comparison
Supported NFC Standards and Card Types
| Standard | Typical Cards / Tags | Read | Write | Notes |
|---|---|---|---|---|
| ISO 14443A | Mifare Classic, Ultralight, NTAG, DESFire | ✓ | ✓ | Most common NFC cards |
| ISO 14443B | Bank cards, national ID chips | ✓ | Limited | |
| ISO 15693 | ICODE SLI, ICODE SLIX2, TI HF-I vicinity tags | ✓ | ✓ | PN7160 supports this; PN532 does not |
| FeliCa | Suica, Octopus, PASMO | ✓ | Limited | |
| NFC Forum T2T–T5T | NTAG21x, Ultralight, ICODE SLI | ✓ | ✓ | NDEF read/write |
ESP32 / Arduino Code Example
The PN7160 uses NCI 2.0 over I2C. Use the Electroniccats PN7160 library:
#include <Electroniccats_PN7160.h>
#define PN7160_IRQ 14
#define PN7160_VEN 13
#define PN7160_ADDR 0x28
Electroniccats_PN7160 nfc(PN7160_IRQ, PN7160_VEN, PN7160_ADDR);
void setup() {
Serial.begin(115200);
if (nfc.begin()) {
Serial.println("Error: PN7160 not detected");
while (1);
}
nfc.configMode(mode_READER_WRITER);
nfc.startDiscovery();
Serial.println("PN7160 ready — tap a tag");
}
void loop() {
if (nfc.isTagDetected()) {
Serial.print("Tag detected. Protocol: ");
Serial.println(nfc.remoteDevice.getProtocol());
Serial.print("UID: ");
for (int i = 0; i < nfc.remoteDevice.getIdLen(); i++) {
Serial.printf("%02X ", nfc.remoteDevice.getId()[i]);
}
Serial.println();
nfc.waitForTagRemoval();
nfc.restartDiscovery();
}
}
Library: Electroniccats PN7160 on GitHub. Pin numbers match the ESP32 wiring table above.
Reading ISO 15693 Tags (Vicinity RFID)
ISO 15693 is a key advantage of the PN7160 over the PN532 family. It allows reading of industrial vicinity tags at greater distances than standard ISO 14443 cards.
Common ISO 15693 tags include NXP ICODE SLI/SLI-S/SLIX2 and TI HF-I series. These are widely used in:
- Library book tracking
- Pharmaceutical packaging and lab sample labels
- Asset and inventory management
- Industrial conveyor and parts tracking
With the on-board PCB antenna, typical ISO 15693 reading distance is 3–6 cm under standard conditions. A larger external antenna can extend this further.
// ISO 15693 detection via NCI — PN7160 polls all supported standards automatically.
// No special initialization needed; just start discovery and check the protocol
// field of detected tags:
if (nfc.isTagDetected()) {
if (nfc.remoteDevice.getProtocol() == PROT_T5T) {
Serial.println("ISO 15693 tag detected");
// Read blocks using library methods
}
}
PN7160 vs PN532 — Key Differences
| Feature | PN7160 | PN532 |
|---|---|---|
| ISO 15693 | ✓ Supported | ✗ Not supported |
| NCI 2.0 firmware | ✓ | ✗ (older TML) |
| Interface | I2C only | I2C / SPI / UART |
| Arduino library ecosystem | Electroniccats library | Large ecosystem (ELECHOUSE, Adafruit, etc.) |
| Linux / Android NCI driver | Native support | Requires libnfc |
| Apple ECP | ✗ | ✗ (need PN7161) |
Raspberry Pi 5 (Bookworm) Compatibility Note
Important: The standard linux_libnfc-nci stack uses the /sys/class/gpio pseudo-filesystem for GPIO control. This interface is deprecated in Linux kernel 6.6, which is the default kernel in Raspberry Pi OS Bookworm (the official OS for Raspberry Pi 5).
If you see GPIO errors or the library fails to control IRQ/VEN pins on a Raspberry Pi 5 running Bookworm, you need to use the libgpiod interface instead.
Fix for Raspberry Pi 5 / Bookworm
# Install libgpiod on Raspberry Pi OS Bookworm
sudo apt-get install libgpiod-dev gpiod
# Verify GPIO chip availability
gpiodetect
# Should list: gpiochip0 [pinctrl-rp1] (54 lines)
# Then rebuild linux_libnfc-nci with libgpiod backend
# Refer to the NXP Community guide for updated build steps:
# https://community.nxp.com/t5/NFC-Knowledge-Base/Porting-PN7160-NCI2-stack-to-Raspberry-Pi-5-OS-Bookworm/ta-p/1977521
On Raspberry Pi 4 running Bullseye (or older OS), the standard /sys/class/gpio approach still works. Only Raspberry Pi 5 with Bookworm OS requires the libgpiod workaround.
Quick Platform Compatibility Summary
| Hardware | OS | GPIO Method | Status |
|---|---|---|---|
| Raspberry Pi 4 | Bullseye / Buster | /sys/class/gpio | ✓ Standard guide works |
| Raspberry Pi 4 | Bookworm | /sys/class/gpio | ⚠️ May need libgpiod patch |
| Raspberry Pi 5 | Bookworm | libgpiod required | ⚠️ Must use libgpiod |
| ESP32 (Arduino IDE) | — | Direct pin control | ✓ No issue |
