RC522 Mini Not Work vs RC522 Normal
Opened this issue · 5 comments
Step 1: Describe your environment
- MFRC522 Library version: 1.4.10
- Arduino device: ESP32-WROOM-32D
- MFRC522 devices: MW-ET LIVE MINI RFID-RC522 and RFID-RC522
Step 2:
Hello,
I have a full size RC522 module and working 100% OK
I paid for 3 "MW-ET LIVE MINI RFID-RC522" units, and none of them work, but they pass the "PCD_PerformSelfTest()".
Are Minis different?
Affected file(s) or example(s):
self test
Steps to reproduce:
Observed Results:
- Normal Size RC522 :
MFRC522 Digital self test
Firmware Version: 0x92 = v2.0
Only known versions supported
Performing test...
Result: OK
- MW-ET LIVE MINI RFID-RC522 :
MFRC522 Digital self test
Firmware Version: 0x92 = v2.0
Only known versions supported
Performing test...
Result: OK
Expected Results:
- Read on both RC522 types. But I can only read TagID in normal format
Relevant Code:
#include <Arduino.h>
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 16
#define RST_PIN 13
MFRC522 rfid(SS_PIN, RST_PIN);
void setup() {
Serial.begin(115200);
while (!Serial);
SPI.begin(5,19,27,16);
rfid.PCD_Init(); // init MFRC522
delay(10);
Serial.println("Iniciou RFid");
delay(100);
Serial.println(F("*****************************"));
Serial.println(F("MFRC522 Digital self test"));
Serial.println(F("*****************************"));
rfid.PCD_DumpVersionToSerial(); // Show version of PCD - MFRC522 Card Reader
Serial.println(F("-----------------------------"));
Serial.println(F("Only known versions supported"));
Serial.println(F("-----------------------------"));
Serial.println(F("Performing test..."));
bool result = rfid.PCD_PerformSelfTest(); // perform the test
Serial.println(F("-----------------------------"));
Serial.print(F("Result: "));
if (result)
Serial.println(F("OK"));
else
Serial.println(F("DEFECT or UNKNOWN"));
Serial.println();
}
void loop() {
if (rfid.PICC_IsNewCardPresent()) { // new tag is available
Serial.println("NEW...");
if (rfid.PICC_ReadCardSerial()) { // NUID has been readed
MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
Serial.print("RFID/NFC Tag Type: ");
Serial.println(rfid.PICC_GetTypeName(piccType));
// print UID in Serial Monitor in the hex format
Serial.print("UID:");
for (int i = 0; i < rfid.uid.size; i++) {
Serial.print(rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(rfid.uid.uidByte[i], HEX);
}
Serial.println();
rfid.PICC_HaltA(); // halt PICC
rfid.PCD_StopCrypto1(); // stop encryption on PCD
}
}
delay(250);
}
Without seeing the schematic, it sounds like they may have omitted the pullup resistor and/or put an inverter on the RST line. Normally, this pin can be ignored - it's pulled HIGH by default, and you only need write a LOW signal to it to reset the reader. From the description given by @alex-eri , it sounds like you need to do the opposite for this board.
Not inverted. Pull down needed to make this line of code work
https://github.com/miguelbalboa/rfid/blob/1e73cd34d977c5fe17fa5f2e2e8174650a572028/src/MFRC522.cpp#L210C2-L210C2
else RST pin stays in INPUT mode and FLOATING on many boards ( for example ESP32)
pulled HIGH by default only on board without FLOATING input (Arduinos).