In this post the instructions on how to connect a rain sensor ON/OFF type to the hydrosys4 system.
This type of sensors are made with a material that expands with water, this expansion trigger the activation of a mechanical switch. Until the material is wet, the switch is OFF (open circuit), so this state can persist for several days until the material dries. The switch is normally closed, when the rain is detected the switch opens. This type of sensor is made to be connected directly in series with the valves, it can controls several valves at same time if it is connected between the valves and the common. This is the easy way to connect it. Anyway in case you want to monitor the activity of the sensor and you want to flexibly associate the valves to be controlled by the rain sensor, it is possible to connect the sensor to the one of the pin of the raspberry set as interrupt. I made a video about the Rain Sensor connection and setting here:
Below a summary of the setting:
First choose a PIN which is not already present in the "hardwareSetting" table "pin" field.
The "hardwaresetting" table indicates the GPIO PIN number.
For the Hardware connection just connect the selected RPI pin to one of the Rain sensor wire and the other wire to the ground.
For the Software Setting, first you need to create an interrupt to be associated to the GPIO PIN;
go to "hardwareSetting" page, click "edit", and in the first row add the following setting:
Click "add" and then "confirm and Save"
At this point you should be able to see this sensor in the "interrupt" page.
Go to "interrupt" page, select the relay you want to be connected to the RainSensor and apply the following setting:
When the sensor activates (the circuit opens) an interrupt is triggered, the system will set the relay to zero and start a blocking period of 20 minutes in which any other command to the relay will not take effect. After 20 minutes, it checks the sensor level, if this is still open then it extend the blocking period of other 20 minutes and so on until the sensor closes the circuit and the blocking period is not renewed anymore.
The graph will provide the visualization of the blocking period, as in the example below:
Is this really working every 15 minutes? When I watch the video text output it seems the software is printing out...
Interrupt Level High, Do not stop blocking period, Extend it ...
and this comes about every 15 seconds ???
Namaste, Kevin