PN532 NFC-Near Field Communication RF-ID V3 Module
PN532 NFC-Near Field Communication RF-ID V3 Module
The PN532 NFC-Near Field Communication RF-ID V3 Module is a highly integrated, compact, and cost-effective solution for implementing Near Field Communication (NFC) and Radio Frequency Identification (RFID) technology in various applications. This module is based on the popular PN532 chipset from NXP Semiconductors, which provides a versatile platform for developing NFC-enabled devices.
| The PN532 NFC-Near Field Communication RF-ID V3 Module is designed to enable NFC communication between devices, allowing for the exchange of data, authentication, and payment transactions. It supports various NFC modes, including |
The module also supports RFID functionality, allowing it to read and write data to RFID tags.
13.56 MHz (NFC), 125 kHz/134 kHz (RFID)
Up to 424 kbps (NFC), up to 105 kbps (RFID)
Up to 10 cm (NFC), up to 1 meter (RFID)
-20C to +85C
-40C to +125C
40 mm x 35 mm x 5 mm
| The PN532 NFC-Near Field Communication RF-ID V3 Module is suitable for a wide range of applications, including |
Enables NFC-based device control and automation.
Supports secure authentication and access control using NFC and RFID technologies.
Facilitates secure payment transactions using NFC-enabled devices.
Enables secure data exchange and tracking in healthcare applications.
Supports IoT-based industrial automation and control systems.
Overall, the PN532 NFC-Near Field Communication RF-ID V3 Module provides a comprehensive and cost-effective solution for integrating NFC and RFID technology into various applications.
PN532 NFC-Near Field Communication RF-ID V3 Module DocumentationOverviewThe PN532 NFC-Near Field Communication RF-ID V3 Module is a highly integrated NFC (Near Field Communication) transceiver module that supports various NFC modes, including peer-to-peer, reader/writer, and card emulation modes. This module is based on the NXP PN532 chip and provides a convenient way to add NFC capabilities to various IoT projects.FeaturesSupports NFC tags (ISO/IEC 18092, ISO/IEC 21481, and ISO/IEC 14443A/Mifare)
Peer-to-peer mode for data exchange between two devices
Reader/writer mode for accessing NFC tags
Card emulation mode for emulating an NFC tag
I2C, SPI, and UART interfaces
Operating frequency: 13.56 MHz
Supports various operating systems, including Android, iOS, and WindowsHardware ConnectionThe PN532 NFC-Near Field Communication RF-ID V3 Module has the following pinouts:| Pin | Function |
| --- | --- |
| VCC | Power supply (3.3V or 5V) |
| GND | Ground |
| SCL | I2C clock |
| SDA | I2C data |
| MOSI | SPI data input |
| MISO | SPI data output |
| SCK | SPI clock |
| RX | UART receive |
| TX | UART transmit |
| IRQ | Interrupt request |Code ExamplesExample 1: Reading an NFC Tag using I2C Interface (Arduino)```cpp
#include <PN532_I2C.h>
#include <PN532.h>PN532_I2C pn532i2c(Wire);void setup() {
Serial.begin(115200);
pn532i2c.begin();
uint32_t versiondata = pn532i2c.getFirmwareVersion();
if (!versiondata) {
Serial.println("Didn't find PN53x board");
while (1); // halt
}
}void loop() {
bool success;
uint8_t uid[] = {0, 0, 0, 0, 0, 0, 0}; // Buffer to store the UID of the card
uint8_t uidLength; // Length of the UID
success = pn532i2c.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
if (success) {
Serial.println("Found an NFC tag:");
for (uint8_t i = 0; i < uidLength; i++) {
Serial.print(uid[i], HEX);
}
Serial.println("");
} else {
Serial.println("NFC tag not found");
}
delay(1000);
}
```Example 2: Writing Data to an NFC Tag using SPI Interface (Raspberry Pi with Python)```python
import spidev
import time# SPI connection
spi = spidev.SpiDev()
spi.open(0, 0) # CE0# PN532 commands
PN532_COMMAND.samconfiguration = 0x02
PN532_COMMAND.readgreg = 0x06
PN532_COMMAND.writegreg = 0x08def write_tag(uid, data):
# Send the SAM configuration command
spi.xfer2([PN532_COMMAND.samconfiguration, 0x01, 0x00, 0x00])# Send the InAT command
spi.xfer2([0x40, 0x01])# Send the Write command
spi.xfer2([PN532_COMMAND.writegreg, 0x06])
spi.xfer2(uid)
spi.xfer2(data)# Send the Stop command
spi.xfer2([0x70, 0x00])uid = [0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10] # Replace with the UID of your NFC tag
data = [0x01, 0x02, 0x03, 0x04, 0x05] # Data to be written to the NFC tagwrite_tag(uid, data)spi.close()
```Note: These examples demonstrate basic usage of the PN532 NFC-Near Field Communication RF-ID V3 Module and are not intended to be used in production environments without proper error handling and security measures.