RFID/NFC with RC522 - someone try it?

Hello world,
I have a small project of Lap timer for my slot car track, and the GB Meta will be a great terminal to control it.

Is someone already try to use an RC522 module with a dev backpack ?

My goal is to “stick” a tag under each car and keep, on my meta an application who store and compare times.

Thanks :slight_smile:

Hi, geed,

Interesting project! I have no experience interfacing Arduino boards with third-party components, so I couldn’t help you directly. On the other hand, I found a tutorial about the RC522 which seems to me quite complete. The experiment is conducted on an Arduino Uno board, but I guess that the transposition to the GB META (which is an Arduino Zero) should not be too complicated (by adapting the connections on the input-output pins). Take a look at this project:

Maybe also this video:

Or this one:

I hope this will help you…

1 Like

Thanks !
This module is very interesting for a very low price.

But each time i try to use I2C or SPI with my meta nothing work correctly …

Yes, good project. You can have a look on these too: https://www.gotronic.fr/pj2-sbc-rfid-rc522-fr-1439.pdf or http://www.les-electroniciens.com/videos/arduino-ep14-comment-utiliser-le-module-rfid-rc522 but when you’ll start, skip the SPI include and init as it’s already done with your META. Just try with the others parts of the code.

Keep us informed :wink: I could have one of this module in my stuff but it’s should be in the cartons so i’ll not test it now…

Indeed, I can’t find anything on the joint use of RC522 and SAMD21… it’s really a shame
And when examining the code repository of the MFRC522 library, the only examples given are the following cards:

* Typical pin layout used:
* -----------------------------------------------------------------------------------------
*             MFRC522      Arduino       Arduino   Arduino    Arduino          Arduino
*             Reader/PCD   Uno/101       Mega      Nano v3    Leonardo/Micro   Pro Micro
* Signal      Pin          Pin           Pin       Pin        Pin              Pin
* -----------------------------------------------------------------------------------------
* RST/Reset   RST          9             5         D9         RESET/ICSP-5     RST
* SPI SS      SDA(SS)      10            53        D10        10               10
* SPI MOSI    MOSI         11 / ICSP-4   51        D11        ICSP-4           16
* SPI MISO    MISO         12 / ICSP-1   50        D12        ICSP-1           14
* SPI SCK     SCK          13 / ICSP-3   52        D13        ICSP-3           15

However, these may be some possible leads:

Otherwise, you still have hope with the Adafruit PN532 board… but it’s more expensive! The library seems to be compatible with SAMD21 in SPI mode only:

As a last resort, try to ask the question on the Adafruit’s Discord, you never know…
There are a lot of people willing to help there!

Sorry I can’t help you more…

1 Like

These projects are implemented with compatible Arduino boards: the Uno and the Mega… so unfortunately it’s not going to help him with the Zero and the SAMD21…

1 Like

Not false… :wink: The most important i wrote before is that the SPI is already declared ,so no need to add the #include or the line to init it. The program don’t like to do it as it’s already done. I have had the problem before, so i hope it’s can help a few :wink:

So, i bought one … Rendez-vous in 3 weeks for an hardware test :wink: We will be fixed !

If NFC don’t work i have two atlernative solution, less “smart” but …

  1. Cut Detection : i cut a slot, when a car pass, the contact is retablished and detected.
  2. IR : i use a pair of IR Led under the track with a simple digital detection.

Good choice!

Adafruit offers you a great learning guide to make your task easier:

You should even be able to use your RFID reader with CircuitPython :wink:

What would be great is for you to communicate about your project and its implementation. Maybe a detailed tutorial might interest some of us here?