Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. PN532 NFC RFID module V3 kits : Didn't find PN53x board

PN532 NFC RFID module V3 kits : Didn't find PN53x board

Scheduled Pinned Locked Moved Troubleshooting
arduinonfcpn532
3 Posts 3 Posters 7.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SebDominguez
    wrote on last edited by
    #1

    Hello

    I'm trying to make my PN532 NFC RFID module V3 kits working with my Arduino Uno.

    According to this manual to communicate with the Arduino in I2C mode I need to set the DIP switch like this :

    Channel 1: ON
    Channel 2: OFF
    

    Here is the wiring:
    Configuration Table

    Wiring

    I'v tried with this lib and the Adafruit one

    There is my code (it's the iso14443a_uid sketch)

    #if 0
      #include <SPI.h>
      #include <PN532_SPI.h>
      #include "PN532.h"
    
      PN532_SPI pn532spi(SPI, 10);
      PN532 nfc(pn532spi);
    #elif 0
      #include <PN532_HSU.h>
      #include <PN532.h>
          
      PN532_HSU pn532hsu(Serial1);
      PN532 nfc(pn532hsu);
    #else 
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      #include <NfcAdapter.h>
      
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
    #endif
      
    void setup(void) {
      Serial.begin(115200);
      Serial.println("Hello!");
    
      nfc.begin();
    
      uint32_t versiondata = nfc.getFirmwareVersion();
      if (! versiondata) {
        Serial.print("Didn't find PN53x board");
        while (1); // halt
      }
      
      // Got ok data, print it out!
      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);
      
      // Set the max number of retry attempts to read from a card
      // This prevents us from waiting forever for a card, which is
      // the default behaviour of the PN532.
      nfc.setPassiveActivationRetries(0xFF);
      
      // configure board to read RFID tags
      nfc.SAMConfig();
        
      Serial.println("Waiting for an ISO14443A card");
    }
    
    void loop(void) {
      boolean 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[0], &uidLength);
      
      if (success) {
        Serial.println("Found a card!");
        Serial.print("UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
        Serial.print("UID Value: ");
        for (uint8_t i=0; i < uidLength; i++) 
        {
          Serial.print(" 0x");Serial.print(uid[i], HEX); 
        }
        Serial.println("");
        // Wait 1 second before continuing
        delay(1000);
      }
      else
      {
        // PN532 probably timed out waiting for a card
        Serial.println("Timed out waiting for a card"
    [/code]);
      }
    }
    

    This is my output

    Hello!
    

    Thanks for help :)

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DavidZH
      wrote on last edited by
      #2

      In your sketch, remove everything above, and including #else and also the line #endif. You only need the I2C declarations in your case.

      Good luck!

      1 Reply Last reply
      0
      • K Offline
        K Offline
        knava.4
        wrote on last edited by
        #3

        Hi!

        I have the same problem. Did you resolve it?

        Thanks!

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        20

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular