Trouble interfacing with Arduino Nano and PN532 board (Didn't find PN53x board)

I apologize in advance if this post breaks any rules as it is my first post, I have done my best to follow the debugging process/etiquette pinned at the top of this topic and I haven’t gotten anywhere for a few days.

I am ultimately trying to make a device that reads an NFC tag and sends a signal to a relay in my car that will unlock the doors. Currently I am trying to get the nano and PN532 board to communicate using the I2C protocol.

Images of the boards, my soldering, and my wiring

Datasheet for PN532

I have mainly been going off of this video (which is where I got the code) but I have found a few other posts over the last few days that haven’t helped me much.

Here is the code:

#include <Wire.h>
#include <Adafruit_PN532.h>

// If using the breakout or shield with I2C, define just the pins connected
// to the IRQ and reset lines.  Use the values below (2, 3) for the shield!
#define PN532_IRQ   (2)
#define PN532_RESET (3)  // Not connected by default on the NFC Shield

// Or use this line for a breakout or shield with an I2C connection:
Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET);

void setup(void) {


  uint32_t versiondata = nfc.getFirmwareVersion();
  if (! versiondata) {
    Serial.print("Didn't find PN53x board");
    while (1); // halt

  Serial.print("Found chip PN5"); Serial.println((versiondata >> 24) & 0xFF, HEX);
  Serial.print("Firmware ver. "); Serial.print((versiondata >> 16) & 0xFF, DEC);
  Serial.print('.'); Serial.println((versiondata >> 8) & 0xFF, DEC);

  // configure board to read RFID tags

  Serial.println("Waiting for an ISO14443A Card ...");

void loop(void) {
  uint8_t success;
  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
  uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
  // 'uid' will be populated with the UID, and uidLength will indicate
  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);

  if (success) {
    // Display some basic information about the card
    Serial.println("Found an ISO14443A card");
    Serial.print("  UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
    Serial.print("  UID Value: ");
    nfc.PrintHex(uid, uidLength);

    if (uidLength == 4) {
      // We probably have a Mifare Classic card ...
      uint32_t cardid = uid[0];
      cardid <<= 8;
      cardid |= uid[1];
      cardid <<= 8;
      cardid |= uid[2];
      cardid <<= 8;
      cardid |= uid[3];
      Serial.print("Seems to be a Mifare Classic card #");

My problem is that the first for loop is entered because the board is not detected and all I get out of the serial monitor is

Didn’t find PN53x board

Here is what I have tried already:

  • Using 2 different Nanos in case one was buggy
  • I tried to take a look at the library to find out why the board wasn’t being detected but in all honesty C programming, especially header files confuse me a bit and I wasn’t able to comprehend them or how they worked.
  • I made sure sure that I had selected the right port and that the serial monitor was set to the correct baud rate.

If anyone could help me solve this problem or direct me to a resource that would set me on the right path I would greatly appreciate it. I would also be more than happy to provide any other information I might have neglected to include in this post. Thank you!

First step with i2c should be the scan with an i2c scanner. Only if the i2c scanner can identify module, you should proceed with the first example.

Thank you for making me aware of this tool, I used it with my current setup and I got:

No I2C devices found

from the serial monitor. I’m starting to think my problem might be that I may have fried the PN532 module as I fried a nano while it was connected to the PN532 module, although no smoke came out of the PN532 module. I’ve bought a second PN532 module and I’ll update this thread when it arrives in a few days.

I have also tried using the libraries and examples listed in this GithHub repo but I had the same results as before which leads me to further believe that this might be a hardware issue.

Thanks again for your help!

Solved my problem, I didn't know what DPI switches were and I had no idea they were on the board. Turns out the board was set to High speed UART and I had only tried to use it as SPI and I2C. After setting the switches to the proper settings everything worked beautifully. Thanks to everyone for your help!