Read ID and Temperature in RFID Tags following the FDX-B Protocol - Page 1
Forum section: electronics / projects

author: gop_8
author_rank: Newbie
timestamp: March 30, 2022, 05:43:17 pm
content: Hello!I'm building a system using an Arduino UNO to read the identification code and temperature in the tags "Biotherm 13 Pit Tag" (https://www.biomark.com/product/biotherm13-pit-tag/). These tags follow the FDX-B protocol. The RFID Reader I have is this onethis one, so it also follows the FDX-B protocol.Using an Arduino UNO, I was already able to read the identification code of 15 characters, but the tags are also supposed to send additional information related to the temperature. The code I used can be seen below.Code:#include <SoftwareSerial.h>const byte rxPin = 4;const byte txPin = 5;char c;String code = "";SoftwareSerial RFID(rxPin, txPin); //rx, txvoid setup() {Serial.begin(9600);RFID.begin(9600);Serial.println("Communication has started");}void loop() {if (RFID.available() > 0) {c = RFID.read();//Last characters were reachedif (c == '\r') {Serial.print("\n");Serial.println("Code: " + code);Serial.println("Tag Detected: " + returnTagName(code));}//The code ends with a \nelse if (c == '\n')code = "";//Add the new character to the codeelse {code = code + c;}}}//Returns the name of the tagString returnTagName(String code) {if (code == "989001025046146") {return "Tag 1";}else if (code == "989001025046156") {return "Tag 2";}else if (code == "989001025045056") {return "Tag 3";}else {return "Unknown Tag";}}If I use the GPR Plus Handheld Pit tag Reader from the same company as the tags (https://www.biomark.com/product/gpr-plus-handheld-pit-tag-reader/), I get the additional data including the temperature. An example can be seen below:Using Arduino: 989001025046146 (only reads the 15 digits that identify the tag)Using the GPR Plus RFID Reader: 989001025046146140111195753,35.4C / 95.7F (reads the 15 digits that identify the tag and another digits including the temperature)When looking for information online, I found a RFID Reader from another companyhttps://www.priority1design.com.au/shopfront/index.php?main_page=product_info&cPath=1&products_id=10. Looking at the datasheet of that reader, I saw in the bottom of page 8 (picture in the attachment) that the tags that follow the FDX-B protocol may have additional data and that in order to read that data it is necessary to send a certain command to the RFID Reader.So, what I'm asking is if there is any way to use the RFID Reader that I have to read the additional data in the tags (not only the 15 digits that identify the tag, but also the temperature). Since, the RFID Reader that I have doesn't have any documentation, it is hard to know if it is capable of doing so.Thank you in advance!

author: Carel
author_rank: Regular Contributor
timestamp: April 01, 2022, 03:26:34 pm
content: Hi,In this link you see the structure of the FDX-B data:https://www.priority1design.com.au/fdx-b_animal_identification_protocol.htmlYou can see that if byte 6, bit 0 = 1, the chip contains additional data. So if this bit = 0, the reader can stop reading after byte 9 (checksum). I have 2 of these thermochips (HealtyID), but their additional data bit is = 0. So there is no reason for a scanner to continue after the checksum. A normal chip has also 3 additional bytes, this reading time can be used for all the necessary arithmetics.I have just tried to see if I get a temperature reading, but no. (See attached scope shot, last 3 bytes plus rollaround to the initialising10 0 bits. All zero's.The range of these chips was 20% less than the normal pet chips, so I gave up on them.Looking at this: 989 001025046146 1401111 957 53 ,35.4C / 95.7FYou see 1401111 which translates to 0x156117 (3 bytes!). the middle byte is 0x61, translates to 97, close to 95.7.From the Priority1 datasheet:"Animal bit status is a single digit indicating whether the transponder is used for animal identification ornot. This value is set to 1 to indicate an animal identification application, and 0 otherwise.Data block status is an indicator flag to indicate whether an additional data block exists. A value of 1indicates that the transponder contains an additional 24 bit data block. Otherwise it is 0.Checkbits are a 16 bit cyclic redundancy value used to check the data within a transponder.Data Block is the information contained in the extra data block if the Data block status is 1. When the Datablock status flag is 0 this value will be transmitted as 000000."You see, no commands or gymnastics, the three bytes will be transmitted anyway.But will your Arduino reader go that far?