MuPiBox Documentation MuPiBox NG

RC522 RFID reader – beginner wiring and setup

Connect an MFRC522 reader to Raspberry Pi SPI0, enable SPI, scan a 13.56 MHz card and assign an audio play.

The RC522 (MFRC522) is an inexpensive RFID reader connected to a Raspberry Pi using GPIO wires. It reads a tag's ID; MuPiBox links that ID to an audio play. No music is written to the card.

Buy: RC522 on Amazon *. This is an affiliate/referral link that may support the project at no extra cost. Check that the listing specifies MFRC522, SPI and 3.3 V. Jumper wires and compatible cards may have to be bought separately.

1. Essential terms

GPIO are the Raspberry Pi's pins; SPI is a short-range data connection; BCM identifies signals (GPIO8), while physical pin identifies their numbered location on the Pi. UID is the card ID stored in MuPiBox's database.

RC522 needs 13.56 MHz compatible ISO14443-A cards such as MIFARE Classic 1K/S50; a 125 kHz tag such as EM4100 will not work.

2. Safety and complete wiring

Switch off power and disconnect any battery before wiring. Never supply 5 V to RC522. Use 3.3 V only.

Label on RC522Physical Pi pinGPIO/purpose
3.3V13.3 V power
GND6Ground
SDA / SS / NSS24GPIO8 / SPI CE0
SCK23GPIO11 / clock
MOSI19GPIO10 / data to reader
MISO21GPIO9 / data to Pi
RST / NRSTPD173.3 V permanently HIGH
IRQNot connectedUnused

Beware of the label SDA: on an RC522 this means SPI chip-select, not the Pi's I²C SDA on physical pin 3! Our driver resets the chip in software, so wire RST to 3.3 V, not GPIO25, despite some tutorials.

If using CE1 instead, wire RC522 SDA to physical pin 26 / GPIO7 and select /dev/spidev0.1 later. The remaining wires stay unchanged.

3. Enable SPI in DietPi

Find the existing Raspberry Pi boot config at /boot/firmware/config.txt or /boot/config.txt. Back it up, then enable SPI (under an active [all] section, not an inactive model-specific section):

dtparam=spi=on

Reboot and check over SSH:

ls -l /dev/spidev0.0

The device node appearing confirms the Linux interface exists, not that the RC522 was detected electrically. A current MuPiBox installer sets up the service-user SPI permissions; older installs may need the updated installer.

4. Connect and assign the first card

  1. In Hardware → RFID (GPIO assignments), check GPIO8, GPIO9, GPIO10 and GPIO11 for conflicts.
  2. Open Hardware → RFID and enable RFID.
  3. Select RC522 (GPIO / SPI).
  4. Click Scan for readers, select /dev/spidev0.0, then Connect. The driver checks whether the MFRC522 responds.
  5. Place a matching 13.56 MHz card near the antenna. Its UID should appear as Last card.
  6. In Content → Content, expand an already-working audio play and choose Assign RFID card.
  7. Hold the card to the reader when prompted, then remove and scan it again to play the content.

5. Troubleshooting

IssueCheck
/dev/spidev0.0 missingSPI boot option, correct boot file, reboot
Device exists, no RC522 responseWiring, 3.3 V, GND, CS, MOSI/MISO, RST high
Permission deniedService-user/group and udev permissions
No card UIDCompatible 13.56 MHz card, short distance, avoid metal
GPIO conflictHardware → RFID (GPIO assignments), other SPI peripherals and buttons

The OnOff SHIM/MuPiHAT power signals use GPIO4 and GPIO17; RC522 normally uses GPIO8–11. A previously wired unknown peripheral may still cause an electrical conflict even when not listed in the Admin UI.

Related: RFID basics and media assignment · GPIO reference · Shopping list.

© 2026 MuPiBox