Software apps and online services
We like to grow vegetables in the yard around our house, the wife really enjoys fresh spices from the garden, basil, parsley, fennel, asparagus, etc. She usually tries to pick vegetables that the deer will not eat as we have roving gangs of deer that will turn your prize watermelons to an empty vine in no time. (Fortunately the watermelons were just ripe by then).
So I have always watched out for a way to help deer proof the garden, and this sensor seemed like a good project to try. I had some 12 vac solenoid water valves from another garden watering project, and put those to use here with a noisy rotating impact sprinkler we picked up at the thrift store once.
I wanted to make the unit compact and self contained and decided to put the sensor in the top of a piece of scrap PVC pipe that a pill container will just fit over for installing various filters and make it water proof from the top, with a squarish hole cut out for the sensor. Two lithium ion batteries 18650 in series with an on/off switch, bucking regulator, an esp8266-03 wifi module and the sensor on top slide into the pipe.
The wifi module when powered on connects to the house wifi, via a repeater if needed, to a Mosquitto mqtto server and publishes control signals to the topic /watervalve, ON to turn it on and OFF for off. The esp Arduino program logic watches for 2 pulses of over 198mSec and when detected, publishes an ON message. After a 5 second ON period, OFF is published and then a 30 second cooldown period starts where no sensor pulses are acted on. After the 30 second cooldown the system is armed and ready to engage again if anything trips the sensor.
This pole is self contained with batteries for testing and demonstration purposes. Wifi would probably drain them in a day or so, even when using a high efficiency bucking regulator so a permanent installation would need a wired power supply.
The esp8266 that activates the water solenoid is wired to a crydom solid state relay that can use the 3v3 signal to control a 115VAC power to a 12VAC transformer.
Here is a demo video of the system in action.