Go Down

Topic: 433 MHz RF - Temperature and humidity sensor (Read 39 times) previous topic - next topic

Riva

After a bit of messing about I managed to capture your wav samples to logic level so I could play them back to test the modified code. Attached is the modified sketch to suit your transmission timebase that reads in the 42 bits but displays them as 64 bit data. I have also attached the logic level files that you can load and view with Scanalogic-2 software from here http://www.ikalogic.com/ikalogic-products/scanalogic-2/ You don't need the analyser hardware to view the files.

andriej

#21
Feb 04, 2013, 12:14 am Last Edit: Feb 04, 2013, 04:56 am by andriej Reason: 1
Thank you for the code! It works and output i present below is exactly copy-paste from it!
Now it's much easier to get probes.

Here's the easy-to-read Google Doc version https://docs.google.com/document/d/121ZH3omAZsdhFi3GSB-YdnasMjIQSGIcaS7QW6KsACA/edit?usp=sharing of what I already manage to get to know about the sensor.
I already see the channel bits (000-1, 001-2, 010-3).


I have to wire up antenna to the reciever so I get all the signals (I had to get the transmitter close to arduino to get all readings one by one).
Those with "???" are not-quite-sure about temperature values, all other ones are written from LCD. Those with "(no force)" came from transmitter as it was sending data WITHOUT me pushing the button.
Code: [Select]
TT RH
5.7*C 94%  0000000000000000000000000101011101011011001001011110010110011110 ???
7,1*C 93%  0000000000000000000000000101011101010011010001011101010110011000
7,3*C 92%  0000000000000000000000000101011101010111010001011100010110010110
7,3*C 92%  0000000000000000000000000101011101010111010001011100010110010110
8.1*C 91%  0000000000000000000000000101011110010101010101011011010110010001
9.0*C 90%  0000000000000000000000000101011110010101010101011011010100011001 ???
9.0*C 90%  0000000000000000000000000101011110010110011001011010010110011000
9.2*C 88%  0000000000000000000000000101011110011001011001011000010110010110
10.3*C 85% 0000000000000000000000000101011110011110011101010101010100010001
10.6*C 85% 0000000000000000000000000101011110010010100001010101010110011010
10.9*C 84% 0000000000000000000000000101011110011001100001010100010110010000
11.8*C 83% 0000000000000000000000000101011110011000100101010011010110011100
11.9*C 83% 0000000000000000000000000101011110011011100101010011010110010110
12.2*C 81% 0000000000000000000000000101011110010000101001010001010110010101
12.6*C 79% 0000000000000000000000000101011110010110101001011111010010010010
13.2*C 75% 0000000000000000000000000101011110010001101101011011010010010110
13.4*C 75% 0000000000000000000000000101011110010110101101011011010010010111
13.7*C 75% 0000000000000000000000000101011110011010101101011011010000010001 (no force)
13.9*C 75% 0000000000000000000000000101011110011110101101011011010010010010
14.2*C 75% 0000000000000000000000000101011110010011110001011011010000011100 (no force)
14.4*C 75% 0000000000000000000000000101011110010111110001011011010010011111
14.6*C 75% 0000000000000000000000000101011110011011110001011011010010010001
14.6*C 75% 0000000000000000000000000101011110011011110001011011010000011001 (no force)
14.8*C 75% 0000000000000000000000000101011110011111110001011011010010011010
15.1*C 73% 0000000000000000000000000101011110010100110101011010010010010010 ???
15.3*C 73% 0000000000000000000000000101011110010111110101011001010010010111
16.2*C 67% 0000000000000000000000000101011110010111111001010011010010010101
16.6*C 64% 0000000000000000000000000101011110011111111001010000010000010111 (no force)
16.9*C 66% 0000000000000000000000000101011110010101111101010010010000010110 (no force)
17.2*C 65% 0000000000000000000000000101011110011010111101010001010000011101
17.4*C 64% 0000000000000000000000000101011110011110111101010000010000010011 (no force)
17.6*C 63% 0000000000000000000000000101011110010000000001101111001100010001
17.7*C 61% 0000000000000000000000000101011110010011000001101101001110011001
17.9*C 60% 0000000000000000000000000101011110010111000001101100001100011111
CH 1 -----------
18.0*C 58% 0000000000000000000000000101011110001000000001101010001110010100
18.2*C 58% 0000000000000000000000000101011110001100000001101010001100010111
CH 3 -----------
18.4*C 59% 0000000000000000000000000101011110101111000001101011001110010111
18.6*C 57% 0000000000000000000000000101011110100010000101101001001110010111
18.7*C 56% 0000000000000000000000000101011110100101000101101000001110010011

CH 2 -----------
19.0*C 56% 0000000000000000000000000101011110011010000101101000001110011010
19.2*C 56% 0000000000000000000000000101011110011101000101101000001110011011
19.2*C 56% 0000000000000000000000000101011110011101000101101000001100010011
19.3*C 56% 0000000000000000000000000101011110010000001001101000001110010101
19.5*C 55% 0000000000000000000000000101011110010011001001100111001100010001
19.7*C 55% 0000000000000000000000000101011110010110001001100111001110010100
19.8*C 54% 0000000000000000000000000101011110011000001001100110001110010011
19.9*C 55% 0000000000000000000000000101011110011010001001100111001110011010
20.0*C 55% 0000000000000000000000000101011110011100001001100111001110011101
20.1*C 54% 0000000000000000000000000101011110011110001001100110001110010100
20.1*C 54% 0000000000000000000000000101011110011110001001100110001110010100


I see some pattern, but can't decode it successfully yet.
What are those 'leading' zeroes?

Few more - next to each other and forced-nonforced readings from CH2.
Code: [Select]
20.1*C 47% 0000000000000000000000000101011110011101001001101111001010010110
20.1*C 47% 0000000000000000000000000101011110011101001001101111001000011110
20.1*C 48% 0000000000000000000000000101011110011110001001100000001100010001
(no force)
20.2*C 48% 0000000000000000000000000101011110011111001001100000001110011111
20.2*C 47% 0000000000000000000000000101011110010000001101101111001010011100


Here are the CH1-2-3 differencies. The temperature changed slightly but it's possible to see where it happened in binary code.
Code: [Select]
20.0*c 44% 0000000000000000000000000101011110011100001001101100001000010111 CH2
20.0*C 44% 0000000000000000000000000101011110001100001001101100001000011101 CH1
20.1*C 44% 0000000000000000000000000101011110101110001001101100001010011110 CH3

and also other one - better to see:
Code: [Select]
20.5*C 44% [pulse] 101011110000101001101101100001010010100 CH1
20.5*C 44% [pulse] 101011110010101001101101100001010011110 CH2
20.5*C 44% [pulse] 101011110100101001101101100001010010011 CH3


I also tried to change battery to older one (to see the battery indicator) and I'm afraid I cant understand anything now...
Look at the pulse difference:
Code: [Select]
BATTERY + OLD NI-MH accu BATTERY [station DOESNT show this as a 'weak battery']
0000000000000000000000000010111110010010001101100111001000001010
USED BATTERY
0000000000000000000000001010110100011100001101100101001010001010
ONE USED AND ONE GOOD BATTERY
0000000000000000000000001111010100010111010001100100001010001011
AND BACK TO GOOD BATTERY (pair which I used for all measures)
0000000000000000000000001010010000011100010001100011001010000110

Another update.
Sensor and application has been on for hour or so, I didn't write down values.
These are the one printed - it looks like every column changes.
The last value is around 22.3*C 29%.
Code: [Select]
0000000000000000000000001010010000011100010001100011001010000110
0000000000000000000000001010010000011100010001100011001010000110
0000000000000000000000001010010000011100010001100011001010000110
0000000000000000000000001010010000011100010001100011001010000110
0000000000000000000000001010010000011100010001100011001010000110
0000000000000000000000001010010000011100010001100011001000001110
0000000000000000000000001010010000011100010001100001001000000100
0000000000000000000000001010010000011100010001100001001000000100
0000000000000000000000001010010000011100010001100001001000000100
0000000000000000000000001010010000011100010001100001001000000100
0000000000000000000000001010010000011100010001100000001000000001
0000000000000000000000001010010000011100010001100000001000000001
0000000000000000000000001010010000011101010001101111000100000100
0000000000000000000000001010010000011101010001101111000100000100
0000000000000000000000001010010000011101010001101111000100000100
0000000000000000000000001010010000011101010001101111000100000100
0000000000000000000000001010010000011110010001101110000100001011
0000000000000000000000001010010010011110010001101110000100000100
0000000000000000000000001010010010011110010001101110000100000100
0000000000000000000000001010010010011110010001101110000100000100
0000000000000000000000001010010010010000010101101110000100000100
0000000000000000000000001010010010010000010101101110000100000100
0000000000000000000000001010010010010000010101101111000100000001
0000000000000000000000001010010010010000010101101110000100000100
0000000000000000000000001010010010010000010101101110000100000100
0000000000000000000000001010010010010000010101101110000100000100
0000000000000000000000001010010010010001010101101110000100000010
0000000000000000000000001010010010010010010101101110000100001000
0000000000000000000000001010010010010010010101101110000100001000
0000000000000000000000001010010010010010010101101110000100001000
0000000000000000000000001010010010010010010101101110000100001000
0000000000000000000000001010010010010011010101101110000100001110
0000000000000000000000001010010010010100010101101101000100000000
0000000000000000000000001010010010010110010101101101000100001100

Riva

Quote
What are those 'leading' zeroes?

You transmitter sends 42 bits but the subroutine to display the data as binary only does 32 chunks so 2x 32 bit chunks displays 64 bits with leading zero's instead of just 42 bits.

Code: [Select]
                        TX                LLLLHHHH
Temp   RH% -Preamble- ??CH                Humidity
7,1*C 93% 0001010111 0101 0011 0100 0101 11010101 10011000

Humidity is stored as low/high order nibbles. In the example above take the first 4 bits and tack them on the end of the next 4 bits. 11010101 becomes 01011101 that is 93 decimal. Not done temperature yet but it look like it's also split into nibbles.

andriej

Wow, Riva, I'm amazed of the knownledge you get here. I wouldn't manage to get that never, probably.
As I've written on google docs - temperatures may be in fahrenheit.
Sensor, after changing batteries, views temp. as F degrees. I have to push button on the back to switch to celsius - the data sent by transmitter doesn't change by that.

I also see about that you also used 'preamble' - do you know why would it change when changing batteries?
Usually I see the battery-indicator in the transmission as a "high"/"low".
Maybe it was too late for me (and I was tired) but there are more changes in bits than one-two in preamble part.

Riva

Quote
I also see about that you also used 'preamble' - do you know why would it change when changing batteries?

The transmitter will probably generate a random number when first powered on (or batteries changed) and this will become all/part of the preamble.
Code: [Select]
                        TX LLLL MMMM HHHH LLLLHHHH
Temp   RH% -Preamble- ??CH Temperature- Humidity
7,1*C 93% 0001010111 0101 001101000101 11010101 10011000

Looks like temperature is transmitted as 12 bits in 3x nibbles ranging from low to high nibbles. A fixed offset of 900 is applied to the temperature value so 0 degrees F = 900 and each degree F change is 10 decimal. In the example 001101000101 becomes 010101000011 that is 1347 decimal.
1347-900 = 447
447/10 = 44.7
44.7F = 7.1C

Go Up