# Piico RFID module on Arduino Nano 33

**URL:** <https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045>\
**Category:** Arduino\
**Created:** [17 October 2024 05:15 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045 "2024-10-17T05:15:09Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [17 October 2024 05:15 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/1 "2024-10-17T05:15:09Z")

</div>

Hi, I wish to implement (subject) using GPIO pins of the MCU board. Online tutorials have simply used expansion boards and Piicodev cables on RPi Pico specifically.

Any help in this direction would be great, thanks!

Regards,  
PC

---

<div class="post-metadata">

**Author:** ![Liam](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam/32/3562_2.png) [@Liam](https://forum.core-electronics.com.au/u/Liam)\
**Post date:** [17 October 2024 06:18 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/2 "2024-10-17T06:18:39Z")

</div>

Hi Prithul,

What programming language were you looking to use?  
If you are using micropython they you should be able to use the examples we provide - just make sure to change the pin numbers (all of the programming documentation can be found in the GitHub, linked from the product page).

If you want to use Arduino, you’ll have to find a library for the MFRC522 on the module.

Best of luck and let us know if you need a hand with anything else!  
Liam

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [17 October 2024 07:05 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/3 "2024-10-17T07:05:09Z")

</div>

Hi Liam, thanks for the quick response!

I am planning to use Arduino for now so I have been following MFRC522 examples. However, the board seems to not respond:  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/8/8d05720138dd0745360a15e500f03e0017d1877d.png)

Though I am not entirely sure, my connections are as follows [RFID module to Nano 33]:  
RST - D9  
INT - D10  
SCL - A5  
SDA - A4  
3.3V - 3.3V  
GND - GND

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/2/22d2e2e5578433814b2642d561df237638a3e431.png)

Regards,  
PC

---

<div class="post-metadata">

**Author:** ![Zach](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/zach/32/10899_2.png) [@Zach](https://forum.core-electronics.com.au/u/Zach)\
**Post date:** [18 October 2024 00:21 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/4 "2024-10-18T00:21:28Z")

</div>

Hey @Prithul271176,

Your pin connections seem sound at first glance. Any chance you could send a link to the MFRC522 library you used, as well as the code you’re uploading to the Arduino? There are a couple of things we can check once you’re sent those through.

If we can’t find the issue, I’ll see about getting it set up on my end to test.

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [18 October 2024 01:04 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/5 "2024-10-18T01:04:02Z")

</div>

Hi  
Looking at the Arduino layout maybe SDA should be A4.  
Cheers Bob

---

<div class="post-metadata">

**Author:** ![Zach](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/zach/32/10899_2.png) [@Zach](https://forum.core-electronics.com.au/u/Zach)\
**Post date:** [18 October 2024 01:26 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/6 "2024-10-18T01:26:02Z")

</div>

Hey @Robert93820,

Thanks for catching that one, not quite sure how I missed it, lol.

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [18 October 2024 02:23 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/7 "2024-10-18T02:23:25Z")

</div>

My bad, was a typo. Just double checked, it’s A4.

Good eye 🙂

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [18 October 2024 02:29 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/8 "2024-10-18T02:29:52Z")

</div>

Hey Zach, sure!

I am using this library: [GitHub - miguelbalboa/rfid: Arduino RFID Library for MFRC522](https://github.com/miguelbalboa/rfid)

My code is plainly based out of the example program with the package called DumpInfo.ino:

```auto
/*
 * --------------------------------------------------------------------------------------------------------------------
 * Example sketch/program showing how to read data from a PICC to serial.
 * --------------------------------------------------------------------------------------------------------------------
 * This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid
 * 
 * Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID
 * Reader on the Arduino SPI interface.
 * 
 * When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE
 * then verify/compile and upload it. To see the output: use Tools, Serial Monitor of the IDE (hit Ctrl+Shft+M). When
 * you present a PICC (that is: a RFID Tag or Card) at reading distance of the MFRC522 Reader/PCD, the serial output
 * will show the ID/UID, type and any data blocks it can read. Note: you may see "Timeout in communication" messages
 * when removing the PICC from reading distance too early.
 * 
 * If your reader supports it, this sketch/program will read all the PICCs presented (that is: multiple tag reading).
 * So if you stack two or more PICCs on top of each other and present them to the reader, it will first output all
 * details of the first and then the next PICC. Note that this may take some time as all data blocks are dumped, so
 * keep the PICCs at reading distance until complete.
 * 
 * @license Released into the public domain.
 * 
 * Typical pin layout used:
 * -----------------------------------------------------------------------------------------
 * MFRC522 Arduino Arduino Arduino Arduino Arduino
 * Reader/PCD Uno/101 Mega Nano v3 Leonardo/Micro Pro Micro
 * Signal Pin Pin Pin Pin Pin Pin
 * -----------------------------------------------------------------------------------------
 * RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
 * SPI SS SDA(SS) 10 53 D10 10 10
 * SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16
 * SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14
 * SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15
 *
 * More pin layouts for other boards can be found here: https://github.com/miguelbalboa/rfid#pin-layout
 */

#include <SPI.h>
#include <MFRC522.h>

#define RST_PIN D9 // Configurable, see typical pin layout above
#define SS_PIN A4 // Configurable, see typical pin layout above

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

void setup() {
	Serial.begin(9600); // Initialize serial communications with the PC
	while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
	SPI.begin(); // Init SPI bus
	mfrc522.PCD_Init(); // Init MFRC522
	delay(4); // Optional delay. Some board do need more time after init to be ready, see Readme
	mfrc522.PCD_DumpVersionToSerial();	// Show details of PCD - MFRC522 Card Reader details
	Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
}

void loop() {
	// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
	if ( ! mfrc522.PICC_IsNewCardPresent()) {
		return;
	}

	// Select one of the cards
	if ( ! mfrc522.PICC_ReadCardSerial()) {
		return;
	}

	// Dump debug info about the card; PICC_HaltA() is automatically called
	mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

```

I haven’t understood what INT means, and I don’t see where I should be passing that information in the code. This is what I really need help with also basically.

Regards,  
PC

---

<div class="post-metadata">

**Author:** ![Jack](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jack/32/9287_2.png) [@Jack](https://forum.core-electronics.com.au/u/Jack)\
**Post date:** [18 October 2024 03:03 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/9 "2024-10-18T03:03:37Z")

</div>

Hi @Prithul271176,

I think I can see your first hurdle. The [Piicodev RFID reader](https://core-electronics.com.au/piicodev-rfid-module.html) is an I2C device, not an SPI device. That library is trying to initialise the device as an SPI device.

I’m not sure how much work would go into making this library work but odds are you can find another that will work without many hiccups.

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [18 October 2024 03:22 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/10 "2024-10-18T03:22:21Z")

</div>

Hi Jack, thanks for that! I’ll try looking for an alternate library now. If you come across something, I’d really appreciate your efforts and help 🙂

Regards,  
PC

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/aaron/32/9861_2.png) [@Aaron](https://forum.core-electronics.com.au/u/Aaron)\
**Post date:** [18 October 2024 04:04 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/11 "2024-10-18T04:04:15Z")

</div>

Hi @Prithul271176,

I had a look at some libraries yesterday. Some claim they are for I2C but in their GitHub they say I2C isn’t working 🤷‍♂️

[This is the only one](https://github.com/kkloesener/MFRC522_I2C?tab=readme-ov-file) I found that mentions it works with I2C but I haven’t tested it yet.

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [18 October 2024 05:14 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/12 "2024-10-18T05:14:25Z")

</div>

Hi Aaron, thanks for the input. Let me have a look and get back to you!

PC

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [21 October 2024 03:15 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/13 "2024-10-21T03:15:34Z")

</div>

I am working on using [GitHub - kkloesener/MFRC522\_I2C](https://github.com/kkloesener/MFRC522_I2C) on an Arduino Uno, but I still don’t understand what **INT** is on the Piico RFID reader board.

Can someone please guide me here?

The example program for the said library does not initialise anything as such:

```auto
#define RST_PIN 6 // Arduino UNO
// #define RST_PIN 14 // D5 on NodeMCU

// 0x28 is i2c address of the NFC Reader. Check your address with i2cscanner if not match.
MFRC522_I2C mfrc522(0x28, RST_PIN); // Create MFRC522 instance.

```

**EDIT** : Surprisingly, I cannot find anything re this application on even a RPi without the Piicodev adapter.

PC

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/aaron/32/9861_2.png) [@Aaron](https://forum.core-electronics.com.au/u/Aaron)\
**Post date:** [21 October 2024 03:36 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/14 "2024-10-21T03:36:17Z")

</div>

Hi @Prithul271176,

The [Datasheet](https://github.com/CoreElectronics/CE-PiicoDev-RFID-Module/blob/main/Documents/MFRC522.pdf) and the [Schematic](https://github.com/CoreElectronics/CE-PiicoDev-RFID-Module/blob/main/Documents/schematic.pdf) from the [Hardware repo](https://github.com/CoreElectronics/CE-PiicoDev-RFID-Module) will be helpful in understanding more about the board.

The pin allows the MFCR522 chip to send a signal to interrupt the host. From what I can tell it isn’t explicitly needed for running this chip in general but can be helpful for streamlining software using this chip.

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [21 October 2024 04:25 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/15 "2024-10-21T04:25:21Z")

</div>

Hi Aaron, thanks for that!

I am testing this piece of code picked from [MFRC\_I2C\_Library](https://github.com/arozcan/MFRC522-I2C-Library/blob/master/examples/nodemcu_rfid/src/main.cpp), but it fails to detect the RFID reader.

```auto
#include <Wire.h>

#include "MFRC522_I2C.h"

#define SDA_PIN 18
#define SCL_PIN 19
#define RST_PIN 7

MFRC522 mfrc522(0x28, RST_PIN);	// Create MFRC522 instance.

void ShowReaderDetails();

void setup() {
	Serial.begin(9600);	// Initialize serial communications with the PC
	Wire.begin(); // Initialize I2C
	mfrc522.PCD_Init(); // Init MFRC522
	ShowReaderDetails();	// Show details of PCD - MFRC522 Card Reader details
	Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
}

void loop() {
	// Look for new cards
	if ( ! mfrc522.PICC_IsNewCardPresent()) {
		return;
	}

	// Select one of the cards
	if ( ! mfrc522.PICC_ReadCardSerial()) {
		return;
	}

	// Dump debug info about the card; PICC_HaltA() is automatically called
	mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

void ShowReaderDetails() {
	// Get the MFRC522 software version
	byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
	Serial.print(F("MFRC522 Software Version: 0x"));
	Serial.print(v, HEX);
	if (v == 0x91)
		Serial.print(F(" = v1.0"));
	else if (v == 0x92)
		Serial.print(F(" = v2.0"));
	else
		Serial.print(F(" (unknown)"));
	Serial.println("");
	// When 0x00 or 0xFF is returned, communication probably failed
	if ((v == 0x00) || (v == 0xFF)) {
		Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));
	}
}

```

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/3/383624b3d4b94134c8a92cac6768c3c7de3e386d.png)

**UPDATE** : I have double checked my wires to ensure they’re all working.  
PC

---

<div class="post-metadata">

**Author:** ![Prithul271176](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@Prithul271176](https://forum.core-electronics.com.au/u/Prithul271176)\
**Post date:** [22 October 2024 00:40 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/16 "2024-10-22T00:40:28Z")

</div>

Hi all,

I found the bug, I was using the wrong I2C address! I found the correct one using the method [here](https://www.instructables.com/How-to-Find-I2C-Address-of-Any-Device-Using-Arduin/). The following sketch works when my **RST** is **D7** on my Arduino Uno:

```auto
#include <Wire.h>
#include "MFRC522_I2C.h"

#define RST_PIN 7

// MFRC522 instance.
MFRC522 mfrc522(0x2C, RST_PIN);

void setup() {
  Serial.begin(115200); // Initialize serial communications with the PC
  Wire.begin(); // Initialize I2C
  mfrc522.PCD_Init(); // Init MFRC522
  ShowReaderDetails(); // Show details of PCD - MFRC522 Card Reader details
  Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
}

void loop() {
  // Look for new cards, and select one if present
  if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
    delay(50);
    return;
  }
  
  // Now a card is selected. The UID and SAK is in mfrc522.uid.
  
  // Dump UID
  Serial.print(F("Card UID:"));
  for (byte i = 0; i < mfrc522.uid.size; i++) {
    Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
    Serial.print(mfrc522.uid.uidByte[i], HEX);
  } 
  Serial.println();
}

void ShowReaderDetails() {
  // Get the MFRC522 software version
  byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
  Serial.print(F("MFRC522 Software Version: 0x"));
  Serial.print(v, HEX);
  if (v == 0x91)
    Serial.print(F(" = v1.0"));
  else if (v == 0x92)
    Serial.print(F(" = v2.0"));
  else
    Serial.print(F(" (unknown)"));
  Serial.println("");
  // When 0x00 or 0xFF is returned, communication probably failed
  if ((v == 0x00) || (v == 0xFF)) {
    Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));
  }
}

```

Thanks for your patience and support!

PC

---

<div class="post-metadata">

**Author:** ![Samuel](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/samuel/32/11763_2.png) [@Samuel](https://forum.core-electronics.com.au/u/Samuel)\
**Post date:** [22 October 2024 04:38 UTC](https://forum.core-electronics.com.au/t/piico-rfid-module-on-arduino-nano-33/21045/17 "2024-10-22T04:38:46Z")

</div>

Good to hear @Prithul271176!

Those I2C addresses can be an easy thing to overlook especially if you’re working with new libraries.

Best of luck with this project!
