Read distances with 2 RFID readers

A newbie to Arduino so be gentle with me.

If I had a surface of say 1 meter square and I placed 2 RFID readers one at each corner.

What sort of accuracy could I get on the position of tags on the surface.

What I am after is how many tags could I read correctly and at what distance

Also can the height be determined

If I divided the surface into 3x3 and placed a tag in the centre of each square or maybe 4 x 4.

Are there different boards / tag combinations that would help on the sensitivity.

Any help / pointers appreciated

Cheers

Steve Warby.

Determining distance by radio is very difficult, and is not something an RFID reader would be designed to do. Either they can read a tag, or if out of range, they can't.

Are the are other solutions. I need something like a chess board but only 3 X 3 grids that I can detect if something is placed in the square and identify what it is ( hence rfid tags).

If the square is 2 ft X 2ft is it possible to extend an antenna around it to boost the reading capabilities or maybe criss cross within the square.

The other alternative is to have 9 readers in each of the grids but this adds to the cost.

Any ideas / links appreciated.

Cheers

Steve Warby

Seems like you have two problems to overcome

Position Unique part/piece (recognition)

Positioning can be done many ways IMHO..

(IR, pressure sensors, buttons, capacitance .....etc).. and as you state an RFID reader (but one for each 'section/square' (and I'm not sure how far apart these would be as to NOT give a false positive on an adjacent RFID reader..etc).. and it would need to placed correctly in this 'space' as to trigger a 'read')

The (unique) recognition portion is what I believe to need the most attention here..

Maybe each piece has a specific capacitance you can read and then not only position but piece recognition?

Thanks for the input guys.

I have 2 RFID RC522 boards connected and have it working following this:

I have added
int piezoPin = 7;
if(reader == 0 ) { tone(piezoPin, 1000, 500);}
if(reader == 1 ) { tone(piezoPin, 2000, 500);}

So my first bit of C++ worked ( take a bow here )

/**


  • Example sketch/program showing how to read data from more than one PICC to serial.

  • This is a MFRC522 library example; for further details and other examples see: GitHub - miguelbalboa/rfid: Arduino RFID Library for MFRC522
  • Example sketch/program showing how to read data from more than one PICC (that is: a RFID Tag or Card) using a
  • MFRC522 based RFID Reader on the Arduino SPI interface.
  • Warning: This may not work! Multiple devices at one SPI are difficult and cause many trouble!! Engineering skill
  • and knowledge are required!
  • @license Released into the public domain.
  • 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 1 SDA(SS) ** custom, take a unused pin, only HIGH/LOW required **
  • SPI SS 2 SDA(SS) ** custom, take a unused pin, only HIGH/LOW required **
  • 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

*/

#include <SPI.h>
#include <MFRC522.h>

constexpr uint8_t RST_PIN = 9; // Configurable, see typical pin layout above
constexpr uint8_t SS_1_PIN = 10; // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 2
constexpr uint8_t SS_2_PIN = 8; // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 1

constexpr uint8_t NR_OF_READERS = 2;

byte ssPins = {SS_1_PIN, SS_2_PIN};

MFRC522 mfrc522[NR_OF_READERS]; // Create MFRC522 instance.
int piezoPin = 7;
/**

  • Initialize.
    */
    void setup() {

Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)

SPI.begin(); // Init SPI bus

for (uint8_t reader = 0; reader < NR_OF_READERS; reader++) {
mfrc522[reader].PCD_Init(ssPins[reader], RST_PIN); // Init each MFRC522 card
Serial.print(F("Reader “));
Serial.print(reader);
Serial.print(F(”: "));
mfrc522[reader].PCD_DumpVersionToSerial();
}
}

/**

  • Main loop.
    */
    void loop() {

for (uint8_t reader = 0; reader < NR_OF_READERS; reader++) {
// Look for new cards

if (mfrc522[reader].PICC_IsNewCardPresent() && mfrc522[reader].PICC_ReadCardSerial()) {
Serial.print(F(“Reader “));
Serial.print(reader);
if(reader == 0 ) { tone(piezoPin, 1000, 500);}
if(reader == 1 ) { tone(piezoPin, 2000, 500);}
// Show some details of the PICC (that is: the tag/card)
Serial.print(F(”: Card UID:”));

dump_byte_array(mfrc522[reader].uid.uidByte, mfrc522[reader].uid.size);
Serial.println();
Serial.print(F("PICC type: "));
MFRC522::PICC_Type piccType = mfrc522[reader].PICC_GetType(mfrc522[reader].uid.sak);

Serial.println(mfrc522[reader].PICC_GetTypeName(piccType));

// Halt PICC
mfrc522[reader].PICC_HaltA();
// Stop encryption on PCD
mfrc522[reader].PCD_StopCrypto1();
} //if (mfrc522[reader].PICC_IsNewC
} //for(uint8_t reader
}

/**

  • Helper routine to dump a byte array as hex values to Serial.
    /
    void dump_byte_array(byte buffer, byte bufferSize) {
    for (byte i = 0; i < bufferSize; i++) {
    Serial.print(buffer < 0x10 ? " 0" : " ");
    _ Serial.print(buffer
    , HEX);
    _
    * }*
    }
    So I have my first project up and running with 2 RFID Readers.
    It states the following:
    Example sketch/program showing how to read data from more than one PICC (that is: a RFID Tag or Card) using a
    * MFRC522 based RFID Reader on the Arduino SPI interface.
    *
    * Warning: This may not work! Multiple devices at one SPI are difficult and cause many trouble!! Engineering skill
    * and knowledge are required!
    I connected all the cables onto a breadboard then just connected the SDA pin from each RFID to pins 8 / 10.
    Does this mean I have pins 0 to 7 to add more RFID readers or will the warning above kick in?
    Anyone had any experience with multiple RFID tags ?
    I am hoping for 9 readers connected to an UNO board.
    Any help appreciated.
    Cheers
    Seve Warby

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :)

anyone else think the copy/paste is suspect? (duplicate greetings..etc)

clearly not his own code?