# How to power an LED when a circuit isn't complete

I'm an electronics beginner trying to carry out a project similar to this one: http://www.techwillsaveus.com/shop/diy-kits/diy-thirsty-plant-kit/.

I'm having a difficult time understanding how it is that the LED is powered when the circuit is not complete (the sensor detects no water) and then turns off when the circuit is complete (sensor detects water/wet soil). Also, would it be possible to create something such as what I just mentioned but in addition to the LED turning off when water is detected another one turns on?

• The circuit that isn't complete is the one that turns the LED off. Commented Feb 1, 2015 at 0:09

Basically the way these circuits work is by relying on the fact that soil conducts electricity, with a resistance of a few hundred kOhm. When it gets wet, the resistance changes allowing the moisture level to be detected by measuring the resistance of the soil.

The measurement is usually achieved using an amplifier circuit which produces a voltage depending on the resistance of the soil. This can be done using an Op-Amp circuit for example, or even just biasing a BJT with the soil probe such as in the example circuit below (Source of image and circuit description here) where S1/S2 are probes in the soil, and the voltage at S1 varies with moisture level.

The LED is almost certainly not in line with the sensor, but is rather turned on or off by the measured voltage. So basically if you want an LED to have the opposite indicator, you would just need a simple inverter circuit driving the second LED.

• Exchanging the placement of R2 and (D1,D2) should give an inverted output, right? Commented Feb 1, 2015 at 8:24

While Tom Carpenter's answer is correct, it's unnecessarily complicated. Consider the following circuit:

simulate this circuit – Schematic created using CircuitLab

When the contacts are in dry ground (switch is open), the LED draws 3 mA. When the contacts are in wet ground (switch is closed), the voltage is less than the 2 volts needed to turn on the LED, and it is off.

Now, it's true that this is an unrealistic situation. Dry soil does not have infinite resistance, and wet soil does not have zero resistance, but the two do have noticeably different resistances, and a circuit which can distinguish between the two can behave appropriately.

From the parts photo I guess it's something like this

the probe itself is probablly wires encased in a block of plaster of paris cast in the pill jar

I looked at the "manual" for that "thirsty Plant Kit" - it doesn't contain enough information to draw a reasonable schematic diagram, but does indicate that the circuit includes a MOSFET. Apparently when the soil is dry, the MOSFET will conduct to turn on the LED. Moist soil will produce a lower resistance between the sensor electrodes which will cause the MOSFET to stop conducting, turning off the LED.