xBT Implant - Temperature Sensor via Arduino RFID

Several Months ago I commenced a project to passively monitor health signals including body Temperature.
I focused around Arduino and hoped to scan one or more implant as I walk through a door-way.

After a fair bit or research and speaking with Amal Graafstra [Dangerous Things] he indicated no Arduino code had been created to read the xBT chip. Below is a usable sketch which hopefully save someone alot of time which Amal has encouraged me to now post.

FDX-B
To read such a chip requires a read capable of FDX-B protocol.
For this purpose of writing and testing Iā€™ve chosen the RFIDRW-E-TTL chip from Priority1 (below).

SCANNER
The larger intent for this project is a doorway scanner which Iā€™d adapt/build directly.
Its become apparent that the power output required to scan a 2*12mm chip from 1m is problematic, possibly dangerous. As such I am exploring alternatives to passive scanningā€¦

SKETCH/CODE:

MINIMUM SKETCH (output in HEX format)

#include <SoftwareSerial.h>
SoftwareSerial mySerial(8, 9); // RX, TX
void setup()
{
  Serial.begin(9600);
  mySerial.begin(9600);
}
bool id=true;
void loop()
{
  if(mySerial.available()){
    int c=mySerial.read();
    if(c=='\r'){
      if(id){
        Serial.write("; ");
        mySerial.write("RAT\r");
      }else
        Serial.write("\r\n");
      id=!id;
    }else Serial.write(c);
  }
}

Buy Priority1 RFIDRW-E-TTL Reader:
http://www.priority1design.com.au/rfid_reader_modules.html

Spec for RFID Reader:
http://www.priority1design.com.au/rfidrw-e-ttl.pdf

6 Likes

Awesome! Thanks so much for sharing!

1 Like

Hi,

I have tried this code and it gives back strange readings.
Sometimes zero and sometimes temperatures too high. Are you sure this is right?
I cannot find any information on the exact format used to store the temperatures and have tried converting to float/int/ short etc but nothing gives accurate results. I have tried with two RFID X-BT chips.

Any help would be appreciated.

Thanks,
Joseph.

Hi Joseph,

Did you use the ā€œminimumā€ version?
Remember: This has a HEX output which youā€™ll need to convert to DEC.

You can use a tool like this: https://www.binaryhexconverter.com/hex-to-decimal-converter to check your results.
That said, Iā€™ve also had multiple issues with the chip if its outside relative body temperature. It also seems to have latency.

Iā€™ll run the code again tonight and see if its work incase I posted something incorrect.

Hi,
I used the bigger version with the strtol conversion:
long decTemp = strtol(temperatureBytes, &ptr, 16);
As I type it is reading 0 degrees.
It could be that it is outside body temperature(?) but it is supposed to handle a range of temperatures.
If you are sure the code is good then I can assume a hardware issue. Have you used the code on a working chip to get results?

Thanks,
Joseph.

Hi,
Some questions about the implant. I am having difficulty getting information elsewhere.

  1. Is the temp definitely in Celsius?
  2. I have read various papers stating that the temperature is accurate to about 0.1/0.2 degrees. If the output is an integer then it will always be rounded to the nearest integer so could at best be accurate to 0.5 degrees!
    The Halo reader gives reading to one place of decimals so it cannot be reading an int?
    Sorry for the repeat questions but I cannot find the information elsewhere
    Thanks,

Iā€™d need to pull it all apart again to give you very accurate advice, however from memory it was a string.
like 888-444-222233233
The front part was region Id, then there is some other junk then the temperature.

Basically, 3233 would be 32.33 degreeā€™s Celsius (it was something like this, not exact).

The above is an over simplification of what I saw, however hopefully helps a little bit.

2 Likes

Also donā€™t forget that the thermal sensor in the chip only operates within a rangeā€¦ if the temp is too low - i.e. the chip is sitting on your cold desk, then it will not report or the value might be zero. I donā€™t know what it actually reports since I have not seen the raw data, but I know the commercial reader will simply omit temp data if the chip is too coldā€¦ so when testing on the bench I have to hold it in my hand for a while until it heats up to start getting readings again.

1 Like

OK,

Do you have information from the company stating what the exact format is? I am finding it difficult to get any information online. If you can find the format I will post code online that reads and decodes the temperature.
Even a contact email within the company that I can contact would help.
Thanks,
Joseph.

Hi,

Some readings. They look like:
985_141001086691; 985_141001086691_1_0_EF40_00004C

Only the last 6 bytes change. This is where the temp must be stored. If you look at the readings below you will see that the 1 in the third last byte appears intermittently and with no discernible pattern to its appearance or disappearance.

If we assume that 1 is always there then the readings look much more regular with a much smaller variance between readings. I put the implant in warm water for the readings nearer the end and that stabilised the temperature readings somewhat.

Take the last two bytes and put a 1 in front of them (assume it is supposed to be there) if it is missing then convert from hex to decimal and you get a three digit number. Put a decimal point before the last digit (336 becomes 33.6) and the readings makes sense.

I am assuming that the 1 that is sometimes dropped should in fact always be present but can only back this up by saying there is no pattern to its occasional disappearance and that the numbers make sense only when it is present.

This is presently my best guess at how to read the sensor.
Does this make sense? We would still need to confirm the format is correct with the manufacturer if possible.

Joseph.

Reading from sensor in warm water (water cooling as readings continue)

985_141001086691; 985_141001086691_1_0_EF40_0001AC (42.8 degrees)
985_141001086691; 985_141001086691_1_0_EF40_0001A3 (41.9 degrees)
985_141001086691; 985_141001086691_1_0_EF40_0000A2
985_141001086691; 985_141001086691_1_0_EF40_00009E
985_141001086691; 985_141001086691_1_0_EF40_00019C
985_141001086691; 985_141001086691_1_0_EF40_000199
985_141001086691; 985_141001086691_1_0_EF40_00018E
985_141001086691; 985_141001086691_1_0_EF40_000086
985_141001086691; 985_141001086691_1_0_EF40_00007A
985_141001086691; 985_141001086691_1_0_EF40_00007A
985_141001086691; 985_141001086691_1_0_EF40_00016F
985_141001086691; 985_141001086691_1_0_EF40_000054
985_141001086691; 985_141001086691_1_0_EF40_000142
985_141001086691; 985_141001086691_1_0_EF40_000043
985_141001086691; 985_141001086691_1_0_EF40_00003E
985_141001086691; 985_141001086691_1_0_EF40_00003D
985_141001086691; 985_141001086691_1_0_EF40_000052 (33.8 degrees if we read as 152)

1 Like

Sorry - Iā€™ve been a little limited in time and still not had a chance to review it all again.
However, what you have stated below seems to be correct.

I too had an issue with it dropping a 1 on occasion during testing.

Its my presumption that once the temperature is more stable it self resolves.
Iā€™d guess this is a hardware limitation.

Here is the code I am using based on those assumptions above. It seems to work but really we need confirmation from the manufacturer to be sure. Hope this helps out:

It is based on the code given at the top of this thread (thanks for that)
It works properly on an Arduino Uno
The code is actually indented properly-the indents are not showing up in post though :blush:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}

bool id=true;
int count=0;
char sTemp[7];
long lTemp=123;
float fTemp=0.0;
char eptr;
//
*************************************************************************************
//Last six bytes of output contain temperature but first three are always 000
//Assumptions:
//1. Format is character string representing temp in hexidecimal e.g. ā€˜1E7ā€™ == 487
//2. Last digit is after decimal point eā€¦g. 487 == 48.7
//3. First of the three digits should always be one but is sometimes missing (not sure why)
//4. Temperature is given in Celsius
//
//All these should be checked with manufacturer
//**************************************************************************************

void loop()
{
if(mySerial.available()){
int c=mySerial.read();
if(c==ā€™\rā€™){
if(id){//first carraige return indicates we have half data from request
Serial.write("; ā€œ);
mySerial.write(ā€œRAT\rā€);
}else//second carraige return indicates end of data
Serial.write(ā€\r\n");
id=!id;
}else{
Serial.writeĀ©;
if (c==ā€™_ā€™){//count number of underscores received
count++;
}
if (count==6){//temperature is output after sixth underscore
for(int i=0;i<6;++i){//next six bytes contains temperature read them into array here
while(!mySerial.available()){}
sTemp[i]=mySerial.read();
Serial.write(sTemp[i]);
}
//Add terminator character to array -required for strtol to work
//Any non hex character should work
sTemp[7]=ā€˜Qā€™;
//temp is Hex characters so we convert from base 16 (hex) to decimal and put into long variable
lTemp=strtol(sTemp,&eptr,16);
if (lTemp<256)lTemp+=256;//If the first bit is missing add it back in (sometimes it is - not sure why)
fTemp=(float)lTemp/10;//convert to float and divide by 10
Serial.write(" Temp is: ā€œ);
Serial.print(fTemp);
Serial.write(ā€ Celsius ");
count=0;
}
}
}
}

2 Likes

Hello friend, I need your experiences whether the xbt product works properly with arduino. I will buy according to your information.

What do you mean by

Are you trying to obtain temperature data from the chip? If so, please scroll up this thread to the first post. @GlennB provided information about the scanner they used and other details that will assist you in recreating the project

I havenā€™t worked on anything in Arduino that works aside from 13.56mHz, but this next round if testing is going to be with the 6300rdm which is lf so Iā€™ll be able to test the xbt when I start with these modules

I stated that if the product really works and I tried it, I would buy it.

Okay, can you define, what

means for you?

What function do you expect from your DIY reader?
Where should the data be printed out? just on your connected laptop?

For helping you we need more details.

So if i understood you correctly you want to get an temperature read with some kind of arduino board.

Glenn used this rfid module in combination with an arduino to read the temperatures.

To engage further we need to know what your expectations are.

1 Like

Yes - it really works.
But you 100% need the moduleā€¦

2 Likes

E7AF884D029D30010000760000yāø®
E7AF884D029D30010000860000vāø®
E7AF884D029D30010000961000vāø®
E7AF884D029D30010000860000vāø®
E7AF884D029D30010000961000vāø®
E7AF884D029D30010000961000vāø®
E7AF884D029D30010000961000vāø®
E7AF884D029D30010000B60000 āø®
Hello everyone, the question I want to ask is, can you give me information on how to convert this data into temperature data as I read from the xbt chip?

That help?