Recently, we built a smog sensor which measures PM2.5 and PM10 ppm particles common in SMOG. This time let’s focus on something easy to do, without deliberations on extending life of the sensor. The Nova Fitness SDS011 (also versions 018 or 015) has proven to be quite accurate, with a good life expectancy, even with nearly theoretical unsupported air humidity above 70%. Today I will try to show you the mobile version of the sensor, using the cheapest elements, and then expand it with a temperature and humidity sensor, display – up to the cloud version. To start with – let’s build the basic version.
NOTICE: The ESPEasy MEGA 2.0 software that we use here – has been updated in January 2018 with much better SDS011 support. When finished with this version check out the updated one (fourth version)
We return today to the simple and quick solutions! The weather station or irrigation/sprinkler system – can’t operate without proper detection of rain, water or even snow. Let’s use the FC-37 sensor (also know as YL-38 or MH-RD, or just similar to the picture)
What will you need?
rain sensor type FC-37/MH-RD (rain drop/snow sensor) – must come with D0 pin, price around $0.50 to $1.50
ESPEasy working on ESP8266 from the previous entries
Installation and configuration
The sensor must be connected to the power supply + 3.3V (3V) and GND of the ESP8266 running ESPEasy. Next we connectthe D0 pin to the selected pin our ESPEasy – which is going to notify Domoticz using IP. Let’s use free GPIO-12 (pin D6 on the NodeMCU v2 board). This sensor also has an analog output – which allows for more advanced detection of rain, and we will deal with in the future.
Finally – we connect the rain sensor plate with the sensor module that is connected to ESP8266:
Check in the Devices section the IDX number – it’s 543 in this example:
Next – let’s configure via WWW interface our ESPEasy software – selecting the “Switch Input”, entering correct IDX and setting some options – please do mind the “Inversed”, and of courser the correct value of IDX:
Let’s test our sensor! For this purpose you should set the sensor using Philips screwdriver just so that the green LED still does not glow when we apply only dry finger plate (blue cube with white “screw”):
Rain drop sensor setupIf the sensor is correctly adjusted we should get the green LED to glow right after dropping some water on the sensor plate:
Of course, when the device is installed outside, the seonsor is protected – we need to re-set it so as not to react not to dew, but the rain or snow.
Domoticz should show us this swithc in the following way:
When there is no rain:
And when it rains:
That is it!
Embedded devices: Linux on Raspberry Pi, ESP 8266 and others