I want to use arduino to control the watering of my greenhouse.
I may have about 5 moisture sensors, and thought about how to save some arduino pins, given that I will also monitor other sensors.
My awesome(?)/aweful(?) idea was that I just need a rough idea of how the global soil moisture is, and thus just having the 5 sensors in serial with their resistors, and as a result reading a sum of their outputs.
One dry spot can make everything read as very dry, even if the others are actually drowning.
Only a good idea if you don't care too much about reality, or have an exceptionally good control of keeping all spots at the same humidity - but if so, you wouldn't need five sensors in the first place.
The cheap sensors will only last a week or two if they're left in the soil. Spend a few more bucks but expect to spend the same bucks every 6-12 months. The really expensive ones don't have any metal in contact with the soil, so they're also better for the plants.
Switching them completely off should help a lot (so power it through the pins, then set those pins to INPUT to switch off the power to the sensor). At least that way you stop the galvanic corrosion. Disadvantage is that you need three pins per sensor (two digital out for power - Vcc and GND - and an analog input to take a reading).
capacitive sensors with a ESP32 about $15
difference that the cheap ones deteriorate in the dirt
the expensive ones deterioirate in the water you apply to the area.
since you are not eating the plants, all the copper, tin and lead that you add to the soil are not a big deal.
I thought the simple ones last about 1 growing season
and that the simple ones +AC last 2 or 3. some have automatic reversal of the voltage to 're-deposit' what is lost to the electrolosys created by sensing.
also, you only need to power it once a day.
if you want, get a multi channel device and read one at a time, once per day.
if you want cheap, get some copper wire and make your own. rocket surgery is not required for these sensors.
MakerStuff : opensource : CHIRP
CHIRP has stand-alone has I2C and RS485
knock-off of Chirp with added waterproofing : SoilWatch10
Since the CHIRP open source discovered the method and published, the number of knockoff's have grown every season. aliexpress has multiple knockoff-s some with the I2C, some analog. reviews are mixed from can't get it to work, to use the CHIRP technical pages to connect.