Capacitive Rain Sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Shardan
Normal user
Posts: 1122
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Capacitive Rain Sensor

#1 Post by Shardan » 15 Mar 2019, 23:50

The usual cheap rain sensors from AliExpress and other platforms have some disadvantages.

They work by conductance so the electrodes must have direct contact to the water.
Dirt and aging can influece this, the water conductance may differ depending on
what a raindrop collected on it's way through the air.

Worse, these sensors mostly use DC. Over time the sensor gets corroded by electrolysis.

This design uses a capacitive sensor. It is covered by solder resist, on top I sprayed a thin
urethane film for better environment resistance.
.
RainSensor_Cpl.jpg
RainSensor_Cpl.jpg (382.92 KiB) Viewed 1213 times
.
The complete sensor fits into a box of 83x58x33mm soit's about half size compared to usual sensors.
.
RainSensor_Open.jpg
RainSensor_Open.jpg (713.45 KiB) Viewed 1213 times
.
The sensor itself is built around an ATtiny 2313 CPU as it needs more speed then ESP8266 and ESPEasy can deliver.
It measures the capacitance of the sensor by measuring the loading time of the sensors capacitance.
Capacitance varies due to the dielectric constant of the isolation. The sensor board itself has a
dielectric constant of around 4, pure water is around 80 so water on the sensor makes the
capacitance bigger, it takes longer do load it. This difference is measured.

The ATTiny gives three signals for "a bit", "rainy" and "really wet".
The signals are connected to switch inputs of the ESP-07S, LEDs on the PCB show the signal states.
Internally the ATTiny uses a "Meridian" calculation to keep the measurement stable.
Threshholds can be changed in the source of ATTiny firmware.
On top there is a DS18B20 in the box. As it gets warm in the box it is not suitable to
gather environment temperature. It is used to switch the sensor heating on if temperature
gets under a certain level to avoid water freezing on the sensor or snow settling on the surface.
The sensor is heated if it gets wet or temperature is low.

If anyone wants firmware and/or PCBs message me.
(PCB's, ATTiny firmware and schematic designed by me)
Last edited by Shardan on 16 Mar 2019, 15:25, edited 3 times in total.
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3304
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Capacitive Rain Sensor

#2 Post by grovkillen » 15 Mar 2019, 23:52

Awesome! Let's start sell them! 8-)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1122
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Capacitive Rain Sensor

#3 Post by Shardan » 16 Mar 2019, 00:07

I still want to make some changes to the firmware.
It works nice, the ESP does the heating control well...
But the setting of threshhold values by recompiling and flashing firmware isn't to my likings.

It should be possible to read the values from serial and store them into the EEprom area of the chip.
The usual progger for the ESP and a terminal program should do.
The serial interface is already implemented, I use it for calibrating, it sends the actual timecounter value.
The serial receiving part still has to be done.
If ESPEasy gets a real serial for controlling some day, setting of these values should be possible
even via ESPEasy. Just read the value from the ATTiny and set threshhold values accordingly, that would be perfect.

But when setting thershholds via serial is done selling is possible I think.
Regards
Shardan

SzuR
Normal user
Posts: 1
Joined: 22 Jun 2019, 11:02

Re: Capacitive Rain Sensor

#4 Post by SzuR » 22 Jun 2019, 11:06

Hi
Great project can you please send me pcb's and sketch?
My email is mszura1@gmail.com

Shardan
Normal user
Posts: 1122
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Capacitive Rain Sensor

#5 Post by Shardan » 22 Jun 2019, 12:00

SzuR wrote:
22 Jun 2019, 11:06
Hi
Great project can you please send me pcb's and sketch?
My email is mszura1@gmail.com
I can't send a sketch, as it is not based on the Arduino IDE.
All PCB's can be obtained from me, later maybe from Grovkillen's shop.
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests