OpenSprinkler › Forums › Comments, Suggestions, Requests › soil moisture sensor › Reply To: soil moisture sensor
Sure, since this sensor outputs a digital signal, you can connect it to any GPIO pin and set that pin as input to receive the sensor output. You may need a 5V to 3.3V level converter (a 100ohm resistor followed by 3.3V zener diode is sufficient) if the output is 5V. Then you can modify the firmware to trigger any event when the soil moisture sensor status changes. For example, the simplest is to treat the soil sensor as rain sensor — if the output is high (i.e. moisture is sufficiently high), stop all zones from watering. In fact, I think you can even connect the output directly to the rain sensor port (one pin on the rain sensor port is connected to GND, so the GND wire from the moisture sensor should go to that pin, and the signal wire goes to the other pin).
Beyond this kind of simple sensor, there are also commercial soil sensors that are designed to work with basically any sprinkler controller. One example is Hunter’s Soil-Clik. Again, these work almost like rain sensors that will prevent the controller from watering when the soil moisture level reaches a certain threshold.