Soil moisture sensor

!!This article is out of date. Use that Analog sensor board or at least that one A2Dto be able to connect analog sensors!!

Here is my solution for soil moisture sensor and OpenSprinkler 3.0AC/3.2AC/OSPI. I don't see a solution for the DC versions at the moment, unless you use your own power supply for the threshold switch.

Note: For OSPI there is an alternative solution via the PCF8591T 8-bit ADC converter, coming soon.

So you need: Humidity sensor, threshold switch, Power supply, OpenSprinkler 3.0/3.2, Housing, Cable

  • The threshold switch is supplied with 24VAC power via the power supply (A1+A2)
  • The humidity sensor is powered by the OpenSprinkler 5V VIN output (VIN+GND to the humidity sensor)
  • The signal cable of the humidity sensor (yellow) goes to the threshold switch input.
  • Switching takes place on 11/12/14: If the voltage at YR of the humidity switch is above the set value, 11-14 is switched, otherwise 11-12.
  • 12 is GND and 14 is VIN. 11 is SN1
  • Now use a screwdriver to turn the threshold switch Hys% to 5 (to the left to stop) and VDC to 1 (to the left to stop). Now adjust the humidity circuit starting from here.
  • The LED on the threshold switch lights up when moisture is detected and goes out when it is dry. “Rain detected” then appears in the OpenSprinkler app and running programs (except those with “Ignore rain”) are interrupted.

Wiring diagram:

OpenSprinkler Humidity Sensor Switch Plan

 

Further links:

Connection of a wireless sensor: https://rayshobby.net/wordpress/reverse-engineer-a-cheap-wireless-soil-moisture-sensor/

Information about the OSPI PCF8591T 8-bit ADC converter: https://rayshobby.net/wordpress/announcing-OpenSprinkler-pi-v1-2/

General functionality of capacitive sensors: https://de.wikipedia.org/wiki/Kapazitiver_Sensor#Feuchtigkeitsmesser

Edit 23.01.2021:

Mit dem A2D Adapter ist kein Schwellwertschalter mehr notwendig. Der Wert kann direk mit dem Potentiometer eingestellt werden.

Edit 05.06.2019:

Sieht ganz gut aus, die unterste Einstellung des Schwellwerschalters passt ganz gut. Allerdings müssen wir wohl an der Software noch einiges anpassen:

  • OpenSprinkler 3.0/3.2 hat ja eigentlich nur einen Anschluss für einen Regensensor. Das ist dafür gedacht, wenn es regnet, dann keine Bewässerung bzw Abbruch einer laufenden Bewässerung.
  • Ein Feuchtesensor lößt jedoch schon aus, während man gerade am bewässern ist. Das führt zur Unterbrechung der Bewässerung, da der Sensor einfach nur nass geworden ist. Aber was ist, wenn es gleichzeitig zu regnen begonnen hat? Der Sensor kann ja nicht wissen, ob die Feuchtigkeit Regen oder Bewässerung ist!
  • Ebenso wird dem Wetterbericht mehr vertraut als dem Feuchtesensor. Wenn der Wetterbericht sagt, es hätte geregnet, der Feuchtesensor aber sagt, alles trocken, bleibt die Bewässerung aus. Lösung ist aber einfach, es gibt die Option “Regen  ignorieren”, dann wird dem Feuchtesensor vertraut.

Wir brauchen nun also eine Lösung für das Problem des auslösenden Feuchtesensors.

Edit 30.06.2019:

Ich habe mit der Entwicklung an eine verbessere Software begonnen. Dabei habe ich auch gleich den 2. Eingang aktiviert. Problem: Die App Entwicklung hängt hinterher bzw kann mir die Optionen nicht anzeigen. Ich bin an einer Lösung dran…

Edit 01.09.2019:

Software ist nun im Testmodus. Stand 2.1.9 unterstützt nun BEIDE Sensoreingänge und zusätzlich gibt es Unterstützung für Feuchtigkeits-Sensoren.

Edit 15.09.2019:

Anleitung zum Einstellen:

  1. Hys auf kleinsten Wert stellen (nach links gedreht)
  2. Vdc auf kleinsten Wert stellen
  3. Bodenfeuchtesensor in den bewässerten Bereich installieren, aber nicht so, dass es direkt bewässert wird.
  4. Jetzt wird es schwierig: Man muss nun den richtigen Wert finden.
  5. Bewässern Sie den Bereich. Wenn nun der Bereich nass ist, drehen Sie an VDC, bis die LED angeht.
  6. Jetzt muss es erst mal wieder trocken werden. Wenn nun die LED immer noch an ist, dann drehen Sie ganz leicht an VDC bis die LED wieder ausgeht.
  7. Then water the area again. If the LED now lights up, then everything is set correctly. Otherwise repeat 5-7.

Unfortunately, I have to admit that the threshold switch is not the optimal solution because it has a range of 0-10V, while the soil moisture sensor has 0-3V. Truebner is already working on a solution here

The OpenSprinkler software is also not optimal for a soil moisture sensor. If the sensor gets wet during watering, the watering will be switched off. We recognized this and solved it with software version 2.1.9: There is an adjustable delay value here. The software for this will be released soon. If you want, I can send it to you now, but the APP doesn't show the new parameters, only the web interface (on the PC)

Sensor 2 also works with this version.

Oh yes, recently there was a discussion about how best to connect a sensor. Ray (from OpenSprinkler.com) said that the best thing would be to use SN1 open (dry) and GND-SN1 connected (wet) and NOT GND-SN1 (dry) and VIN-SN1 (wet) as shown in the wiring diagram. Here is the current circuit diagram

OpenSprinkler Humidity Sensor Switch Plan

8 thoughts on “Soil moisture sensor

  1. Joachim says:

    Am I correct – there are eight “zones” for irrigation (with expansion then even more), but I can connect a maximum of two moisture sensors? Find the error :)

    • Admin says:

      Correct, after all we have a weather service that sets the watering duration depending on temperature, humidity and amount of rain.
      Especially for large areas such as lawns or other open spaces, it makes no sense to measure just one point with a moisture sensor.

      • Joachim says:

        This may be the case with large open spaces. However, this is important in a greenhouse where plants with very different water requirements are in positions with different exposure to the sun.

      • Uwe says:

        Hi,
        ich habe mehrere Zonen um mein Haus, die sehr unterschieldich bewässert werden müssen.
        Gibt es eine möglichkeit mehr als 2 Feuchtigkeitssensoren einzusetzen und die Zonen einem Sensor zuzuweisen?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.