MFRC522 Communication Failure

Hi, I'm using TTGO ESP32 and I've got an MFRC522 from AliExpress.

I've soldered connector pins to the board itself (both for ESP32 and MFRC522) and I'm using Dupont wires female-to-female to connect themselves.

However, using an example sketch (DumpInfo) from miguelbalboa's RFID library, it says communication failure and scanning 3 different key cards or the key fob doesn't output anything.

Firmware Version: 0xFF = (unknown)
WARNING: Communication failure, is the MFRC522 properly connected?

This is my current pinout scheme:

(MFRC - ESP32)
SDA (SS) -> 33
SCK -> 25
MISO -> 27
MOSI -> 26
RST -> 37

And, of course also GND to G and 3.3V to 3.3V.

I've also tried SDA and SCK to connect to 21 and 22, respectively but no luck.
Though I have a DS1307 RTC module and connected accordingly and it's working fine, by using Dupont wires, with the same method.

A manufacturer's defect or still I'm making an error somewhere? Also, if it's the first case, to confirm it once again, should I try an SD card module adapter and see if it works?

You can see TTGO's ESP32 pinout diagram in attachments and also a picture of MFRC522 wired using dupont wires. I may be using (again) the wrong pins. The red LED on the MFRC522 is stable, though.

Thank you in advance.

Issue has been fixed!

It is needed to call SPI.begin() with 3 arguments just as this:

SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN);

Where SCK_PIN, MISO_PIN, and MOSI_PIN are respectable pins that you've chosen for your PLC, in my case 25, 27, 26.

1 Like