About decoding the Oregon Scientific weather sensor protocol

About ten years ago, on occasion, I bought a simple Oregon Scientific BAR208HG weather station. She delighted the household for a long time, and continues to delight to this day. Over time, I began to miss its functionality and wanted to expand my ability to monitor the weather. And then one unpleasant fact became clear - the purchase of an advanced weather station from the same Oregon Scientific did not make it possible to broadcast the readings from its sensors to the old station. The version of the data transfer protocol did not match. Around the same time, I was involved in such an exciting adventure as the transfer of weather data to the service of the notorious People's Monitoring. Already at that time, the network had a lot of information about the weather stations themselves and Oregon sensors, about the data transfer protocol and methods of decoding them.I easily found several ready-made programs and Arduino libraries for receiving and decoding a signal. All this information seemed to me insufficiently systematized, in some places inaccurate, and the programs gave a satisfactory result only at very short distances. Ultimately I came to the old truth: "If you want to do something well, do it yourself." The result of subsequent research was the writing of this note, in which I would like to share the acquired knowledge and skills.The result of subsequent research was the writing of this note, in which I would like to share the acquired knowledge and skills.The result of subsequent research was the writing of this note, in which I would like to share the acquired knowledge and skills.



Protocol versions



The entire Oregon Scientific ecosystem works according to the general principle - sensors are transmitters broadcasting at strictly defined intervals. To minimize collisions during transmission, the broadcasting intervals for all sensors are different, for example, for my station, the sensors transmit readings with an interval of 39, 41 and 43 seconds on the 1st, 2nd and 3rd channels, respectively. The weather stations themselves are, in turn, only receivers. Thus, the relationship is one-way. The manufacturer uses several versions of the data transfer protocol:



  • Version 1.0. On this protocol, I work only with the devices that have turned yellow from time to twenty years ago. I have never seen these devices, either live or even in pictures. There is absolutely nothing to tell me about them,
  • 2.1. β€” . , , , , β€” 30,
  • 3.0 β€” .. "" , , . "" . , , , 100, , , . . - , . "" . , BAR208HG BAR208HGX, 3- .


433. β€” (On/Off Key), .. "/", . 2048. 2.1 3.0





, . OOK , , . β€” . . β€” . , .





, . .



, . . 2.1 4- Fh, 3.0 β€” 6- . ? , , () . , , , .





, Ah. . , .



β€” 4 . , , . :



  • ,
  • ,
  • , ,
  • , .


"" . "" . , , . , , . , , , . , , .



"" :



  • 3 (& 4h) . THGN132N, , 1.3.
  • 4 (& 8h) 30- . , .
  • 1 (& 1h) 30- 60- .


"" . :





" " β€” . , . ,



5D5314D01510950AC13B529



:



5h + Dh + 5h + 3h + 1h + 4h + Dh + 0h + 1h + 5h + 1h + 0h + 9h + 5h + 0h + Ah + Ch + 1h + 3h = 5Bh



, . , .



CRC8 β€” . CRC8-CCITT 07h. , "" "". 2.1 3.0 , 2.1 "ID" . , THN132N ( 2.1)



EC401B183520D33F



D6h



CRC8-CCITT( D6h < E < C < 4 < 0 < 1 < 8 < 3 < 5 < 2 < 0 ) = F3h



PCR800 ( 3.0),



29140EC00000279410142E





CRC8-CCITT( 00h < 2 < 9 < 1 < 4 < 0 < E < C < 0 < 0 < 0 < 0 < 0 < 2 < 7 < 9 < 4 < 1 < 0) = E2h



.





. Arduino , . , "" . , . THGN132N .





, , , , , . Oregon , Arduino . , , where he tried to take into account all the studied problems. It should be noted that in my implementation of this method of processing code, a significant amount of RAM is required. In addition, the program is sensitive to the deviation of the transmitter clock frequency, which happens, as it turned out, not so rarely due to the poor quality of components used in the sensors, including quartz resonators.




All Articles