How to interface with a rain sensor?

I’m wondering how to interface with this rain sensor. It talks about activating a relay when rain is detected. Would this be as simple as connecting the relay output to a digital I/O pin??

Thanks!! Great community.

HI @daneboomer

It looks like you just connect the orange and orange-white wires to a 12V DC source to power the device and then connect the blue and blue-white wires to a Spark digital input and GND. You can set the input to be PULLUP or use an external pull-up resistor.

You will have to debounce the input since the sensor has a relay inside it.

2 Likes

Before connecting anything I’d be tempted to check the Blue-white and Blue wires for conductivity with a multi-meter to make sure no voltage is being applied but if it’s just a relay like you and @bko suspect then you should be fine to follow @bko’s suggestion.

There are several “debounce” examples around the web. Let us know if you need help getting one to work.

2 Likes

Thanks guys. I will find out. I’d like to reiterate how nice a community this is. I don’t mean to point the finger, but the Arduino forum is so aggressive! Possibly because it’s a bigger community, less niche.

1 Like

Would you believe I’m only now (thanks to @BulldogLowell) getting round to implementing this? Does this help picture confirm or refute the theory it’s just a relay?


Thanks

Yup, but I already was convinced when @bko said it back then :wink:

However, you can have rain sensors that can be run off of a µC and 3.3V/5V directly.
e.g.

1 Like