Connect several RFID-RC522 readers to one Arduino

Hello!

I need to prepare some games for an escape room and I want to use RFID in order to identify if the players are setting some pieces correctly in the correct place.

For example: if we have 4 circles of different colours (Green, Yellow, Blue, Red) and 4 objects with the same colours, the game should be opened if they put each object over the circle with the same colour (this is a very simple example, which is useful to explain the problem in general).

My idea is using a RFID tag in each of the objects to be placed, and one RFID-RC522 reader in ecach of the circles:

I have been reading about that and I've seen the way to connect RC522 to Arduino is like this:

But, I am wondering: this connection map requires one Arduino for each RC522. Is it possible to use only one Arduino for this game, so that these four RC522 are connected in some way to the Arduino in order to know when the four correct objects are placed over the circles?

Thanks in advance

Hi!

It's possible.

Connect all the readers in parallel on pins 11, 12 and 13.

Connect SDA and RST to different pins to each reader.

Then create a function to manage which reader will be used each time.

// Global variables
enum {
  RFID_0, RFID_1, RFID_2, RFID_3
};
const int SelectSlave_RFID_0 = x;
const int SelectSlave_RFID_1 = x;
const int SelectSlave_RFID_2 = x;
const int SelectSlave_RFID_3 = x;

void selectSPI(int device)
{
  switch (device)
  {
    case 0: // Read card 0
      {
        digitalWrite(SelectSlave_RFID_0, LOW);
        digitalWrite(SelectSlave_RFID_1, HIGH);
        digitalWrite(SelectSlave_RFID_2, HIGH);
        digitalWrite(SelectSlave_RFID_3, HIGH);
        delay(10);
        break;
      }
    case 1: // Read card 1
      {
        digitalWrite(SelectSlave_RFID_0, HIGH);
        digitalWrite(SelectSlave_RFID_1, LOW);
        digitalWrite(SelectSlave_RFID_2, HIGH);
        digitalWrite(SelectSlave_RFID_3, HIGH);
        delay(10);
        break;
      }
    case 2: // Read card 2
      {
        digitalWrite(SelectSlave_RFID_0, HIGH);
        digitalWrite(SelectSlave_RFID_1, HIGH);
        digitalWrite(SelectSlave_RFID_2, LOW);
        digitalWrite(SelectSlave_RFID_3, HIGH);
        delay(10);
        break;
      }
    case 3: // Read card 3
      {
        digitalWrite(SelectSlave_RFID_0, HIGH);
        digitalWrite(SelectSlave_RFID_1, HIGH);
        digitalWrite(SelectSlave_RFID_2, HIGH);
        digitalWrite(SelectSlave_RFID_3, LOW);
        delay(10);
        break;
      }
    default:
      {
        break;
      }
  }
}

Then call this function before read a card.

selectSPI(RFID_X); 

Best regards.

Do not use the diagram you posted.
The RC522 is a 3V3 device and if you feed it with 5V input and 5V signals from an Arduino you will eventually damage them.

So all the output pins from the Arduino need to be cut down with a 510R / 1K potential divider. The Outputs from the RC522 needs to be connected directly to the Arduino. In theory this is not enough voltage but most people seem to get away with it.

I know you will say your connection diagram is what you see everywhere but remember there is a lot of bad information on the internet, produced by people who don't know what they are doing.