ESP32 Bit Pirate home

Recipe · Beginner · RFID

Wire a PN532 RFID reader in I2C mode

RFID mode expects a PN532 reader set to I2C mode, then configures the selected SDA and SCL pins.

RFID reader communicating with a contactless tag.
Set the module to I2C mode before connecting the bus.

Documented wiring roles

  • SDA → selected I2C SDA
  • SCL → selected I2C SCL
  • VCC → supported module supply
  • GND → GND

Initialize the reader

Enter RFID mode and run config. If detection fails, the Wiki recommends checking the I2C wiring, selected SDA/SCL pins and I2C mode selection on the PN532.

PN532 I2C wiring FAQ

How do I know the PN532 is really in I2C mode?

Check the module DIP switch or solder jumper setting before wiring. If the board is still in SPI or HSU mode, the I2C scan and RFID config can fail even when SDA and SCL are correct.

What should I check when the PN532 is not detected?

Verify SDA, SCL, ground, supply voltage, I2C mode selection and pullups. Then try a short I2C scan before RFID commands so you know the bus can see the reader.

Why does tag reading fail after the reader initializes?

Initialization only proves the PN532 is reachable. Tag reads can still fail because of distance, orientation, unsupported tag type, weak supply, or a module antenna that is too close to metal.