RC522 RFID Card Reader
Wave a MIFARE card over a small PCB antenna and watch its unique ID land on the serial monitor.
Difficulty: Breadboard. Estimated build time: about 40 minutes. Estimated parts cost: about US$6.00. 8-line bill of materials. Compare supplier offers when available. A short-range contactless card reader built around the NXP MFRC522, the same chip family that lives inside transit-card validators and office door panels.
Wire the module to the Arduino
The RC522 breakout has eight pins. Connect 3.3 V to the module's 3.3 V rail (NOT 5 V — the antenna IC is 3.3 V only and 5 V will damage it), GND to GND, and the SPI bus: SDA/SS to D10, SCK to D13, MOSI to D11, MISO to D12. Connect RST to D9 and leave IRQ floating for this first sketch. Double-check the 3.3 V rail with a multimeter before powering up.
Install the MFRC522 library and run the DumpInfo example
Open the Arduino IDE Library Manager, search for "MFRC522 by GithubCommunity", and install the latest version. Then open File > Examples > MFRC522 > DumpInfo, which initialises the reader and prints whatever tag passes by. Upload the sketch, open Serial Monitor at 9600 baud, and present a card. You should see the firmware version line at startup, then "PICC type: MIFARE 1KB" plus a UID like 04 A3 12 7F when a card approaches.
Detect a known card
Modify the example to compare each scanned UID against a hard-coded constant array. If the byte sequence matches, blink an LED on D7; otherwise blink a different LED on D6. This is the core of every access-control project — read UID, look it up in a whitelist, drive a relay. The MFRC522 returns the UID as a four-byte (or seven-byte for MIFARE Ultralight) array in mfrc522.uid.uidByte, so a simple memcmp does the job.
Understand the read range
The PCB antenna is the limiting factor. Expect 2–4 cm of reliable range with a credit-card-sized MIFARE 1K, and 1–2 cm with a small key fob. Larger external antennas or different orientations can extend the range, but the carrier is intentionally low-power so the field doesn't interfere with other devices on the 13.56 MHz ISM band. If the module ignores cards, check that you wired 3.3 V (not 5 V), that you didn't swap MOSI and MISO, and that your card is actually MIFARE-family rather than a 125 kHz EM4100 fob — those need an entirely different reader.