Troubleshooting the NodeMCU RFID Interface
"Hey team, I've successfully uploaded the RFID reader code to my ESP8266, and the hardware connections seem correct. However, I'm not getting the expected output on the Serial Monitor. The loop is running, but I'm not detecting RFID tags or seeing UID information. Any insights on what might be causing this issue would be greatly appreciated!"
44 Replies
Hi, @K.L.NAGARAJU I appreciate it if you let us know which Exact RFID Module (part number) you're using in your project. And, are you just testing demo example code from the RFID Library? Once you confirm the part number I hope I can help you further. Welcome to DevHead!
@Umesh Lokhande
It's RC522 (RFID model) and I'm trying to build a kind of system that could READ and display UDI information of a RFID CARD on a serial monitor of ARDUINO IDE
you may cross verify the code from the below sources.
https://www.instructables.com/MFRC522-RFID-Reader-Interfaced-With-NodeMCU/
https://www.instructables.com/WiFi-RFID-Reader/
Instructables
MFRC522 RFID Reader Interfaced With NodeMCU
MFRC522 RFID Reader Interfaced With NodeMCU: Hello Makers,
I'm back with another Instructable.
Did you ever wonder what is an RFID or how does it work?
If you have noticed in an office before, you would be probably aware of those RFID cards or Tags that would unlock specific doors depending on…
Instructables
WiFi RFID Reader
WiFi RFID Reader: The main idea was to read in 13.56 MHz RFID (tags / tokes / stickers / wristbands / cards) by a magic box and post the RFID UID to a local database by WiFi network.
This instructable builds the base of the whole system - the first working RFID reade…
The Response I found
Hi @K.L.NAGARAJU Please confirm in your Serial Monitor Windows at the lower right corner if you've set the correct baud rate. It seems to me, that the baud rate in the code does not match with the serial terminal "9600". Please confirm
Yeah, I had set the baud rate at 9600 in both code and serial monitor
@Umesh Lokhande
@K.L.NAGARAJU So, you mean even after setting the baud rate properly? still doesn't work. Please share good quality pictures I mean proper screenshots. Also, appreciate more details on the RFID tags (card/key). Thanks!
Sure
@K.L.NAGARAJU In the picture, you shared it seems like the code has not yet been uploaded in your ESP8266. Because, in the other picture you shared it shows when you upload the code the COM7 not available (orange fonts in the output console of IDE). If the code upload succeeded then how come the serial monitor COM6 reading the serial terminal? So this means the code running on ESP8266 is older. I hope this may help you to debug the issue. Thanks!
@K.L.NAGARAJU Just for your reference, please find these attached images and compare them. I'm sure if the earlier code worked and the connections are correct then it will work. Keep me updated on your progress. Best wishes!
@Umesh Lokhande
Sorry for the inconvenience,
I take the pics at different timings, that's why COM differences take place!
Here is the present situation
Still expected output not there yet!
What's happening now. Please explain.
Actually I'm trying to make my nodeMCU interfaced RFID reader, to read an RFID card or tag and to display the UDI of that particular card on the serial monitor!
Code writing and compilation is done!
No error founded
But I didn't find the expected output
Okay, let's take this bit by bit:
1. cross check if your SS pin defined in code and hardware are the same - that's the only variable I notice in the code.
2. UID is from the RFID tag. Are you placing the card on top of the reader? The main loop continually keeps scanning.
3. If you doubt over hardware or connections made, hook a logic-analyzer and check the SPI frame.
"I'll give it a shot and I'll update you shortly."
I suppose the system didn't find a card at all. If so, the "Card_UUID: " will defacto print in the serial terminal.
By the by
"Could you please send me the code?"
🙏
But I'm asking another one
Try these and let us know. You're doing right so far with the code.
Okay!
@Navadeep
What I found in the SERIAL MONITOR!
1. is this with the same code?
2. after what changes did this appear?
3. did you try tapping the RFID card on the reader?
I had modified the code, I mean I changed the SDA and RST PINs allocation
Yes I did!
Please note which pin in NodeMCU is SS. It should either be 15 or 11 based on which SPI instance you call on your code.
Try SS pin as 11 for the SPI you're using.
SERIAL monitor not working with NODEMCU
"It leads to a different root."
In the serial monitor, pick 'NL and CR' mode from the selection below. This will get those junk characters out.
@Navadeep @K.L.NAGARAJU. sorry for the delay getting this migrated into a thread. we had an issue with the bot that has now been resolved.
please continue your discussion here, and if the issue has been resolved share with us the resolution and where you are with the project currently.
Thanks!
@Umesh Lokhande for visibility.
Hi @K.L.NAGARAJU I just tested the project on real hardware. Here are the step-by-step instructions with the code attached.
- Make sure the connection between NodeMCU and RFID RC522 (attached image)Â
- Please make sure you've installed the correct library MFRC522 by Github Community
- Create a new Arduino project and paste the following code (attached ReadNUID.ino file)
Please note that most people make mistakes while connections. The pins on NodeMCU are very close. And it's easy to make observational errors. If it still doesn't work, please share high-quality images of the connection between NodeMCU and RC522 Module.If you've any further questions feel free to let me know. Good luck and best wishes!
"Thank you, @Umesh Lokhande sir. I'll give it a try and keep you updated on the progress."
"Hello sir @Umesh Lokhande , I've made an attempt. Thankfully, there are no code errors based on your instructions. I've meticulously established the hardware connections as per your reference and double-checked them. However, the serial monitor is unresponsive. I conducted a test by printing something on the serial monitor, and the MCU and serial monitor function correctly. Unfortunately, withthe RFID component the serial monitor is not responding as anticipated."
"I've opted to switch my RFID reader, and I've placed an order for a new one online. I'll provide you with an update once the new RFID reader arrives, and I integrate it into the system."
"By the way, is it possible that the RFID reader issue could be affecting the entire functionality of the serial monitor?"
Hi, since the quality of electronic components is vital for module functioning. So your RFID Reader may have an issue. Also, I'll suggest keeping at least two RFID tags while testing with the new RC522 RFID Reader module. Please keep me updated on your progress. If it still doesn't work. Make sure to share high-quality images to show connections between the RFID reader and NodeMCU. Wish you good luck!
Sure! Sir
@Umesh Lokhande
Sir, i tried with 2 tags, but I didn't get the Expected response!
I couldn't understand why it happens!