Using AVRs as RFID chips makes it necessary for me to build a new RFID reader, because this system only operates in the 125kHz frequency (I think this comes from the internal clock of the ATtiny85 microcontroller, but I still have to confirm that). Therefore I have two new RFID modules. The first and older one is the RDM 630 also sometimes refered to its Model Nr. RFR101A1M by SeeedStudio. The second one is a relative new RFID module, the SM125 by SonMicro, with which only little experiments are found in the web. But there is some exsample code and schemes on their support page and a Arduino Library for it in a Github repository.

For the RDM630 exist some example tutorials (1, 2), which help wiring up this RFID module. With the help of the datasheet I transfered this wiring onto the SM125 RFID module. In order to test both RFID modules, I took a big breadboard and integrated both on it:

Image

Here are the pinouts for the RDM630:

Image

And here the pinouts for the SM125 like its in the datasheet:

Image

Here is the Arduino code I used to test the 125kHz RFID modules so far:
#include <SoftwareSerial.h>
#define rxPin 6
#define txPin 7

unsigned char card[12];
unsigned char p;
int printed = 0;
int val = 0;
int bytesread = 0;

//------------------------------------
//create a Serial object RFID
SoftwareSerial RFID= SoftwareSerial(rxPin, txPin);

void setup()
{
Serial.begin(9600);
Serial.println("Serial Ready");
RFID.begin(9600);
Serial.println("RFID Ready");
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
Serial.println("P ="+p);
}

void loop()
{
if (RFID.available()>0)
{
//    Serial.println("RFID is available");
p = RFID.read();

if (p == 2)
{
//      Serial.println("There is a 2 discovered in the data");
while (p != 3)
{
//        Serial.println("Reading data");
delay(5);
p = RFID.read();
Serial.println(p);
Serial.println(", ");
}
printed = 1;
}
//    Serial.println("Read completed! ID is: "+p);
}

if (printed)
{

//    Serial.println("\n——————");
printed = 0;
}
}

Until now both modules are working in that way, that any time a RFID tag comes near, informations can be read. Unfortuntely the data has a wild format and makes no sense yet. I still have to check the wiring one more time, but it also can be a matter of the two formats: TTL and Wiegand. General informations on the Wiegand interface. Further I found some Wiegand specific code, which will maybe help me and a YT-Video explaining the Wiegand format:

I have to dive deep into that probably! I will post some more updates on how I hopefully solved this problem.

Advertisements