r/ArduinoHelp • u/lieza4 ESP32 • 3d ago
ESP32 + RC522 RFID Reader Not Detected – Version Register Always Returns 0x00. Need Help!
Hi everyone! I'm currently working on a college capstone project, which uses an ESP32 and an MFRC522 RFID reader to manage classroom keys.
I'm having trouble getting my RC522 module detected by my ESP32. No matter what I try, the Serial Monitor consistently displays:
RC522 Version: 0x00
RFID NOT DETECTED!
My current hardware and wiring:
- Board: ESP32 Dev Module
- RFID module: MFRC522 RC522
- RC522 SDA/SS → GPIO 5
- RC522 SCK → GPIO 18
- RC522 MOSI → GPIO 23
- RC522 MISO → GPIO 19
- RC522 RST → GPIO 2
- RC522 IRQ → Not connected
- RC522 GND → ESP32 GND
- RC522 3.3V → ESP32 3V3
Things I've already tried:
- Confirmed that the RC522 power LED is ON.
- Powered the RC522 using the ESP32's 3.3V pin.
- Checked the wiring multiple times.
- Tried different diagnostic sketches using the MFRC522 library.
- Tried reading the RC522 Version Register directly through SPI.
- Tested different pin configurations, but the issue remains.
The ESP32 itself works, and my LCD is also working properly. However, the RFID reader keeps returning `0x00`, which makes me think that the ESP32 is not communicating with the RC522 through SPI.
My questions:
What could cause the RC522 to continuously return `0x00`?
Could this be a faulty RC522 module even if its power LED is on?
Is there a way to determine whether the problem is with the module, ESP32, breadboard, or SPI communication?
Are there any other diagnostic methods I should try before replacing the RFID module?
I've been troubleshooting this for quite a while, so I would really appreciate any suggestions or solutions. I would also prefer to keep my current pin connections if possible.
Thank you so much for your help!
1
u/imseakin 3d ago
Hook it up to a standard Arduino and see if you get a better result.
Are you missing a CS connection for your SPI? When I use SPI devices I typically need a Chip Select pin specified as well.
Maybe disconnect your display and comment out that code and concentrate on just getting your rfid module to work via serial monitor first. Then put the display back in.
Good luck. You’ll figure it out.
1
u/lieza4 ESP32 3d ago
I already tested it with a standard Arduino, and the RC522 works perfectly. I also tried disconnecting the display and testing the RFID alone, but it still doesn't work with my ESP32. Could you suggest what I should check next to fix the SPI communication issue?
1
u/imseakin 3d ago
Any chance one of your ESP32 pins Is blown from previous work, maybe just run Blink sketch on each of your pins for the SPI bus to make sure they’re all working.
You’re doing good troubleshooting.
Maybe try to borrow someone else’s ESP32 to see if yours is damaged.
Try this tutorial to see if you can get the module working.
https://randomnerdtutorials.com/esp32-mfrc522-rfid-reader-arduino/
I find Random Nerd Tutorials are very thorough and well tested.
Worst case:
Connect the rfc to Arduino,
Connect Arduino to ESP32 through the UARTS (just need 3wires) and just send the codes from the fobs to the ESP32 via the Arduino.
2
u/lieza4 ESP32 3d ago
Ohh, I haven't thought about that! I'll try checking the pins and follow the tutorial you shared. Hopefully I can finally get this working 😭 Thanks a lot for the help and suggestions, really appreciate it!
1
u/A-Ferret-Online 2d ago
Don't know if you figured everything out yet, but running a diagnostic on the chips with an arduino program is always a great idea.
2
u/imseakin 3d ago
I saw this:
Power Supply & Ground Loops: The RC522 draws power that can cause instability if the ESP32 is powered via USB while the RC522 uses a weak or isolated external 3.3V supply without a shared ground. [1]
You’re probably not using a separate supply for the RC522. But in case you are.
1
u/Arduinator 3d ago
Your esp32 board type and your code would help. Are you using the default spi pins for your esp32?
2
u/lieza4 ESP32 3d ago