Arduino Rain Sensor

See sub forums to discuss "Do it yourself" projects.
Post Reply
User avatar
Graeme1858 Online Great Britain
Co-Administrator
Co-Administrator
Articles: 1
Posts: 7537
Joined: Mon Jun 24, 2019 7:16 pm
4
Location: North Kent, UK
Status:
Online

TSS Awards Badges

TSS Photo of the Day

I Broke The Forum.

Arduino Rain Sensor

#1

Post by Graeme1858 »

I put an Arduino Rain Sensor for the observatory together earlier in the year. But when the weather heated up I dropped it and worked on an extractor fan controller instead. Well it's not hot any more and there's risk of rain every day instead! So I've resurrected the Rain Sensor project and improved on the mark 1 with the addition of an anti condensation heater to stop dew forming on the rain sensor plate.

So the Arduino measures the voltage between alternate lines on a Vero board using a voltage divider, when a rain drop falls on the Vero board the voltage on an analogue input pin changes. I used an Ascom driver I found online to tell NINA the Safety Monitor state change from Safe to Not Safe. Then using the NINA Ground Station plugin, NINA sends a notification to an app called Pushover. Pushover then sends a notification to my phone to wake me up if I've nodded off on the settee!

A DHT11 sensor measures temperature and humidity. The Arduino code calculates the dew point and when it rises to < 4 below ambient temperature a relay switches on a supply to a pair of heating power resistors to prevent dew forming on the rain sensor and giving a false alarm.

The whole thing works really well, on my desk! I've yet to put it in the observatory. There's just one minor flaw, there is no heater feedback loop, once the humidity rises and the heaters come on, they stay on. I think I need to put the heaters in a box under the rain sensor and use another DHT11 to provide additional control of the heaters.

This is it so far:

20231101_154138.jpg



Can anyone think of a problem that hasn't occurred to me? Yeah, I know the rain sensor plate soldering is rough! It had been a while when I did that. The final version will be neater. And yeah I know the cable feeding the secondary side of the relay contacts is too small, the final installation cable sizes will be fit for purpose!

Graeme
______________________________________________
Celestron 9.25 f10 SCT, f6.3FR, CGX mount.
ASI1600MM Pro, ASI294MC Pro, ASI224MC
ZWO EFW, ZWO OAG, ASI220MM Mini.
APM 11x70 ED APO Binoculars.

https://www.averywayobservatory.co.uk/
User avatar
TerryMcK Online Great Britain
Articles: 0
Posts: 15
Joined: Thu Apr 04, 2024 10:05 am
Location: Eccles, UK
Status:
Online

Re: Arduino Rain Sensor

#2

Post by TerryMcK »

Is this now installed and working Graeme? If so have you worked out the bits to put into the NINA sequence?
I'm making one using a NANO and an Hydreon RG-9 based upon a thread in CN https://www.cloudynights.com/topic/7927 ... ina-64bit/ but am struggling with the NINA safety monitor and loop conditions.
Terry - Gatto Ambra Observatory
Scopes: WO: RedCat 51, ZS 73, ZS103, SW: 200P Solar: Altair Herschel wedge, Daystar Scout 60SSDS Mounts: SW: HEQ5Pro Rowan & EQM35Pro. Guiders: All using ZWO ASI120MM minis. Cameras: ZWO: ASI294MM-Pro, ASI 183MC-Pro, ASI 183MM Pro, ASI 174MM Filters: IDAS, Altair, Baader, Antlia, ZWO. Observatory: The Jousting Tent - ROR. Acquisition: NINA on Windows 11 - EKOS/INDI/Kstars on Raspberry PI4 (retired for now) Image Processing: PixInsight, APP, Photoshop 24.1.0 Location: West Manchester Light Pollution: Mucho Bortle 7/8
User avatar
KathyNS Canada
Co-Administrator
Co-Administrator
Articles: 0
Posts: 2633
Joined: Thu Apr 25, 2019 11:47 am
5
Location: Nova Scotia
Status:
Offline

TSS Photo of the Day

TSS Awards Badges

Re: Arduino Rain Sensor

#3

Post by KathyNS »

I don't understand why the heater would stay on. Surely once the temperature-dewpoint spread increases again, the Arduino would switch off the heater? I do much the same thing with my skycam dew heater. In 'automatic' mode, it turns on the heater when the spread is less than 2 degrees (C) and turns it off when it is more than 2 degrees. It is necessary to keep the sensor away from the heater so it is responding to ambient air temperature rather than device temperature.

Your rain sensor is a "wet leaf" type. It is very effective for detecting moisture, but might be too effective. You have the advantage of doing the analog-digital conversion yourself, so perhaps you can calibrate it better than mine. I used a commercial wet-leaf unit (sold by Lee Valley for detecting water heater leaks) which had a simple on/off relay output. Unfortunately, it would trigger on the slightest dew, aborting a perfectly fine photo session unnecessarily. I replaced it with a Hydreon RG-11 rain sensor, which, on the second-most-sensitive setting, gives very sensitive rain detection without triggering on dew.
Image
DSO AP: Orion 200mm f/4 Newtonian Astrograph; ATIK 383L+; EFW2 filter wheel; Astrodon Ha,Oiii,LRGB filters; KWIQ/QHY5 guide scope; Planetary AP: Celestron C-11; ZWO ASI120MC; Portable: Celestron C-8 on HEQ5 pro; C-90 on wedge; 20x80 binos; Etc: Canon 350D; Various EPs, etc. Obs: 8' Exploradome; iOptron CEM60 (pier); Helena Observatory (H2O) Astrobin
User avatar
Graeme1858 Online Great Britain
Co-Administrator
Co-Administrator
Articles: 1
Posts: 7537
Joined: Mon Jun 24, 2019 7:16 pm
4
Location: North Kent, UK
Status:
Online

TSS Awards Badges

TSS Photo of the Day

I Broke The Forum.

Re: Arduino Rain Sensor

#4

Post by Graeme1858 »

TerryMcK wrote: Mon May 13, 2024 9:40 am Is this now installed and working Graeme? If so have you worked out the bits to put into the NINA sequence?
I'm making one using a NANO and an Hydreon RG-9 based upon a thread in CN https://www.cloudynights.com/topic/7927 ... ina-64bit/ but am struggling with the NINA safety monitor and loop conditions.

Hello Terry

Yeah, it is. In fact the permanent version in the observatory has been operational for six months. And it works well too. In addition I made a temporary mobile version for star parties as well. I used that one last week at Carole's East Sussex Deep Sky Camp, that worked ok too. Except I fed it with a 9V supply and the humidity was really high and the heater didn't get hot enough to dispel the dew, so dew formed on the sensor plate, the buzzer went off, my phone started ringing and the telescope parked itself! A good test I suppose. I put a 12V supply on it and all was well.

I use a Safety Monitor ASCOM Driver I found on CN, I can give you a link if you like. My sensor plate connects to a Nano analogue input, when it rains the analogue value changes, my code turns a digital output low and the ASCOM driver is triggered. NINA sees the ASCOM driver and connects the Safety Monitor to it. The Arduino Void Loop just checks the status of the driver pin. I can post my code if you like?

Graeme
______________________________________________
Celestron 9.25 f10 SCT, f6.3FR, CGX mount.
ASI1600MM Pro, ASI294MC Pro, ASI224MC
ZWO EFW, ZWO OAG, ASI220MM Mini.
APM 11x70 ED APO Binoculars.

https://www.averywayobservatory.co.uk/
User avatar
TerryMcK Online Great Britain
Articles: 0
Posts: 15
Joined: Thu Apr 04, 2024 10:05 am
Location: Eccles, UK
Status:
Online

Re: Arduino Rain Sensor

#5

Post by TerryMcK »

Oh yes please. That would be great.
Terry - Gatto Ambra Observatory
Scopes: WO: RedCat 51, ZS 73, ZS103, SW: 200P Solar: Altair Herschel wedge, Daystar Scout 60SSDS Mounts: SW: HEQ5Pro Rowan & EQM35Pro. Guiders: All using ZWO ASI120MM minis. Cameras: ZWO: ASI294MM-Pro, ASI 183MC-Pro, ASI 183MM Pro, ASI 174MM Filters: IDAS, Altair, Baader, Antlia, ZWO. Observatory: The Jousting Tent - ROR. Acquisition: NINA on Windows 11 - EKOS/INDI/Kstars on Raspberry PI4 (retired for now) Image Processing: PixInsight, APP, Photoshop 24.1.0 Location: West Manchester Light Pollution: Mucho Bortle 7/8
User avatar
Graeme1858 Online Great Britain
Co-Administrator
Co-Administrator
Articles: 1
Posts: 7537
Joined: Mon Jun 24, 2019 7:16 pm
4
Location: North Kent, UK
Status:
Online

TSS Awards Badges

TSS Photo of the Day

I Broke The Forum.

Re: Arduino Rain Sensor

#6

Post by Graeme1858 »

KathyNS wrote: Mon May 13, 2024 12:17 pm I don't understand why the heater would stay on. Surely once the temperature-dewpoint spread increases again, the Arduino would switch off the heater? I do much the same thing with my skycam dew heater. In 'automatic' mode, it turns on the heater when the spread is less than 2 degrees (C) and turns it off when it is more than 2 degrees. It is necessary to keep the sensor away from the heater so it is responding to ambient air temperature rather than device temperature.

Because the ambient temperature it monitored by an external DHT11 temperature and humidity sensor. My code calculates the dew point. When the dew point is within 4°C of the ambient temperature the Nano turns the heater on. But there is no closed loop, the heater doesn't increase the ambient temperature just the sensor plate so there's nothing to tell it when to switch off. So I added a second DHT11 that sits inside the box, when the internal temperature rises (25°C I think, from memory) the second sensor triggers the Nano to turn the heater off.

KathyNS wrote: Mon May 13, 2024 12:17 pm Your rain sensor is a "wet leaf" type. It is very effective for detecting moisture, but might be too effective. You have the advantage of doing the analog-digital conversion yourself, so perhaps you can calibrate it better than mine. I used a commercial wet-leaf unit (sold by Lee Valley for detecting water heater leaks) which had a simple on/off relay output. Unfortunately, it would trigger on the slightest dew, aborting a perfectly fine photo session unnecessarily. I replaced it with a Hydreon RG-11 rain sensor, which, on the second-most-sensitive setting, gives very sensitive rain detection without triggering on dew.

I used an eight way dip switch on the circuit board that adjusts sensitivity. It seems to be set about right, the mobile sensor triggered as soon as some fine rain started when I did a trial run in the back garden before the Deep Sky Camp. Does the Hydreon RG-11 rain sensor come with a heater to prevent dew causing false positives?

Graeme
______________________________________________
Celestron 9.25 f10 SCT, f6.3FR, CGX mount.
ASI1600MM Pro, ASI294MC Pro, ASI224MC
ZWO EFW, ZWO OAG, ASI220MM Mini.
APM 11x70 ED APO Binoculars.

https://www.averywayobservatory.co.uk/
User avatar
KathyNS Canada
Co-Administrator
Co-Administrator
Articles: 0
Posts: 2633
Joined: Thu Apr 25, 2019 11:47 am
5
Location: Nova Scotia
Status:
Offline

TSS Photo of the Day

TSS Awards Badges

Re: Arduino Rain Sensor

#7

Post by KathyNS »

Graeme1858 wrote: Mon May 13, 2024 2:26 pm
Because the ambient temperature it monitored by an external DHT11 temperature and humidity sensor. My code calculates the dew point. When the dew point is within 4°C of the ambient temperature the Nano turns the heater on. But there is no closed loop, the heater doesn't increase the ambient temperature just the sensor plate so there's nothing to tell it when to switch off. So I added a second DHT11 that sits inside the box, when the internal temperature rises (25°C I think, from memory) the second sensor triggers the Nano to turn the heater off.
So you want to be able to modulate the heat output for a specific temperature? That makes sense. I just turn mine on and leave it on until the temperature - dewpoint spread opens up. I now have the capability of monitoring the temperature of my skycam's sensor, and I discovered that my 3-watt heater keeps it 7-8 degrees C above ambient. Which is fine, so I have no plans to modulate the heat output. But if your heater is more powerful, I can see that you would want to do that.


I used an eight way dip switch on the circuit board that adjusts sensitivity. It seems to be set about right, the mobile sensor triggered as soon as some fine rain started when I did a trial run in the back garden before the Deep Sky Camp. Does the Hydreon RG-11 rain sensor come with a heater to prevent dew causing false positives?

Graeme
The RG-11 does have a heater, though it is a pretty small one, only 1/4 watt. The sensor has several sensitivity settings. On the most sensitive one, it still triggers on heavy dew, in spite of the heater. On the next most sensitive setting, I got no false positives, but still good sensitivity to light rain. Hydreon RG-11 Manual
Image
DSO AP: Orion 200mm f/4 Newtonian Astrograph; ATIK 383L+; EFW2 filter wheel; Astrodon Ha,Oiii,LRGB filters; KWIQ/QHY5 guide scope; Planetary AP: Celestron C-11; ZWO ASI120MC; Portable: Celestron C-8 on HEQ5 pro; C-90 on wedge; 20x80 binos; Etc: Canon 350D; Various EPs, etc. Obs: 8' Exploradome; iOptron CEM60 (pier); Helena Observatory (H2O) Astrobin
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “The DIY corner”