MFRC522 RFID Reader with a Raspberry Pi Pico
A 13.56 MHz contactless RFID reader/writer module built on NXP's MFRC522 IC, reading and writing ISO/IEC 14443A MIFARE cards over a 3.3V SPI bus.

The RC522 is a 3.3 V part, which makes it a natural fit for the Raspberry Pi Pico: it takes power from 3V3 and sits on SPI0's default pins, SCK GP18, MOSI GP19, MISO GP16 and SDA (chip select) on GP17, with RST on GP0. No level shifting is needed, unlike on a 5 V Arduino.
Wiring the MFRC522 RFID Reader to the Raspberry Pi Pico
Pin by pin.
| MFRC522 RFID Reader | Raspberry Pi Pico |
|---|---|
| 3V3 | 3V3 |
| GND | GND |
| SDA | GP17 |
| SCK | GP18 |
| MOSI | GP19 |
| MISO | GP16 |
| RST | GP0 |
What to know on the Raspberry Pi Pico
- The MFRC522 operates from 2.5 V to 3.6 V with a 4.0 V absolute maximum on its supply pins, so VBUS would damage it; 3V3 is the right pin.NXP MFRC522 data sheet Rev 3.9, pp. 2, 74
- Its inputs are rated to the I/O supply plus 0.5 V. Powered from the Pico's 3V3 and driven by 3.3 V GPIOs, they are in spec.NXP MFRC522 data sheet Rev 3.9, p. 74
- GP16, GP17, GP18 and GP19 are arduino-pico's SPI0 defaults, so SPI.begin() needs no pin setup; the sketch's SS_PIN 17 is SPI0's default CS.arduino-pico core documentation (Earle Philhower)
- Do not share SPI0's MISO with a microSD module whose buffer drives MISO all the time; give the reader the bus alone or put one on SPI1.CircuitState Catalex module schematic; Raspberry Pi Pico datasheet, release 21, p. 4
MFRC522 RFID Reader code for the Raspberry Pi Pico
Compiled for rp2040:rp2040:rpipico on 2026-10-30.
// MFRC522 RFID Reader on Raspberry Pi Pico: wiring and a free simulation at https://www.tinkered.ai/components/rfid-rc522/raspberry-pi-pico
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 17
#define RST_PIN 0
MFRC522 rfid(SS_PIN, RST_PIN);
void setup() {
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
Serial.println("Scan a card...");
}
void loop() {
if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) return;
Serial.print("UID:");
for (byte i = 0; i < rfid.uid.size; i++) {
Serial.print(rfid.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(rfid.uid.uidByte[i], HEX);
}
Serial.println();
rfid.PICC_HaltA();
}
MFRC522 RFID Reader on the Raspberry Pi Pico: questions
Does the RC522 work with a Raspberry Pi Pico?
Yes, directly: both run at 3.3 V. Power it from 3V3 (2.5 V to 3.6 V, NXP data sheet p. 2) and wire SPI to GP16, GP17, GP18 and GP19.
Why does my Pico not detect cards?
Check SDA is on GP17 (SS_PIN), RST on GP0, SCK GP18, MOSI GP19, MISO GP16, and that the module has 3.3 V. Run the library's firmware-version check to see the chip answer.
Can I use other SPI pins on the Pico?
Yes, within SPI0's pin options: set them with SPI.setRX(), SPI.setTX() and SPI.setSCK() before SPI.begin(), and pass your SS pin to the MFRC522 constructor.
Keep going
This guide as plain Markdown. /components/rfid-rc522/raspberry-pi-pico.md