3
\$\begingroup\$

I've bought an RFID RC522 module which I intend to use with my Raspberry Pi 3B+. I read the following tutorials and I noticed that their modules have other pins than the one I bought:

https://www.raspberrypi-spy.co.uk/2018/02/rc522-rfid-tag-read-raspberry-pi

https://medium.com/coinmonks/for-beginners-how-to-set-up-a-raspberry-pi-rfid-rc522-reader-and-record-data-on-iota-865f67843a2d

https://www.raspberrypi-spy.co.uk/2018/02/rc522-rfid-tag-read-raspberry-pi/

This is my RFID module:

enter image description here

It has the following pins (in case it's not readable in the photo):

VCC RST GND MISO MOSI SCK NSS IRQ

The modules used in the tutorials have the pins

3.3V RST GND IRQ MISO MOSI SCK SDA

Is the module just deprecated (2012)? Which pins of the module should I connect to which GPIO pins?

Thanks in advance!

\$\endgroup\$
3
  • \$\begingroup\$ What does the PDF (portable document format) data sheet for the part you bought tell you? \$\endgroup\$
    – Andy aka
    Commented May 9, 2020 at 10:54
  • \$\begingroup\$ @Andyaka On the label of the package it says 'QITA 13.56Mhz RFID Module Kits KeyCard ID Card CZ0225'. I do not have any other document. The seller wrote that it works with the Raspberry Pi and Arduino. \$\endgroup\$
    – Pixelcode
    Commented May 9, 2020 at 15:04
  • 1
    \$\begingroup\$ Therein lies the problem of buying stuff without the aforementioned data. Ask him because asking here will only get guesses. \$\endgroup\$
    – Andy aka
    Commented May 9, 2020 at 17:18

2 Answers 2

5
\$\begingroup\$

So, the correlation between your board and the ones from the tutorials is quite straightforward:

VCC  --> 3.3V
RST  --> RST
GND  --> GND
MISO --> MISO
MOSI --> MOSI
SCK  --> SCK
NSS  --> SDA
IRQ  --> IRQ

The only difference is that IRQ pin is at the end and not in the middle.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Can you add a bit of commentary around the renaming between NSS and SDA? Does that pin have multiple functions? Is there a configuration bit that needs to be set in order for the pin to operate in I2C mode? \$\endgroup\$
    – nanofarad
    Commented Apr 30, 2021 at 19:36
  • \$\begingroup\$ @nanofarad the RC522 chip allows three types of interface: UART, SPI, I2C. But, the interface on this board is hardcoded with PCB design and it appears that this RFID module only supports SPI protocol \$\endgroup\$ Commented Apr 30, 2021 at 21:10
  • \$\begingroup\$ That would probably be good to edit into your post (since comments are ephemeral). If it only supports the SPI protocol, it would be good to mention that, and the particular function of the NSS pin in this version. \$\endgroup\$
    – nanofarad
    Commented Apr 30, 2021 at 21:18
  • \$\begingroup\$ That seems to have worked. Thank you very much! \$\endgroup\$
    – Pixelcode
    Commented Sep 3, 2023 at 19:49
0
\$\begingroup\$

To decide which pins on the Pi to connect to your module you need to look at the software library you are using. It should indicate whether it uses SPI or I2C communications and which of the Raspberry Pi board's hardware devices are used.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.