RAIN SENSOR - MODIFIED SOIL MOISTURE SENSOR

by DavidR818 in Circuits > Sensors

55 Views, 0 Favorites, 0 Comments

RAIN SENSOR - MODIFIED SOIL MOISTURE SENSOR

20260308_170013.jpg

I'm building weather station and need a rain sensor of some type. I don't need a rain gauge because I already have a commercial weather station, but still want to indicate when it's raining. Using a capacitive soil moisture sensor is one method to accomplish this, however I have found a way to improve this by adding a 3D printed diverter to the sensor element.

I wanted to use a capacitive sensor rather than a resitive sensor based on the better durability, as the capacitive sensors have a protective layer over the circuit traces and less likely to corrode.

Supplies

1000005452.jpg
DIVERTER.jpg

Supplies that I used:

Capacitive soil moisture sensor - Generic from Amazon - many to choose from

Diverter - 3D Printer and filament

Adhesive - I used silicone sealant for temperary bond, but would super glue for final assembly

Device to apply drops of water (I used a syringe)


I also read the analog output line with an Arduino.

SET UP

1000005432.jpg

The sensor I used can operate from 3.3V, so I connected it to the same 3.3V regulator that powered my Arduino 33 BLE. The other 2 sensor connections are ground and the output line. My output was routed to the analog input on the Arduino (A0). The A/D was used to read the sensor directly. A digital voltmeter could be used to read the output of the sensor (in volts rather than A/D counts) if desired and skip the Arduino.

The sensor surface was exposed about 2 inches. This will mimic the set up in my final weather station, so the sensor’s electronics and connector are in a housing with the sensing element exposed to the rain.

I also sloped the sensor surface downward away from the electronics 15-20 degrees to shed excess water and facilitate drying when the rain ends.

Drops of water were applied with a simple syringe.

EVALUATION

CHART 1.jpg
CHART 2.jpg
SENSOR LINES2.jpg
DROPS CENTER.jpg
OUTER TRACK.jpg
DRPS BOUNDRY.jpg

I tested the sensor by applying water drops and measuring the Arduino's A/D counts to assess its response. The sensor is typically placed in wet soil and fully surrounded by it. In the case of a rain sensor we are trying to detect drops of water which is not the configuration this sensor was designed for.

Examination of the sensor shows specific areas used in the capacitive sensing. The soil or water would couple the sensor’s areas together to change the output. To evaluate the affects I used drops of water in controlled areas. As can be seen, water droplets in just the interior or just on the edge band (outside track) do not affect the output much. Drops directly onto the boundary between the two are what drives the output to change.

Then the number of drops on the boundary position was evaluated. As expected the higher number of drops provided a larger change in the output.

To achieve a higher probability of getting drops into the boundary area a water diverter was designed (stl attached) to direct any water falling into the interior section of the sensor directly to the boundary. The deflector was 3D printed (PLA was used initially for evaluation, but a more weather resistant material will be used for long term use in the outdoor environment).

The sensor was evaluated in the following steps:

Dry

Dry with diverter (to evaluate the output changes caused by the diverter itself)

Diverter with 2 drops

Diverter with 3 drops

Dry with diverter (to assure a repeated result when dried)

Downloads

CONCLUSION

CHART 3.jpg

Based on these results, I plan to use this sensor with the diverter for my rain indicator. The diverter definately directs the water droplets to the boundry area providing the most output change.

The test with the diverter showed better results with 2 or 3 drops as compared to the data without the diverter. I am quite sure this was due to water drop size being larger when the diverter was evaluated.

I plan to set my limit to 825 A/D counts or less to indicate that it is raining.

The data will be repeated once the sensor is positioned in its housing to evaluate any effects that might be introduced by mounting methods.

This is a quick and easy method to sence if it is raining and could be used with or without a micro based weather station.