Soil moisture sensor
You can often find devices on sale that are installed on a flower pot and monitor the level of soil moisture, turning on the pump if necessary and watering the plant. Thanks to this device, you can safely go on vacation for a week without fear that your favorite ficus will wither. However, the price of such devices is unreasonably high, because their design is extremely simple. So why buy if you can make it yourself?
Scheme
I propose for assembly a circuit diagram of a simple and proven soil moisture sensor, the diagram of which is shown below:Two metal rods are lowered into the bud of the pot, which can be done, for example, by bending a paper clip. They need to be stuck into the ground at a distance of about 2-3 centimeters from each other. When the soil is dry, it does not conduct electricity well; the resistance between the rods is very high. When the soil is wet, its electrical conductivity increases significantly and the resistance between the rods decreases; it is this phenomenon that underlies the operation of the circuit.
A 10 kOhm resistor and a section of soil between the rods form a voltage divider, the output of which is connected to the inverting input of the operational amplifier. Those.the voltage on it depends only on how moist the soil is. If you place the sensor in moist soil, the voltage at the op-amp input will be approximately 2-3 volts. As the soil dries out, this voltage will increase and reach a value of 9-10 volts when the soil is completely dry (specific voltage values depend on the type of soil). The voltage at the non-inverting input of the op-amp is set manually with a variable resistor (10 kOhm in the diagram, its value can be changed within 10-100 kOhm) in the range from 0 to 12 volts. Using this variable resistor, the sensor response threshold is set. The operational amplifier in this circuit works as a comparator, i.e. it compares the voltages at the inverting and non-inverting inputs. As soon as the voltage from the inverting input exceeds the voltage from the non-inverting input, a minus power supply will appear at the op-amp output and light up Light-emitting diode and the transistor will open. The transistor in turn activates a relay that controls the water pump or electric valve. Water will begin to flow into the pot, the soil will become moist again, its electrical conductivity will increase, and the circuit will turn off the water supply.
The printed circuit board proposed for this article is designed to use a dual operational amplifier, for example, TL072, RC4558, NE5532 or other analogues, one half of it is not used. The transistor in the circuit is used with low or medium power and PNP structure; for example, KT814 can be used. Its task is to turn the relay on and off; you can also use a field-effect transistor switch instead of a relay, as I did. The supply voltage of the circuit is 12 volts.
Download the board:
Soil Moisture Sensor Assembly
It may happen that when the soil dries out, the relay does not turn on clearly, but first begins to click quickly, and only after that it is set in the open state. This suggests that the wires from the board to the plant pot are picking up network noise, which has a detrimental effect on the operation of the circuit. In this case, it would not hurt to replace the wires with shielded ones and place an electrolytic capacitor with a capacity of 4.7 - 10 μF parallel to the soil area, in addition to the 100 nF capacity indicated in the diagram.
I really liked the work of the scheme, I recommend repeating it. Photo of the device I assembled: