Alright, so I broke down and bought two resistive sensors from amazon. The come with the dedicated circut that has a potentiometer, and comparator, and both analog and digital output pins.
I've confirmed the function of teh sensor as this: Digital Out Pin is either On or Off. When the sensor is wet, it's 0v, when it's dry it's 3.3v Analog Out Pin is a floating variable of voltage measurement after applied resistance. 0v when it's dry, but the deeper the probes go into the water, the less resistance, thus higher voltage result. To me, this is the most accurate reading (as opposed to digital out) as it's a real time variable, not just a static result....
My challenge: How do I attach this Analog Out Ping to a GPIO pin to get a reading of the voltage? A multimeter tells me all the values are as they should be on my wires... the issue is my respberry pi is not getting any values during the reading. It either stays at 0.00, or displays no value at all, depending on the hardline line configuration I'm testing it with..
I've tried ReadInput pin, analogdigital, and various configurations to no avail.
Thanks in advance.
Any ideas why when I change from INV to DIR, it makes no difference?
Right now, that is the problem I have. My pin reads 101 when dry, 1 when wet, which from what I understand about your autowatering logic is going to cause problems...
Maybe I'll take a peek at the source code and invert it though - but I'd still like to understand how it's possible that INV or DIR produce the same result. It does not INVERT the result as one would expect..
Thanks.
Alright. So I've confirmed, while in water, the sensor gives a reading of 1.00, while dry, it gives reading of 101.00. I put the settings you have listed, and I've "Reset Cycle' a time or two, and waited 10 minutes or more between each change. I've left the sensor in water, and confirmed it's reading 1.00. Waited 10 minutes +, my relay 1_1 still does not activate. I can manually switch it on while testing.
:(..
I guess from here I'm going to create a brand new hardware row, start from scratch and go from there - though I have little hope because I'm getting the 1.00 reading I need to trigger the watering with a specified minimum of 10, but at this point I have no idea what else to do.
Interesting... changing it from DIR to INV has no affect. I still get a 1 when dry, 0 when wet...
Another concern, how can I program it so that the probes only carry current every 15 minutes, and maybe only for a few seconds during the check?
Right now I've got the sensors powered on a gpioPIN - so it's vcc is 3.3v. But it's constantly powered on... Logically I'm thinking I can cycle power to that GPIO pin only during readings, and cycle off when done, to minimize corrosion, but I'm not sure how to do this in the settings/web interface.
EDIT: Maybe I set the PowerPin to the Pin that's powering the moisture sensor? And then the autowatering relay settings for that sensor will interpret and use the powerpin to cycle the sensor on/off according to the schedule???
Just thinking out loud here...
Thanks!
My one complaint about using this sensor with this type of comparator circut board, and the Logic ON/OFF for watering, is that over time as the prongs corrode, calibration will need to be done at the local circut board. I'll have to go to each sensor and adjust the potentiometer manually to calibrate... that's a lot of calibration. If I could do it from the centralized WebUI, that would be great, but I don't see a way to do that since the circut board on the sensor is what determines when to send a ON/OFF signal and therefor is what would need to be calibrated. :(
No sir, I passed those sensor up and went for these probes. Really, I just needed the circut board more than anything, but at 6$ each, I figured I would give these a try: https://www.amazon.com/gp/product/B07RZBKSQ9/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 Okay, thanks for the help. I'll tinker a bit more and see what we end up with.
Thanks!
I see some good progress here, actually there was another post dealing with your exact hardware configuration. Please dont' tell that you have bought these sensors:
Anyway, as I understood from your setting, can you confirm that if go to setting and read the sensor, you get 0.00 when wet and 100 when dry?
As this is only two values reading the autowatering configuration should be pushed a little.
The autowatering algorithm requires dry values to be lower and wet value to be higher. To adjust it you need to go to calibration and choose "inv".
As the reading Zero is seen as a wrong reading, you should add an offset in the calibration, offset=1 will make the trick. So the reading now should be 1 for dry and 101 for wet.
The option "under MIN over MAX" can't be used with this "binary" sensor.
NOTE: the system does not react immediately to input, so you should wait some minutes before the activation, according to the autowatering setting, you can average more than one reading before the relay activation.
Below one simple configuration example:
Alright, so I've decided to roll with the digital output - and I manage to get a reading from my pin. It reflects wet and dry as expected. Now my challenge is automating the activation of the relay via "autowatering". I configure relay1_1 to read from the moisture sensor I've created, and I set it to Min and Max mode. When my sensor is wet it reads 0.00, when it's dry it reads 100, so I set the minimum value to 10 and the maximum to 100 - but it doesn't work. I can verify in settings that the reading from my sensor is infact 0.00, and the autowatering for relay1_1 is set to Min/MAX with a Min value of 10 - but it does not switch on the relay.
I can manually switch on the relay no problem - it seems issue is with the autowatering.
Thanks.
Apparently Raspberry Pi only has digital input pins...