Title states my opinion of this garbage RFID module.
Just like my previous project, This is part of the same project of finding the best style opensourced RFID reader/writer combo.
This module can read Mifare Ultralight, Classic 1K and Classic 4k cards…
I say the above on baited breath gritting through my teeth because yes, it “can” read these items, however the antenna design is poor, the coupling is poor, and the overall functionality of this module is poor. Range is piss-poor.
If you want your own little bundle of disapointment heres how you can make it:
RC522 – Arduino
SDA - D10
SCK - D13
MOSI - D11
MISO - D12
IRQ - Not connected
GND - GND
RST - D9
3.3V - 3.3V
OLED – Arduino
SCL - A5
SDA - A4
VCC - 5v
GND - GND
My Code is below:
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SPI.h>
#include <MFRC522.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#define RST_PIN 9 // Define the RFID-RC522 reset pin
#define SS_PIN 10 // Define the RFID-RC522 SS pin
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
Serial.begin(9600);
while (!Serial);
// Initialize the OLED display
display.begin(0x3C); // Set the I2C address to 0x3C
display.display(); // Display start
delay(2000); // Pause for 2 seconds
// Initialize the RFID-RC522 reader
SPI.begin();
mfrc522.PCD_Init();
// Clear the OLED display
display.clearDisplay();
display.setCursor(0,0);
display.print("Hello Present Card");
display.display();
Serial.println("RFID-RC522 initialized.");
}
void loop() {
// Look for new RFID cards
if (mfrc522.PICC_IsNewCardPresent() && mfrc522.PICC_ReadCardSerial()) {
// Clear the OLED display
display.clearDisplay();
// Display the UID on the OLED
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0,16);
display.print("Card UID:");
display.setCursor(0, 24);
for (byte i = 0; i < mfrc522.uid.size; i++) {
if (i > 0) {
display.print(" "); // Add a space between bytes
}
display.print(mfrc522.uid.uidByte[i], HEX);
}
// Identify and print the card type based on the SAK byte
String cardType = "Unknown";
if (mfrc522.uid.sak == 0x08) {
cardType = "MIFARE Ultralight";
} else if (mfrc522.uid.sak == 0x09) {
cardType = "MIFARE Classic 1K";
} else if (mfrc522.uid.sak == 0x18) {
cardType = "MIFARE Classic 4K";
} // Add more SAK values for different card types
display.setCursor(0, 0);
display.print("Card Type: ");
display.setCursor(0,8);
display.print(cardType);
// Update the OLED display with the UID and card type information
display.display();
// Display the UID and Card Type on the Serial Monitor
Serial.println("A new card is present.");
Serial.print("Card Type: ");
Serial.println(cardType);
Serial.print("UID Value: ");
for (byte i = 0; i < mfrc522.uid.size; i++) {
Serial.print(mfrc522.uid.uidByte[i], HEX);
if (i < mfrc522.uid.size - 1) {
Serial.print(" "); // Add a space between bytes
}
}
Serial.println();
// Halt reading new cards to prevent continuous reads
mfrc522.PICC_HaltA();
mfrc522.PCD_StopCrypto1();
}
}
Dont bother, this is trash.
Case File on my Thingaverse account