Regular readers of our series on electronics programming certainly remember the last episode, in which we revived the Austrian chip of the radio lightning counter in Arduino. AS3935. And we will stay with storms and hail this time as well, because we will supplement the lightning meter with a detector of total rainfall – a rain gauge. He is professionally called ombrometer.
There are a lot of them on the market, they mostly work on a completely identical principle, and this time we will reach for the model MS-WH-SP-RG for Asian weather stations. You can find it in various variants on AliExpress, but it is also available on the domestic retailers. I finally ordered it for today’s article from LaskaKit for 468 crowns (currently it is sold out, but the seller will stock it again in early July).
Our total rain detector is electromechanical, so the amount of rain is measured using a container on the lever, which, after filling, rotates and connects the electrical circuit, which creates a pulse.
There is a tank inside, which flips over after being filled with water
It takes care of the electrical connection itself when the lever moves magnetic reed contact – in English reed switch -, which you will find in the vast majority of other similar sensors. For example in anemometerswhich measures the wind speed using a propeller, or in contactless detectors of open doors and windows.
The principle of reed contact is simple. There are two in a tiny and hermetically sealed flask ferromagnetic wireswhich are at rest a little apart and the circuit is open. However, when we bring a permanent magnet (or electromagnet) closer to the flask, both tabs are touched and the electrical circuit closes.
Ferromagnetic reed contact
In our case, there is a simple swing inside the plastic container, which always flips to the side after being filled with water. Part of the lever is a magnet, which tilts to move from left to right, and when for a brief moment the tongue contact passes behind the wall, roughly on 50-70 ms connects the circuit.
One pulse corresponds to 0.2794 mm of precipitation
Okay, so we have a primitive mechanical device that generates pulses, but what do they have to do with total rainfall? It’s simple. One pulse corresponds to a total of 0.2794 mm. All you have to do is count the pulses and multiply by this coefficient.
The millimeter total itself then expresses the level of water that has fallen on a unit area of the earth’s surface. If you’re still lost in it, know that a total precipitation of 1 mm corresponds to 1 liter of rainwater that fell on an area of 1 square meter.
We will build this today
The total is usually measured in an hour (mm / hour), so in our case, some of the Arduino plates could gradually add up the pulses, multiplying them by 0.2794, the resulting data is sent via Wi-Fi somewhere to the server and starts counting again.
If the plate counted in an hour, let’s say 50 pulsesafter multiplication it will make a total of some 13.97 mm / hourwhich already corresponds to the lower limit of heavier rain.
The continuation of the article belongs to the premium content
Get unlimited access and Live without ads for 41 CZK monthly