RC522 RFID Module not connecting

Hi,

I am trying to connect my Arduino Uno R4 Wifi to a RFID-RC522 reader. I have checked that my sketch is being uploaded correctly and that the wiring is secure.

Here is an image of my setup:

Here is my code:

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

// RC522 pins
#define SS_PIN 10
#define RST_PIN 9

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

void setup() {
  Serial.begin(9600);  // Start serial monitor
  SPI.begin();         // Start SPI bus
  mfrc522.PCD_Init();  // Initialize RC522

  Serial.println("RFID Reader Ready. Scan a card...");
}

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

  // Print card UID
  Serial.print("Card UID: ");
  for (byte i = 0; i < mfrc522.uid.size; i++) {
    Serial.print(mfrc522.uid.uidByte[i], HEX);
    Serial.print(" ");
  }
  Serial.println();

  // Halt PICC
  mfrc522.PICC_HaltA();
}

When I run this, the RFID reader doesn't connect to the Arduino and can't read the card I have. I am very new to Arduino. Does anyone know what I am doing wrong or how to fix it? Thank you!

At a glance of your hardware, I can't say I'm confident those jumper wires are making a solid connection between the reader and the breadboard. Any way you can solder up the rfid reader?

Nice work with the (somewhat) clear photo and properly posted code though!

EDIT: The Uno R4 is a 5V board, btw. The reader is a 3.3V device. You should really use a level shifter and ensure that you are powering the RFID reader with the 3.3V it is designed for.

1 Like

Most of the internet gets this wrong. Here is how to wire up a 3V3 reader to a 5V system.

Also I can't see any soldering onto your RFID reader, it will not work without soldering.

1 Like

Thank you so much! It worked perfectly.

1 Like

Great news. Now to finish off the post, click on the post that most helped you as the solution, it will help other in future know there is a proper answer.