Author Topic: Simple "Rain" sensor options.  (Read 2369 times)

0 Members and 2 Guests are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Simple "Rain" sensor options.
« on: September 08, 2020, 11:04:43 am »
Hi. 

I have a fairly established home automation system which includes indoor temps and outdoor temps, pressure, humidity.  I am looking to extend it to detect when it's raining.

I would be happy enough that it just presents something like "Surface Moisture 45%" or similar.  If however there are options for detecting the amount of rain somehow that would be ideal, but not essential.

Ideally I want low level, I2C/SPI/Serial rather than a component from a proprietary weather station that needs it protocol hacked.

It doesn't need to be industrial grade.  If the sensor corrodes and dies every 2-3 years and is cheap and easy to source I don't mind.

EDIT:  Rather than create a separate post... thinking forward.  What options are there for wind guages for the same low level I2C/SPI stuff?  I'm thinking this would ideally be mounted on my roof/chimney which would involve running 5V to it.  That can be arranged but mounting it on the roof is going to cost me £50 or so for a roofer to get up there, so would need to be reliable, what have others done?

Thanks,
Paul
« Last Edit: September 08, 2020, 11:07:13 am by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Simple "Rain" sensor options.
« Reply #1 on: September 08, 2020, 11:28:11 am »
Rain sensors either work optically, like in your car, or capacitive.
https://teletask.be/en/products/technical-products/sensors/rain-detector-meter/
https://www.kemo-electronic.de/en/House/Garden/M152-Rain-Sensor-12-V-DC.php

Anemometers are simple pulse counters with magnetic encoders or potentiometers, see your local marine shop.
They probably don't talk i2s or spi, that isn't suitable for wiring. Some encoders to talk ssi, that is like spi on rs-232 levels.
 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #2 on: September 19, 2020, 07:19:12 pm »
My car has a rain sensing window shield wipers.  Apparently, it uses infrared camera to sense rain drops.  It works pretty reliably.  However, exactly what the camera is seeing, I have no way to know.  I think any surface based methodology will produce false positives due to condensations. 
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #3 on: September 19, 2020, 08:01:24 pm »
This is something on my very long list of things to play around with.

First off, I thought about these:
https://www.openhacks.com/uploadsproductos/rain_sensor_module.pdf

Then I thought about combining a grid like that with a couple of piezo sensors to detect the rain drops hitting (ideally to distinguish between, "is raining" from "has rained")

Lots of projects around if you search - I always like the hands on reports, like this one http://www.techlib.com/electronics/raindetectors.htm

Then I thought about just collecting the water and using a capacitive fluid level type deal: http://www.medpants.com/liquid-level-sensor

But you have to empty it :)

I would like to get a sensor like this one https://www.radiocontrolli.com/en/component/62/capacitive-rain-sensor Note the heater.

I even thought about a deep learning TensorFlow deal with a Jetson and cam (of course I would have to make a data set which might take a few years :)

Hopefully I am giving you a few ideas even if I really don't know what the best answer for you will be. It's complicate and I will definitely watch the input on this thread.


« Last Edit: September 19, 2020, 08:19:39 pm by DrG »
- Invest in science - it pays big dividends. -
 

Offline bgugi

  • Contributor
  • Posts: 12
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #4 on: September 24, 2020, 04:50:07 am »
I'd put a "liquid present" detector https://www.alliedelec.com/product/optek-tt-electronics-/opb350l250/70048610/ on a drain line below a funnel. you could tweak the sensitivity by using different sized funnels/tubing, or by partially covering the funnel to adjust the minimum amount of "rain" that counts.

Alternatively, you could probably build a miniature shishi-odoshi https://en.wikipedia.org/wiki/Shishi-odoshi#:~:text=A%20s%C5%8Dzu%20is%20a%20type,and%20resting%20against%20a%20rock. that could be calibrated to operate as a simple flow meter. Or just use a flow meter.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #5 on: September 24, 2020, 11:15:41 pm »
The guy at my hardware store said that a common rain sensor is a little cup with a float and a switch.  I assume the cup dries out before it will indicate no rain.  Those are common parts in the sprinkler section of big hardware stores.
 

Offline justanothername

  • Regular Contributor
  • *
  • Posts: 143
  • Country: at
Re: Simple "Rain" sensor options.
« Reply #6 on: October 03, 2020, 02:16:10 pm »
I had exactly such a thing for teardown on my desk two months ago. Unfortunately I made no pictures. But it basically was a funnel where the rain was collected into a spoon on a hinge with a magnet as counterweight.
When the spoon was full and then heavier as the counterweight, it tilted and the water was let out at the bottom. The magnet passed by a reed contact for detection.
Really simple!

Edit: found a similar product, with pictures of the mechanism: https://www.evvos.com/product/rain-and-precipitation/
Edit2: There are such sensors on aliexpress: https://www.aliexpress.com/item/32793367115.html
« Last Edit: October 03, 2020, 02:21:47 pm by justanothername »
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9243
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Simple "Rain" sensor options.
« Reply #7 on: October 03, 2020, 03:13:11 pm »
Aside from detecting surfaces getting wet (subject to delay for detecting rain stopped), you can also use a piezo to detect the sound of rain or Doppler radar/sonar to detect falling raindrops.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #8 on: October 03, 2020, 05:41:16 pm »
While not super sensitive, another option is the standard tipping bucket rain gauge. They usually produce a pulse for every 0.01"  (or 0.2mm), you can assume that it's raining if you have seen a pulse recently. An advantage is that it will allow you to tell how much it has rained.
 
The following users thanked this post: Ian.M

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Simple "Rain" sensor options.
« Reply #9 on: October 03, 2020, 09:22:05 pm »
I thinking more like a capacitive spiral plate, place in what should be direct sunlight.  I'm not interested in high accuracy of things like "Raining", "Not raining", but more "It's wet.", "It's dry" and the gradient between the two (which would probably be a function of how the device works.)

I would expect that in summer it would be Dry with clear spikes with elongated decays, when viewed over a day when it rained.  In winter I'd highly expect it to just report "moderately wet" as it's too cold for things to dry up and too warm for them to freeze.
« Last Edit: October 03, 2020, 09:24:07 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #10 on: October 04, 2020, 03:17:47 pm »
I thinking more like a capacitive spiral plate, place in what should be direct sunlight.  I'm not interested in high accuracy of things like "Raining", "Not raining", but more "It's wet.", "It's dry" and the gradient between the two (which would probably be a function of how the device works.)

I would expect that in summer it would be Dry with clear spikes with elongated decays, when viewed over a day when it rained.  In winter I'd highly expect it to just report "moderately wet" as it's too cold for things to dry up and too warm for them to freeze.

IMO they all have limitations.

The simplest, I think, is resistive - something like this (and rain is plenty dirty and conductive enough).
https://www.robotshop.com/en/steam-sensor.html?utm_source=google&utm_medium=surfaces&utm_campaign=surfaces_across_google_usen
https://www.mouser.com/datasheet/2/744/Seeed_101020018-1217524.pdf
https://www.aliexpress.com/i/32941630886.html

As for capacitive: I was always impressed by this fellows work. Although it is designed for plant watering (certainly could be adapted for your use, I would think), if you look at the story of his development, I think he did a good job of explaining - at least at my level of understanding.

https://wemakethings.net/chirp/

Also note that code and schematic is available.

Hope it helps.

- Invest in science - it pays big dividends. -
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Simple "Rain" sensor options.
« Reply #11 on: October 05, 2020, 06:13:41 pm »
The simplest, I think, is resistive - something like this (and rain is plenty dirty and conductive enough).


As for capacitive: I was always impressed by this fellows work. Although it is designed for plant watering (certainly could be adapted for your use, I would think), if you look at the story of his development, I think he did a good job of explaining - at least at my level of understanding.


I'll check it out. 

The trouble with resistance based devices, they pulse current to measure the resistance with exposed traces.  Current + exposed copper + water = green fur in months.  Other metals may fair better.

"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #12 on: October 05, 2020, 08:15:01 pm »
Quote
Current + exposed copper + water = green fur in months.

I've seen solutions which use an alternating current to mitigate this.

This is easy to do, for instance, with a microcontroller.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Simple "Rain" sensor options.
« Reply #13 on: October 06, 2020, 05:58:48 pm »
I've seen solutions which use an alternating current to mitigate this.

This is easy to do, for instance, with a microcontroller.

I suppose a PWM 0-5V a coupling capacitor and a 2.5V offset divider.  An op amp if you need to buffer the 2.5V ref maybe.  How would you smooth the output to sinusoidal wave?  High capacity coupling cap with a smaller bypass cap???  LPF
« Last Edit: October 06, 2020, 06:01:25 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: us
Re: Simple "Rain" sensor options.
« Reply #14 on: October 06, 2020, 10:05:13 pm »
It could be as simple as switching the polarity of the current flow between the two probes every other reading.

You can also use an AC waveform such as in this project:

https://freecircuitdiagram.com/146-avoiding-electrolysis-for-water-level-detector-probes-using-alternating-current-detection/

U1A+R2+C1 is just an oscillator - you can implement that with a microcontroller pin.

C3+D1+D2+D4+R1 is the detector - you can read that with an analog input or feed it into a comparator.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf