I have built a rain detector myself, which is supposed to function as a switch on a digital input. The sensor consists of parallel metal pins, where every second pin is soldered to a silver wire. On the other side, it is the same. For testing, when the sensor is shorted with a wire, a digital input should go to LOW.
Strangely, this does not work with the Arduino; the input always remains HIGH. When I measure the sensor, using a multimeter, I get an open circuit (OL). If I touch the sensor area with a piece of wire, connecting two parallel rods, I get a closed circuit displayed on the multimeter.
Why doesn't this work with the Arduino or what i am missing here?
Here is a photo from the sensor and the code I am using for testing:
It is very strange. I tried now for two hours and it did not work. Now it is working. This must be some kind of spirituality of this forum.
Thank you all!
Are you sure that you didn't have a bad connection ? I am suspicious of the values returned by analogRead() if you actually shorted the two poles of the sensor
Yes could be. First i tried it on Input 1, then on Input 2 and now on Input 5.
Or it could be some water left somewhere i am not sure, but now it works like a charm. Tested it now with water. -> WET
After drying with some towel -> DRY
Of course. I can send you a 3mf file.
The wire gauge is just a normal wire we are using in our country for house installations.
Is named:
H07V-U 1,5mm²
And it has a diameter of 1.33mm
I can not upload the 3mf file here, but i can send it by email if you like?
There is also still room for some improvement of the sensor.
If you have Solidworks i can also send you the raw solidworks file and you can modify it by yourself.
I doubt that a conductive rain sensor will reliably work for long.
Rain (clean water) is a poor conductor.
The metal electrodes will eventually oxidise/migrate, creating a bridge between electrodes.
I can think of better (longer lasting) ways of detecting rain.
optical, as used in car windscreens.
capacitive (non-exposed electrodes), like your smartphone screen.
You are right, conductive sensors don't last that long. But since it's a homemade one, made with materials that you might have at home, it's not such a big problem to build a new one. I actually had a sensitive sensor (touch sensor) in use before, but it didn't trigger reliably. Optical and acoustic sensors cannot be made from materials that you have at home. But as I said, you are right, there are better and more durable solutions.
Another possibility might be a small light plastic tray improvised so that when water reaches a certain level it tips over, empties, and triggers a micro switch before tilting back to its original position. A count could deliver duration and/or intensity info.