Hey,
I have yet another 433 MHz temperature sensor to decode. The model is the remote sensor that belongs to a TCM 214698 station that only displays temperature.
The code I use to read the signals from the receiver goes like this (mostly nicked from somewhere else on this forum):
#define PBSIZE 256
#define MINBITPULSE 1500
void setup() {
Serial.begin(115200);
Serial.println();
Serial.println("Start!");
pinMode(2, INPUT);
attachInterrupt(0, rx433Handler, CHANGE);
}
volatile unsigned int pulsbuf[PBSIZE]; // ring buffer storing LOW pulse lengths
volatile unsigned int hibuf[PBSIZE]; // ring buffer storing HIGH pulse lengths
volatile byte pbread,pbwrite; // read and write index into ring buffer
void rx433Handler()
{
static long rx433LineUp, rx433LineDown;
long LowVal, HighVal;
int rx433State = digitalRead(2); // current pin state
if (rx433State) // pin is now HIGH
{
rx433LineUp=micros(); // line went HIGH after being LOW at this time
LowVal=rx433LineUp - rx433LineDown; // calculate the LOW pulse time
if (LowVal > MINBITPULSE){
pulsbuf[pbwrite]=LowVal; // store the LOW pulse length
pbwrite++; // advance write pointer in ringbuffer
if (pbwrite>=PBSIZE) pbwrite=0; // ring buffer is at its end
}
}
else
{
rx433LineDown=micros(); // line went LOW after being HIGH
HighVal=rx433LineDown - rx433LineUp; // calculate the HIGH pulse time
if (HighVal>31999) HighVal=31999; // we will store this as unsigned int
hibuf[pbwrite]=HighVal; // store the HIGH pulse length
}
}
void loop() {
// put your main code here, to run repeatedly:
long lowtime, hitime;
if (pbread!=pbwrite) // check for data in ring buffer
{
lowtime=pulsbuf[pbread]; // read data from ring buffer
hitime=hibuf[pbread];
Serial.print(pbread);Serial.print("\t");
Serial.print(lowtime);Serial.print("\t");Serial.println(hitime);
cli(); // Interrupts off while changing the read pointer for the ringbuffer
pbread++;
if (pbread>=PBSIZE) pbread=0;
sei(); // Interrupts on again
}
}
The signal I receive beyond noise has 49 pairs of HI and LO pulses each either ca 2000us or ca 4000us and ends with a long LO.
The output shows
pulse #, LO time, HI time (in us)
Start!
0 13420 560
1 13036 172
2 1836 20
3 14712 464
4 13324 396
5 1976 16
6 2408 84
7 3576 372
8 2256 16
9 3828 2036
10 3864 2020
11 3884 1984
12 1992 1980
13 2008 3856
14 2008 3864
15 3920 3848
16 3908 1952
17 3920 1948
18 3908 1952
19 2012 1952
20 3924 3844
21 3920 1948
22 3920 1940
23 2012 1952
24 3924 3844
25 3916 1944
26 3928 1944
27 3924 1936
28 2048 1928
29 2100 3792
30 3984 3772
31 3984 1880
32 2080 1888
33 2080 3780
34 2064 3792
35 2072 3796
36 3972 3788
37 3968 1900
38 3960 1896
39 2056 1912
40 2052 3804
41 2040 3820
42 2048 3820
43 3952 3808
44 2044 1924
45 2048 3812
46 2044 3828
47 3948 3812
48 2028 1928
49 2044 3828
50 2044 3816
51 2040 3828
52 3944 3820
53 3928 1928
54 2036 1932
55 2028 3832
56 3940 3832
57 2032 1924
58 22280 316
59 2116 52
60 3816 2376
61 3844 2020
62 3880 2004
63 1972 1988
64 2004 3872
65 2012 3852
66 3904 3860
67 3920 1952
68 3908 1952
69 3920 1952
70 2000 1952
71 3924 3856
72 3920 1936
73 3904 1952
74 2012 1956
75 3912 3856
76 3924 1948
77 3916 1944
78 3940 1936
79 2052 1912
80 2096 3804
81 3988 3764
82 3976 1884
83 2080 1888
84 2064 3792
85 2072 3796
86 2068 3788
87 3956 3804
88 3964 1904
89 3948 1908
90 2056 1912
91 2036 3820
92 2052 3820
93 2052 3808
94 3940 3820
95 2048 1920
96 2036 3824
97 2048 3824
98 3948 3812
99 2044 1924
100 2044 3816
101 2028 3828
102 2040 3832
103 3928 3832
104 3940 1932
105 2036 1920
106 2036 3832
107 3940 3824
108 2020 1932
109 22212 320
110 4884 24
111 3840 2048
112 3860 2008
113 3884 1992
114 1980 1980
115 2012 3868
116 2000 3860
117 3920 3856
118 3920 1940
119 3912 1948
120 3924 1948
121 2016 1948
122 3920 3844
123 3908 1952
124 3916 1952
125 2012 1940
126 3908 3860
127 3928 1948
128 3920 1940
129 3944 1932
130 2044 1920
131 2100 3800
132 3992 3760
133 3972 1884
134 2080 1888
135 2076 3792
136 2072 3784
137 2060 3800
138 3968 3800
139 3964 1892
140 3944 1912
141 2056 1916
142 2040 3816
143 2052 3820
144 2048 3808
145 3940 3824
146 2048 1920
147 2036 3820
148 2044 3828
149 3936 3824
150 2040 1928
151 2044 3816
152 2040 3832
153 2044 3816
154 3932 3828
155 3944 1928
156 2036 1916
157 2036 3836
158 3940 3824
159 2024 1932
160 21464 316
161 3816 2096
162 3860 2012
163 3880 1996
164 1980 1980
165 2008 3872
166 2012 3848
167 3924 3856
168 3924 1936
169 3908 1948
170 3920 1952
171 2000 1952
172 3924 3856
173 3908 1948
174 3920 1952
175 2012 1940
176 3912 3856
177 3924 1948
178 3916 1944
179 3940 1936
180 2040 1924
181 2100 3800
182 3992 3764
183 3972 1880
184 2084 1888
185 2064 3792
186 2072 3796
187 2072 3788
188 3956 3800
189 3968 1904
190 3948 1908
191 2052 1912
192 2040 3820
193 2052 3820
194 2052 3804
195 3940 3824
196 2048 1920
197 2032 3824
198 2044 3828
199 3948 3812
200 2040 1928
201 2040 3820
202 2032 3828
203 2040 3828
204 3944 3820
205 3932 1928
206 2036 1928
207 2024 3836
208 3940 3836
209 2036 1920
210 15944 316
211 1896 40
From my initial research into this subject, this pattern doesn't match with BP-M style encoding b/c in BP-M short HI and LO pulses come in pairs. In my pattern there's plenty of short HI pulses framed by two long LOs or short LO pulses framed by two long HIs.
So, what code is this and how can I decode it?
Thx

