Problem: RFID with Arduino Mega 2560

I'm working on a project that includes reading from an rfid. I'm currently using the arduino mega 2560 along with the YHY502 rfid reader and mifare 4K tags.

I'm not able to read the card serial number. Even when the card is there, all that appears on my serial monitor is -1 which means tag is not available.

Note that in the datasheet of the rfid module (, the header byte should be AA. But again, all I'm getting is FF even when a card is not available.

Please, I need help with this issue.

If you read the sticky thread “How to use this forum” you’ll find instructions on how to post code. We will need to see the code in order to help.

It would also be a good idea to post a clear picture of your wiring.

A link to the 4K Mifare tags you’re using would also be a good idea. (I’ve only used the 1K tags/cards myself.)