OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Pressure sensor for pump prime and filter clogging monitoring
- This topic has 6 replies, 3 voices, and was last updated 6 years, 7 months ago by Ray.
-
AuthorPosts
-
May 14, 2018 at 12:06 pm #49930
JimSParticipantPump from a small stream and storms sometimes make the stream muddy which clogs the filter. I try not to run the system at those times since I don’t need to water things then anyway but I still get some sediment. Want to monitor the pressure and send an email alert if the pressure drops some. If it drops more (specific numbers not yet determined) then have probably lost prime or something more serious wrong so shut the system down.
Thinking of doing this with an arduino and communicate the status back to OS through USB serial but could use the A/D on the OS board. Anyone do anything like this? I can write a bit of code but mostly hack up existing code so having something to start with would be a big help.
The hardware isn’t a problem for me. The sensor is 0-5V output.
May 17, 2018 at 11:17 am #50051
RayKeymasterIt may be possible to wire the sensor to the sensor port on OpenSprinkler and use it as if it’s a rain sensor. So when the sensor is activate, it disables watering. Though your sensor seems a analog sensor (you said the output is 0 to 5V), it can still be used as a digital switch — generally, microcontrollers detect digital switches by using a pullup resistor. So when the switch is open, it reads a high (e.g. 5V), and when the switch is closed it reads a low (0V). Depending on the logic of your sensor, you configure the sensor as normally open or normally closed.
May 17, 2018 at 12:03 pm #50061
JimSParticipantThanks but I don’t see how that will work. If I set it up so that no pressure is seen as rain to shut off the system when the pump isn’t working properly then it will never start because when the pump is off it will think it has rained. Am I missing something?
I want a little more smarts than just on/off so have posted for this in the software section. Would be great to find code that is close to this because my coding skills are limited.
May 19, 2018 at 12:33 pm #50090
RayKeymasterYou can choose between normally open or normally closed type rain sensor, to select the logic (active high or active low).
If you want more than just on/off, then you would either have to modify the firmware or write an external script. Since many users have custom needs, it’s not possible to write the firmware that addresses everyone’s need. The whole point of this being an open-source product is to give users the power to modify the firmware themselves, to accommodate any custom needs they may have.
May 20, 2018 at 6:54 am #50101
JimSParticipantAppreciate the reply and understand you can’t add every possible option to the program. Just hoping someone else has done something similar that I can leverage. Or even a simple script that does something different that will get me started. Looks like a script is the way to go for this.
Still don’t see why you are suggesting the rain sensor input or how it might work. It seems totally unworkable to me but perhaps there are details of how the rain input works that I am missing. As I see it the two possible scenarios are:
If the rain sensor input is set up as active high (high level indicates rain and shuts off system)
With pump off pressure is zero so the rain sensor is inactive allowing the pump to start. Once pressure builds up it registers as rain and shuts the unit off. I am not sure if shutdown would be immediate or just disable the next cycle. If for the next cycle the pump would be off and reset the sensor input and allow it to start again. If the pressure signal goes away while running the rain signal would go away and not shut down the pump.The other option is if the rain sensor input is set to active low (low level indicates rain and shuts off the system).
With pump off there is no input to the sensor input which shuts down the system. So it never starts.May 21, 2018 at 11:36 am #50122
MikeParticipantHi Jim,
For an example you can check out this thread. The OP and I were using different parameters than pressure but the overall concept is the same – controlling the OS via the API based on external inputs.
Mike
May 23, 2018 at 10:10 pm #50185
RayKeymasterIt’s called ‘rain sensor’ port but it’s really a general purchase sensor port. As you may know, it can be software configured to rain sensor, flow sensor, or a program start switch. I was suggesting it because it’s a terminal that you can plug in a sensor to, and then just change firmware to customize its functionality. You can certainly use any of the spare GPIO pins to read sensors too, but that requires opening the case and solder a wire or two to the circuit board.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Pressure sensor for pump prime and filter clogging monitoring