Using signal from a Soil Moisture Sensor

Discussion in 'The Projects Forum' started by Huckau, Jan 23, 2013.

  1. Huckau

    Thread Starter New Member

    Jan 23, 2013
    2
    0
    I don't know much bout electronics so I chose to use a "Gardena Soil Moisture Sensor" which is designed to be an add-on for the Gardena irrigation computers/controllers.

    Well I'm not going that route, I just want to connect it upto a electric valve to stop the flow of water to my plants.

    The sensor is powered by 2 1.5v C batteries, with my DC meter there is no voltage shown, but switching it to 20K OHM gets a reading.

    When the soil is wet = 0 OHM
    When the soil is dry = 9.97 OHM

    So what's the easiest way to apply power to a 12vDC electric valve when the soil is dry, in laymans terms so atleast I know what to google/research.

    Thanx, your help will be much appreciated.
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,155
    3,061
    Does the output from the sensor have only those two results, on or off?

    It's possible that sensor itself could switch enough current for your valve, but you'd need to find that sort of detail in the specifications. And you need to know how much current the valve requires. If the valve needs more current than the sensor can control, you can use the sensor output to control a MOSFET, which in turn will act as a switch for your valve.
     
  3. Huckau

    Thread Starter New Member

    Jan 23, 2013
    2
    0
    Yes its just on/off - I tested it again inside & once the tip/sensor dried out it gave a 10 ohm reading without having to change anything.

    Regarding the specifications - well I only have a instruction manual which has no technical details - as it is expected you plug it into the computer/controller & its completely plug & play.
    The computer/controllers range from battery powered, to solar powered & even mains powered so that doesn't give me any clues without actually purchasing one & testing its output.

    Any idea on a safe amount of power to put through it as a signal?
     
    Last edited: Jan 25, 2013
  4. wayneh

    Expert

    Sep 9, 2010
    12,155
    3,061
    Since you can't be sure it will survive switching the valve directly, I'd recommend using a MOSFET as a switch instead of the sensor. Choose an N-type MOSFET with a continuous current rating at least 4X or so more than your valve requires. A bit of a safety factor. I use the IRF540N as my generic, go-to MOSFET and I imagine it would be fine here. You really need to know what that valve requires, though.

    Connect the 12V DC supply to your valve, and let the MOSFET control the path to ground. "Drain" pin to the low side of the valve, "source" to ground, "gate" to the controller as described below.

    Establish the control signal by putting 12V thru a 1K resistor (exact value not critical, ±2X is fine), to the sensor, and the low side of the sensor to ground. Connect the junction of the 1K and the sensor to the MOSFET gate. When the sensor resistance is low, this pulls the gate voltage low and turns off the MOSFET, cutting current flow through the valve. When the sensor goes to high resistance, the gate voltage goes high and turns on the MOSFET, and your valve.

    This arrangement requires your sensor to control only the current passing through the 1K resistor, maybe 12mA at most. I assume it will be OK with that small current. Do you know if there is a voltage rating on the sensor? The output is probably just an open collector, ie. a transistor, that should have no problem with 12V. But there is some risk in not knowing what it is meant for.
     
Loading...