📜 ⬆️ ⬇️

Arduino & Oregon or do-it-yourself weather station

Not so long ago a set of a young radio amateur Arduino came into my hands and many different projects got a start in life (or “on the table”), but the bad head still doesn’t give me rest.
Thanks to a lucky coincidence, it happened that in one place they were:

In addition to the above (exclusively for rapid prototyping), the Stared Kit from Seeed Studio was used (from it you needed a base shield, a 16x2 display with a serial interface, an LED module and connecting cables).

Photos for the most impatient:


The range of 433 MHz is widely used in various household appliances - car alarms, light control systems, weather stations, etc., “communicate” at this frequency. Receivers and transmitters for this range are widely available and are quite inexpensive.

Sensors THGN132N equipped with many weather stations Oregon and they can also be purchased separately. They allow to measure temperature and relative humidity, operate in a wide temperature range (-40.0 ° C to + 70.0 ° C), while the temperature measurement accuracy is 0.1 ° C. The cost is low and is determined mostly by the greed of the sellers.
')
Under the battery cover there is a “channel” switch - 3 options are available.


A sensor transmits its status data about once every 40 seconds.
Transmission is carried out using on-off-keying (OOK) and Manchester coding at a carrier frequency of 433.92 MHz.

The protocol for Oregon sensors (and some others) was more disassembled by enthusiasts , which made it possible to implement the current project.

Enough theory, go to practice. We assemble a test stand:

I used the components of the Grove series - they are all equipped with identical connectors and are extremely simple to connect to the corresponding Schild connectors.

An adapted sketch from the page from the previous link (the author used “mega” there, I had to tweak the code a little under my hardware) for my sensors showed the following data:
OSV2 1A 2D 10 E3 20 07 88 04 3F 94
OSV2 1A 2D 20 08 8C 27 10 83 43 B6

It turned out that (sequentially):
1A 2D - type of sensor (by the way, some discrepancy between the description of the protocol and the sensors immediately came out - this code corresponds to another set of sensors, but this did not prevent further work),
10 (20 for another sensor) - the channel number is transmitted in the higher 4 bits (depending on the position of the switch on the sensor, takes values ​​1, 2, 4, while 4 corresponds to 3 of the selected channel),
E3 (08) is an identifier of a specific sensor (?), But this value may change after replacing the battery in the sensor and pressing the Reset button (located next to the channel selector and recommended to be pressed without fail after replacing the battery).
Further information on the state of the battery (the flag that it is time to change) and data characteristic of the sensor: information about the current temperature and relative humidity of the air.

From this “debriefing” for myself, I discovered the following: for a meteorological station at Arduino, you can use significantly more sensors than to the factory one (for example, to use the “type of sensor - channel” combination, not just a “channel”, etc.) for identification , you can use not only those sensors that you purchased yourself, but also “neighbors” (unfortunately, my radio broadcast contained data only from my sensors — the neighbors either do not have these, or simply do not want it).

Now the final preparations: for the first sensor, select 1 channel and send it out to the frost window, assign the second channel to the second sensor and leave it to live at room temperature. Sensors will be identified precisely by the channel - for the current case this is more than enough.

A bit of programming and done:
The first line of the display shows the current temperature, relative humidity and battery status of the sensor outside the window, the second is the same, but for the room sensor. The LED connected to the Arduino blinks when data is received from any sensor (just for fun).



The display of the "starter kit" at the same time pleased and disappointed.
In the “pluses” - the minimum of digital outputs is involved, in the “minuses” - the lack of support for the Cyrillic alphabet and in the current version of the library there is no possibility of generating their characters (I wanted to draw symbols for the “full” and “empty” batteries).
Due to the last limitation, I looked through the available characters and picked up two that are suitable for this case.
The result is visible in the photo (a fresh battery is installed on the first sensor, and an almost discharged battery was installed in the second one especially for the test).

A small note on the range: the specification for the Oregon sensors stated that they work up to 30 meters from the base unit.
In my case (apparently due to the fact that the quality of the RF receiver or “contamination” of the air is high), the system works steadily provided that the sensor is at a distance of 5-7 meters (barriers in the form of 1-2 walls are also present) . If possible, it will be necessary to purchase a receiver from another manufacturer and test with it.

Thus, in the "dry residue":


To-do:


Related Links:

Source: https://habr.com/ru/post/165747/


All Articles