Here it is illustrated how one can build a soil moisture detector that can be used to monitor whether a plant needs watering or not. The soil moisture detector is build with with just two transistors, a buzzer, a resistor and 3V battery. It is simple yet very effective to monitor plant soil moisture content. When the moisture content is low then the buzzer will sound indicating that the plant needs watering. One can use ready made soil moisture sensor module like YL-69(HL-69) but here it is shown how actually it is easy to make one on your own with just couple of components.
The following circuit diagram with animation explains how the soil moisture detector works.
Here two BC547 transistors are employed in darlington pair configuration and the buzzer is connected to the collector of the second transistor. One wire of the detector is connected to the +3V power supply and is other side is dipped into the soil. Another wire is used whose one end is dipped into the soil and the other side is connected to a 1KOhm resistor which is then connected to the base of the first transistor. The emitter of first transistor is connected to the base of the second transistor. The collector of both transistors are tied together. The emitter of the second transistor is connected to negative terminal of the 3V battery.Now when there is no water or moisture in the soil the two wire dipped terminal is open circuit and the base of the transistor does not receive any current hence voltage and so is turned off. Therefore the second transistor is also off. When water is put into the soil, the space between the two wire terminal gets filled with water or moist soil and provides a conducting medium between the two wire terminals. Due to this, the current from the 3V battery starts flowing into the base of the first transistor and turns it ON. When the transistor turns ON, current starts flowing from the 3V through the Buzzer and the Buzzer starts to sound. Hence when the soil has enough moisture the buzzer will starts to sound.
The following video demonstrates how the DIY soil moisture detector works.
This soil moisture detector works same as water overflow detector and continuity tester.