> Source: https://www.tinkered.ai/components/rfid-rc522/raspberry-pi-pico (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/rfid-rc522/raspberry-pi-pico. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# MFRC522 RFID Reader with a Raspberry Pi Pico

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

| MFRC522 RFID Reader | Raspberry Pi Pico | Note |
| --- | --- | --- |
| 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)

## Code

Libraries: miguelbalboa/MFRC522

```cpp
// 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();
}
```

Compiled for rp2040:rp2040:rpipico on 2026-10-30.

## 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.

## More

- [MFRC522 RFID Reader reference](https://www.tinkered.ai/components/rfid-rc522.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the MFRC522 RFID Reader on the Raspberry Pi Pico in the browser, with this wiring and code, free: https://www.tinkered.ai/components/rfid-rc522/raspberry-pi-pico
