Show Posts
Pages: [1]
1  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 11, 2013, 12:13:29 pm
Just for clarity, I'm not saying that the sensor only reads up to 25.5, only that it's simple to read, if it is in the range 0 to 25.5 becuase it occupies the eight bits between 16 and 23 as a straight forward .1 degree scale.

The bits between 12 and 15 are also included which allows readings greater than 25.5 and less than 0, it's just that I haven't worked out how to deal with that yet.
2  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 11, 2013, 09:46:11 am
Bizzarely I haven't experienced any temperatures above 25.5 in the recent past!

But I think these are some readings from the wrong side of 0 celsius:

1 1 1 1 1 1 1 1 1 0 0 0
-0.8

1 1 1 1 1 1 1 0 1 1 0 1
-1.9

1 1 1 1 1 1 1 0 0 1 0 1
-2.7

It kinda looks like an inversion of .1 of a degree less than the absolute of the actual reported temp. ie if you invert all the bits you get 7, 18 and 26 I think. I'll give it some thought.
3  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 11, 2013, 08:11:42 am
Yes, sorry, you're quite right.
4  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 11, 2013, 06:43:10 am
Thanks for this analysis. For anyone who's interested this method also works for the external temperature sensor on the Auriol Z31055 currently being sold by Lidl in the UK:
http://www.lidl.co.uk/cps/rde/xchg/lidl_uk/hs.xsl/index_38538.htm

These sensors use a slightly different protocol with a 36 bit packet length with no humidity information. These are the changes I made to extract the temperature info from the packet:

in the definitions:

const unsigned long bit1_MIN = 2300;
const unsigned long bit1_MAX = 2700;
const unsigned long bit0_MIN = 1330;
const unsigned long bit0_MAX = 1730;
const unsigned long sync_MIN = 4300;
const unsigned long sync_MAX = 4700;
const unsigned long glitch_Length = 300;   


In the loop section:

 if (bitRead(isrFlags,F_GOOD_DATA) == 1) {
   // We have at least 2 consecutive matching reads
   myData0 = read_Buffer[0]; // Read the data spread over 2x 32 variables
   myData1 = read_Buffer[1];
   bitClear(isrFlags,F_HAVE_DATA); // Flag we have read the data
   dec2binLong(myData0,4);
   dec2binLong(myData1,32);

   
   Serial.print(" Temperature=");
   int Temperature = (myData1 >> 12) & 0xFF;  // Get Temperature word by shifting 12 bits to the right
   Serial.println(Temperature/10.0,1);
   }

I'm not 100% sure about all the bits in the packet but I get the temperature reading pretty well all the time.

Bits 0-7 are a random ID, bit 8 battery state and three other unknown bits.

The temp data is in bits 12-23. For temps between 0 and 25.5 degrees, bits 16-23 contain the temp in .1 degree increments.

All I have to do now is figure out what to do when the temperature turns negative or goes above 25.5 degrees and the temp info spreads out to 12 bit instead of eight. I think it's a twos complement or something like that. At the moment it works for a single byte temp reading for temps between 0 and 25.5 celsius.

Thanks again for showing the way.
Pages: [1]