Module – PN532 – RFID/NFC transciever



Informatie (ENG)

The PN532 is a 13.56 MHz RFID reader chip. It’s common and very easy to interface to with the PN532 module.

Features and Specifications:

  • 80C51 microcontroller core with 40 Kbyte ROM and 1 Kbyte RAM
  • Highly integrated analog circuitry to demodulate and decode responses
  • Buffered output drivers to connect an antenna with minimum number of external components
  • Integrated RF level detector
  • Integrated data mode detector
  • RFID reader/writer mode support [MIFARE 1k, 4k, Ultra light, and DESFIRE cards, ISO/IEC 14443-4 cards such as CD97BX, CD light, DESFIRE, P5CN072 (SMX),  INNOVISION Jewel cards such as IRT5001 card, FELICA cards such as RCS_860 and RCS_854]
  • Built in PCB Antenna, with 5cm to7cm communication distance
  • Supports MIFIRE higher transfer speed communication at 212Kbits/s and 424 Kbits/s
  • Supported host communication: SPI Interface, I2C Interface and High Speed Serial UART
  • Flexible interrupt using IRQ pin
  • Hard reset with low power function
  • Power down mode per embedded firmware
  • Automatic wake up on HSU,I2C and SPI interfaces when device is in power down mode
  • Programmable timer
  • Contactless communication at 13.56MHz
  • On-board level shifter, Standard 5V TTL for I2C and UART, 3.3V TTL SPI
  • Work as RFID reader and writer
  • Work as RFID card or  a virtual card
  • Operating  voltage: +2.7V to +5.5V
  • On-board level shifter: Standard 5V TTL for I2C and UART, 3.3V TTL SPI
  • Low power modes: Hard-Power-Down mode (1µA typical), Soft-Power-Down mode (22µA typical)
  • Operating temperature: -30ºC to +85ºC

How to use PN532 NFC module?

For using PN532 module, first we will choose the mode of communication between MODULE and CONTROLLER. As mentioned earlier this module has three interfaces, of which we have to choose one. Remember at any given point of time only one of three interfaces can be used. All three cannot be used together. We will have to choose the mode of interface using two switches solder to the board. The switches are S1 and S2 shown in pin diagram.

S1 S2 Interface

Choose the mode of interface and corresponding state of switches from above table. Next toggle the switches S1 and S2 to those positions.

After choosing the type of interface, connect the module to the controller or processor. Say if you opted to use I2C, then connect module to I2C of the controller. If you opted to use SPI, then connect module to SPI of controller.

After interfacing you have to download the library files for the module from corresponding websites. Say for ARDUINO platform []. Save the library files in the IDE program files.

Now all that left is to write the program for the controller or ARDUINO in the IDE software. And do call up on the saved library files while writing the program. With those libraries we can directly communicate with the module while skipping all the steps of communication protocol.

Once the programming is done, power up the circuit to get the desired response.


Media or Data sharing


Smart Phones and Smart devices

Security systems

Computer Peripherals

Package Identification

Theft protection systems


The description of each pin of the module is given below.

Pin Number Description
VCC Should be power source.
GND Should be connected to ground.
SDA/TXD SDA: Serial Data pin[I2C Interface]

TXD: Transmit pin[UART Interface]

SCL/RXD SCL: Serial Clock pin[I2C Interface]

RXD: Receive pin [UART Interface]

SCK Serial Clock pin [SPI Interface]
MISO Master Input Slave  Output pin [SPI Interface]
MOSI Master Output Slave Input pin [SPI Interface]
SS Slave Select pin [SPI Interface]
IRQ Interrupt Signal pin [SPI Interface]
RSTO Reset pin


I2C mode

Sluit de module aan volgens onderstaand overzicht:

Script met bibliotheek

Wat heb je nodig?

1) PN532 library

Example script from the library

Script met block reads:

RX/TX mode

Sluit de module aan volgens onderstaand overzicht:

Script met bibliotheek

Wat heb je nodig?

1) PN532 library

Example script from the library



Arduino Library

Installatie van Arduino IDE libraries: Arduino info

NFC library for Arduino

This is an Arduino library for PN532 to use NFC technology. It’s based on Adafruit_NFCShield_I2C , improved by Seeed Studio, added HSU(High Speed Uart) driver by Elechouse.


  • Support all interfaces of PN532 (I2C, SPI, HSU )
  • Read/write Mifare Classic Card
  • Works with Don’s NDEF Library
  • Support Peer to Peer communication(exchange data with android 4.0+)
  • Support mbed platform

Getting Started

  1. Download zip file and extract the three folders(PN532, PN532_SPI, PN532_HSU and PN532_I2C) into libraries of Arduino.
  2. Downlaod Don’s NDEF library and extract it into libraries of Arduino’s into a new folder called “NDEF” (Note if you leave this folder as NDEF-Master Arduino will not be able to use it as a library)
  3. Follow the examples of the PN532 library

To do

  • Card emulation

HSU Interface

HSU is short for High Speed Uart. HSU interface needs only 4 wires to connect PN532 with Arduino, Sensor Shield can make it more easier. For some Arduino boards like LeonardoDUEMega ect, there are more than one Serial on these boards, so we can use this additional Serial to control PN532, HSU uses 115200 baud rate .

To use the Serial1 control PN532, refer to the code below.

If your Arduino has only one serial interface and you want to keep it for control or debugging with the Serial Monitor, you can use the SoftwareSerial library to control the PN532 by emulating a serial interface. Include PN532_SWHSU.h instead of PN532_HSU.h:



Raspberry Pi

Sluit de module aan volgens onderstaand overzicht:

Instalation script for PN532 on raspberry Pi:

Example python script: