Mpp WIFI battery Weather station with precipitation prediction algorithm

11 views
Skip to first unread message

sergey

unread,
Jan 26, 2021, 7:14:48 AM1/26/21
to MppDevices
Hi there!
Due to continue pandemic time we have to spend more time at home , it's the best time for DIY.
Wifi based soil moisture sensor that had i written about few month ago works fine  and only one reason i had been concerned about that sometimes system started watering of a plot , a bit before of the beggining rain...
I decided to make a new variant of a device , moreover it would be useful as common remote weather station. 
The only two things where changed for this board design comparable to previous one - is the time chip DS3231 and "environment" sensor. Due to absolutely bad results and unreliableness in outside environment that classical BME280 sensor demonstrated (it has restriction for humidity level for work and dies after 1-2 month) i decided to built my own sensor . Poking around wide variety of sensors i have chosen separate sensor for humidity & temperature  (Texas Instruments HDC2080)  and separate one for pressure (Infineon DPS368). The particular pros for choosing HDC2080 was embedded heater that allows evaporate excess humidity from sensors surface that usually appears after working in "dew point close environment". After such kind of "refreshment" sensor will continue his job with the same high accuracy. Pressure sensor was chosen not so thoroughly (honestly ,from what was in shops stock ), but it quite accurate and rouge-protected from outside environment. It even can check door opening , working inside.
Being so inspired with this work i even wrote the small united library for both of them
Only basic functions as "readTemperature" or "readHumidity " and etc, due to economising size of the code that unfortunately grows.
20201230_184654 (1).jpg 
This is the trial version of the sensors board  .The final design will be like :
newsensorbrd.jpgwith all elements on the back side due to avoid contaminations.The sensor board has pretty reliable I2C interface and going to be situated in good ventilated area far from any heat source.
The main board was left with pretty the same design :
20210119_131231.jpg
Except the transistor that i had to install on the GPIOs exit due to quite high current of heating procedure.
As i told before the system tries to predict precipitation, thanks for all who had advised me for that. There are bunch of algorithm for that ... , first of all the system keeps in RTC memory all data about temperature , humidity and pressure as long as 24h , that allows calculate dew point at every moment. Further the system check if the precipitation approach by calculating CRHUDA algorithm (crossing plot of growing humidity and falling atmospheric pressure relative to the dew point). The algorithm was described by Mexican scientist for rainfall , it has distinctive predict very close precipitations (about several hours or less) . The second line of calculations check if the dew points and temperature spread is less than particular value (depends on the season), and finally the system checks if pressure trend is mimic to when precipitation usually occurs. 
Using on all these points as participation rate the system finally calculate the precipitations likelihood.  Unfortunately the "semi-winter"  is here and it a little bit distorting what i was waiting to obtain from the system , but nevertheless it can predict precipitation almost in each 4th case from 5, with average likelihood about >85%.
The time lag is about 2-4 hours ...
Due to DS3231 time chip i can use real time calculation(seasons, day , night and etc) without being connected to the internet(forums says that it quite accurate hardware).

Whole system consumes about 50ua in deep sleep mode and uses rechargeable battery LIOn 18650 (about 1500mah) accompanied with solar charger.Measurements cycle lasts long 5 sec with consumption about 20ma and in wifi mode about 70-80 ma for 10 sec.
There are some sort of things i have to improve as automatic heating sensor procedure, setting a time and google assistant connections,  but generally system works. :)
Some sort of artificial intelligence , isn't it ?))))
Reply all
Reply to author
Forward
0 new messages