OpenSprinkler › Forums › Hardware Questions › OpenSprinkler › Flow sensor routing on Open Sprinkler PCB itself?
Tagged: esp32 flow sensor
- This topic has 2 replies, 2 voices, and was last updated 7 years ago by
dkkim.
-
AuthorPosts
-
May 24, 2019 at 1:46 pm #60599
dkkimParticipantHello,
I’m trying OpenSprinkler using Paolo Becchi’s ESP32 implementation (on a little ESP32 LoRa board). It runs fine over the web, etc, though not connected to any sensors or valves… Currently waiting for a couple of his Smart Solenoids to try the LoRa portion!
Looking to hook up a reed switch flow sensor I bought recently, and thinking about how to connect it to the appropriate GPIO pin.
Imagining something like pull-up and pull-down resistors to Gnd and +3.3V, respectively. I thought to use the reference OpenSprinkler implementation as a guide to check my thinking. However, I can’t find a schematic to review, other than Eagle files on Github… does anyone have a PDF, or know how the flow sensor is actually wired to the GPIO pins on the board?Any thoughts appreciated.
Thanks,
DavidJune 7, 2019 at 7:17 pm #60893
RayKeymasterEagle is free, you can download, install it, and open the circuit design files with it.
Dry contact sensors like rain sensor, reed switch flow sensor, can be directly connected between a GPIO pin and ground. These sensors are un-powered and behave just like switches. Most GPIO pins on ESP8266 (and I believe ESP32 as well) support internal pull-up so you don’t need external pull-up resistors. OpenSprinkler design also adds a 4.7K series resistors which is purely for protection purpose (in the past we’ve seen users carelessly plug in 24VAC into the sensor port, instantly toasting the microcontroller). If you can ensure such accidents won’t happen, there is no need to add the series resistor. If the sensor is placed outdoors, you may consider adding a MOV or TVS diode to protector the GPIO pin from surge voltages.
June 12, 2019 at 2:32 pm #61042
dkkimParticipantThank you @Ray for the thorough answer! (and sorry for the delayed thanks)
That makes perfect sense… I tend to be a belt-and-suspenders guy, so the extra 4.7k resistor makes sense.
BTW I did actually switch to a plan where the flow sensor goes into a stock OSPi and the ESP32 acts as an extender only. This way I get a nice solid platform with the OSPi and also a faster platform to run any monitoring scripts, etc.
It’s a nice product.Cheers,
David -
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler › Flow sensor routing on Open Sprinkler PCB itself?