OpenSprinkler Forums Hardware Questions OpenSprinkler 3 wire Flow Sensor Reply To: 3 wire Flow Sensor

#41339

Ray
Keymaster

You can actually use this flow sensor directly with OpenSprinkler. Specifically, you will need to solder the red wire from the sensor to the VIN (+5V) pin (all mapped out pins are on the top-left corner of the circuit board). This allows OpenSprinkler to provide 5V power to the sensor. Then connect the yellow (data) wire to the sensor terminal’s left port, and black wire to the right port (this is internally wired to OpenSprinkler’s GND pin).

Although OpenSprinkler is supposed to only accept dry contact switch sensors, in practice due to the way it’s implemented (a digital input pin with pull-up resistor), any sensor that outputs pulsing signals (between 0 and 5V) are also acceptable. This flow sensor has a Hall effect sensor, which is powered by 5V and outputs 5V squarewaves. So it should work just fine.

Because there is a 4.7k series (protective) resistor between the sensor (which outputs up to 5V) and the digital input pin (which is only 3.3V tolerant), you don’t need a level shifter (most digital pins have internal zener diodes, which will clamp the voltage coupled with the series resistor).

The only practical issue I can imagine is that this sensor can send very high frequency pulses which may exceed the maximum frequency the firmware accepts (200 pulses per second). If needed, this can be changed in software to accept higher frequencies.