How do you wire MFRC522 on raspberry pi 3?


I’m having trouble wiring MFRC 522 on Raspbery Pi 3. This chart is way to confusing.

How do I pin this on GPIO?
> ----------------------------------------------------------------------------- Nicola Coppola
> * Pin layout should be as follows:
> * Signal Pin Pin Pin Pin
> * Arduino Uno Arduino Mega SPARK MFRC522 board
> * ---------------------------------------------------------------------------
> * Reset 9 5 ANY (D2) RST
> * SPI SS 10 53 ANY (A2) SDA
> * SPI MOSI 11 51 A5 MOSI
> * SPI MISO 12 50 A4 MISO
> * SPI SCK 13 52 A3 SCK
> *
> * The reader can be found on eBay for around 5 dollars. Search for “mf-rc522” on
> */


Should be:

MFRC522  Particle  Pi
RST      D2        13 (can use a different pin)
SDA      A2        24 CE0 or 25 CE1
MOSI     A5        19 MOSI
MISO     A4        21 MISO
SCK      A3        23 SCK



SPI SS - GPIO24/pin18
SPI MOSI - GPIO10/pin19
SPI MISO - GPIO9/pin21
SPI SCK - GPIO11/pin23
Reset - GPIO27/pin13

You will probably need to check in the MFRC522 library that the correct pins are being used.

I have recently started to use a PN532 based board which supports I2C and SPI. You may find the I2C is easier to use because SPI wires need to be kept very short (<10cm) to work. You also may find that you need to play around with the SPI_CLOCK_SPEED to get it to work on the RPi. On a Photon (@120MHz) I found I needed to have a half clock speed for it to work. I have not tried on the RPi with a MiFare card reader.