Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

RC522 RFID reader with Arduino Uno — safe 3.3 V wiring and code

Wire a 3.3 V RC522 RFID module to a 5 V Arduino Uno correctly — 3.3 V supply and a level shifter on the SPI lines — and read card UIDs.

Arduino C++Verified — core avr 1.8.8, MFRC522 1.4.12, 3 Nov 2026Compile-only

Community draft — report a mistake

The RC522 is everywhere in Uno kits, and it is almost always wired wrong: it is a 3.3 V part, and the Uno drives 5 V on its SPI pins.

The safe way is a cheap 4-channel level shifter between the Uno and the module’s inputs. With that in place the MFRC522 library reads card UIDs exactly as on 3.3 V boards.

Wiring

Arduino Uno R3Only the pins used are shown · 5 V logicRC522 RFID reader (MFRC522, 13.56 MHz)LV⇄HVLV⇄HVLV⇄HVLV⇄HV3.3VGNDD9D10D11D12D13SDASCKMOSIMISOIRQ (not connected)GNDRST3.3V
Also needed: 4-channel BSS138 level shifter (LV = 3.3V, HV = 5V, common GND).
Every connection
Arduino Uno R3RC522 RFID reader (MFRC522, 13.56 MHz)WireNotes
3.3V3.3VredThe Uno’s 3.3V pin supplies about 50 mA; the RC522 needs around 26 mA.
GNDGNDblack
D13SCKyellowVia level shifter
D11MOSIgreenVia level shifter
D12MISOblueRC522 output (3.3 V) into the Uno: reads as HIGH, no shifter needed.
D10SDApurpleVia level shifter
D9RSTorangeVia level shifter — Shifter LV = 3.3V, HV = 5V, GND shared.

3.3 V only part, 5 V board. Power the RC522 from 3.3 V — never 5 V. The MFRC522 chip’s pins are not rated for 5 V either: many people wire it straight to an Uno and it works for a while, but for a build that lasts, drop the Uno’s SCK, MOSI, SDA (SS) and RST signals to 3.3 V with a level shifter or dividers. ESP32 and Pico connect directly.

Board quirks

  • The RC522 is a 3.3 V chip and its inputs are not rated for 5 V. Many tutorials skip the level shifter and it often works — until the module dies.
  • D10–D13 are the Uno’s hardware SPI pins; D10 must stay an output, which the library handles.
  • MISO is the only line coming back to the Uno, and 3.3 V is a valid HIGH for it.

Code

rc522-uno.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// RC522 (MFRC522) RFID reader on an Arduino Uno R3.
// The RC522 is a 3.3 V part: power it from the Uno's 3.3V pin and pass SDA, SCK, MOSI and RST
// through a 5 V → 3.3 V level shifter. MISO comes back at 3.3 V, which the Uno reads fine.
// SDA(SS) → D10, SCK → D13, MOSI → D11, MISO → D12, RST → D9.
#include <SPI.h>
#include <MFRC522.h>

const uint8_t SS_PIN = 10;
const uint8_t RST_PIN = 9;

MFRC522 rfid(SS_PIN, RST_PIN);

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  byte v = rfid.PCD_ReadRegister(MFRC522::VersionReg);
  if (v == 0x00 || v == 0xFF) {
    Serial.println(F("RC522 not answering - check 3.3V, the level shifter and SPI wiring"));
  } else {
    Serial.println(F("RC522 ready. Tap a card..."));
  }
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) return;
  Serial.print(F("Card UID:"));
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i] < 0x10 ? F(" 0") : F(" "));
    Serial.print(rfid.uid.uidByte[i], HEX);
  }
  Serial.println();
  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
}

Library: MFRC522 (GithubCommunity) — compiled with MFRC522 1.4.12.

Expected serial output

Serial Monitor · 9600Output
RC522 ready. Tap a card...
Card UID: 4A 3F 9C 2B
Card UID: 04 6E 21 A2 4F 61 80

Common errors

“RC522 not answering”

Check the shifter has both LV (3.3V) and HV (5V) connected, and the SPI lines are on D10–D13.

Reads once, then stops

Weak 3.3 V supply. Add a 10 µF capacitor at the module’s 3.3V pin.

↑↓ to move · Enter to open