Soil moisture sensor: principle of operation and DIY assembly. Corrosion-resistant soil moisture sensor suitable for home automation How a soil moisture sensor works
This simple homemade device is used for water or other liquid, in various rooms or containers. For example, these sensors are very often used to fix the possible flooding of the basement or cellar with melt water or in the kitchen under the sink, etc.
The role of the humidity sensor is performed by a piece of foil fiberglass with grooves cut in it, and as soon as water gets into them, the machine will disconnect the load from the network. Or if you use the rear contacts, the automatic relay will turn on the pump or or the device we need.
We make the sensor itself in the same way as in the previous scheme. If the liquid gets on the contacts of the F1 sensor, the audible alarm will start emitting a constant sound signal, and the HL1 LED will also light up.
With the SA1 toggle switch, you can change the order of HL1 indication to a continuous glow of the LED in standby mode.
This humidity sensor circuit can be used as a rain alarm, overflow of a liquid container, water leakage, etc. The circuit can be powered from any five volt DC power supply.
The source of the sound signal is a sound emitter with a built-in sound generator. We make a humidity sensor from a strip of foil textolite, which has a thin track in the foil. If the sensor is dry, then the audible signal does not signal. If the sensor gets wet, we will immediately hear an intermittent alarm.
The design is powered by a krona battery and it will last for two years, because during standby mode, the circuit consumes almost zero current. Another bonus of the circuit can be considered the fact that almost any number of sensors can be connected in parallel to the input and thus cover the entire controlled area at a time. The detector circuit is built on two transistors of the 2N2222 type, connected by the Darlington method.
List of radio componentsR1, R3 - 470K
SW1 - button
R2 - 15k
SW2 - switch
R4-22K
B1 - krone battery
C1 - 0.022 uF capacitor
T1, T2 - input terminals
PB1 - (RS273-059) piezo buzzer
Q1, Q2 - 2N2222 type transistors
When the first transistor turns on, it immediately turns on the second one, which turns on the piezo buzzer. In the absence of liquid, both transistors are securely locked and very low current is drawn from the battery. When the buzzer turns on, the current drawn increases to 5 mA. RS273-059 sound emitters have a built-in generator. If you need a more powerful alarm, connect several buzzers in parallel or take two batteries.
We make a printed circuit board with dimensions of 3 * 5 cm.
The test toggle switch connects a 470 kΩ resistance to the input, simulating the action of a liquid, thereby checking the circuit's performance. Transistors can be replaced with domestic ones, such as KT315 or KT3102.
The automatic humidity sensor is designed to turn on the forced ventilation of the room at high humidity, it can be installed in the kitchen, bathroom, cellar, basement, garage. Its purpose is to turn on the fans for forced ventilation of the room when the humidity in it approaches 95 ... 100%.
The device is highly economical, reliable, and the simplicity of the design makes it easy to modify its components for specific operating conditions. The diagram of the humidity sensor is shown in the figure below.
The scheme works as follows. When the humidity in the room is normal, the resistance of the dew sensor - gas resistor B1 does not exceed 3 kOhm, the transistor VT2 is open, the powerful high-voltage field effect transistor VT1 is closed, the primary winding of the transformer T1 is de-energized. The load connected to the XP1 connector will also be de-energized.
As soon as the humidity of the air approaches the dew point, for example, it boils left unattended, the bathroom is filled with hot water, the cellar is heated by melted, groundwater, the temperature controller of the water heater has failed, the resistance of the gas resistor B1 is sharply removed from the secondary winding T1 and enters the bridge diode rectifier VD2. The ripple of the rectified voltage is smoothed out by a high-capacity oxide capacitor C2. The parametric DC voltage regulator is built on a composite transistor VT3 with a high current transfer coefficient of the base type KT829B, a zener diode VD5 and a ballast resistor R6.
Capacitors C3, C4 reduce the output voltage ripple. Fans with an operating voltage of 12 ... 15V, for example, "computer" fans, can be connected to the output of the voltage stabilizer. Fans with a total power of up to 100 W, designed for a supply voltage of 220 V AC, can be connected to the XP1 socket. A bridge rectifier VD1 is installed in the power supply circuit of the step-down transformer T1 and the high-voltage load. A pulsating DC voltage is applied to the drain of the field-effect transistor. The cascade on transistors VT1, VT2 is powered by a stabilized voltage of +11 V, given by the zener diode VD7. The voltage to this zener diode is supplied through the chain R2, R3, VD4, HL2. Such a circuit solution allows you to open the field-effect transistor completely, which significantly reduces the power dissipated on it.
Transistors VT1, VT2 are included as a Schmitt trigger, which excludes the presence of a field effect transistor in an intermediate state, which prevents it from overheating. The sensitivity of the humidity sensor is set by the trimming resistor R8, and, if necessary, by selecting the resistance of the resistor R7. Varistors RU1 and RU2 protect the device elements from damage by mains voltage surges. The green LED HL2 indicates the presence of supply voltage, and the red LED HL1 indicates high humidity and the device is switched on in the forced ventilation mode.
Up to 8 low-voltage fans with current consumption up to 0.25 A each and or several fans with 220 V supply voltage can be connected to the device. voltage stabilizer, you can connect electromagnetic relays, for example, type G2R-14-130, the contacts of which are designed for switching alternating current up to 10 A at a voltage of 250 V. In parallel with resistor R8, you can install a thermistor with a negative TCR, resistance 3.3 ... 4, 7 kOhm at 25°C, placed, for example, above a gas or electric stove, which will allow you to turn on ventilation also when the air temperature rises above 45 ... 50 °C, when the stove burners operate at full power.
In place of the T1 transformer, you can install any step-down transformer with an overall power of at least 40 W, the secondary winding of which is designed for a current value of at least the low-voltage load current. Without rewinding the secondary winding "Youth", "Sapphire". Also suitable are unified transformers TPP40 or TN46-127 / 220-50. With self-manufacturing of the transformer, you can use a W-shaped magnetic circuit with a cross section of 8.6 cm2. The primary winding contains 1330 turns of wire with a diameter of 0.27 mm.
Secondary winding 110 turns of winding wire with a diameter of 0.9 mm. Instead of the KT829B transistor, any of the KT829, KT827, BDW93C, 2SD1889, 2SD1414 series is suitable. This transistor is installed on a heat sink, the size of which will depend on the load current and the magnitude of the collector-emitter voltage drop VT3. It is desirable to choose such a heat sink with which the temperature of the case of the transistor VT3 would not exceed 60 ° C.
If the voltage on the plates of capacitor C2 with a load connected to the output of the stabilizer is more than 20 V, then to reduce the power dissipated by VT3, several turns can be unwound from the secondary winding of the transformer. Field effect transistor IRF830 can be replaced with KP707V2, IRF422, IRF430, BUZ90A, BUZ216. When mounting this transistor, it must be protected from breakdown by static electricity. Instead of SS9014, you can use any of the KT315, KT342, KT3102, KT645, 2SC1815 series. When replacing bipolar transistors, take into account the differences in pinouts.
Diode bridges KBU can be replaced with similar KVR08, BR36, RS405, KBL06. Instead of 1N4006, you can use 1N4004 - 1N4007, KD243G, KD247V, KD105V. Zener diodes: 1N5352 - KS508B, KS515A, KS215Zh; 1N4737A - KS175A, KS175Zh, 2S483B; 1 N4741A - D814G, D814G1, 2S211Zh, KS221V.
LEDs can be of any general application, for example, AL307, KIPD40, L-63 series. Oxide capacitors - imported analogues of K50-35, K50-68. Varistors - any low or medium power for a classification operating voltage of 430 V, 470 V, for example, FNR-14K431, FNR-10K471. The gas resistor GZR-2B, sensitive to air humidity, was taken from an old domestic video recorder "Electronics VM-12". A similar gas resistor can be found in other faulty domestic and imported video recorders or in old cassette video cameras. This gas resistor is usually bolted to the metal chassis of the tape drive. Its purpose is to block the operation of the device when the tape drive mechanism is fogged up, which prevents winding and damage to the magnetic tape. The device can be mounted on a 105x60 mm printed circuit board. It is preferable to place the gas resistor in a separate box made of insulating material with holes, installed in a cooler place. It is also recommended to screw it to a small metal plate, perhaps through a thin mica insulating gasket. To protect the mounted board from moisture, the mounting and printed conductors are covered with several layers of varnish FL-98, ML-92 or zaponlak.
The gas resistor does not need to be painted over with anything. To test the device for operability, you can simply exhale air from the lungs onto the gas resistor or bring a container of boiling water closer. After a few seconds, the HL1 LED will flash and the fans connected as loads will begin to deal with high humidity. In standby mode, the device consumes a current from the network of about 3 mA, which is very little. Since the device consumes less than 1 W of power in standby mode, it can be operated around the clock without fear of power consumption. Since the device is partially galvanically coupled to the mains voltage of 220 V AC, appropriate precautions must be observed when setting up and operating the device.
As a result of numerous experiments, this soil sensor circuit appeared on a single microcircuit. Any of the microcircuits is suitable: K176LE5, K561LE5 or CD4001A.
The air humidity sensor, the scheme and drawings of which are attached, makes it possible to fully automate the process of monitoring and controlling the relative humidity in any room. This humidity sensor circuit makes it possible to measure relative humidity in the range of 0–100%. With very high accuracy and parameter stability
Light and sound signaling device of boiling water. - Radio, 2004, No. 12, pp. 42, 43.
. - Circuitry, 2004, No. 4, pp. 30-31.
Constant" in the cellar. - CAM, 2005, No. 5, pp. 30, 31.
Connect the Arduino to the FC-28 Soil Moisture Sensor to determine when your soil under your plants needs water.
In this article, we are going to use the FC-28 Soil Moisture Sensor with Arduino. This sensor measures the volumetric water content of the soil and gives us the moisture level. The sensor gives us analog and digital data at the output. We are going to connect it in both modes.
How does the FC-28 soil sensor work?
The soil moisture sensor consists of two sensors that are used to measure the volumetric water content. The two probes allow the current to pass through the soil, which gives a resistance value, which finally measures the moisture value.
When there is water, the soil will conduct more electricity, which means there will be less resistance. Dry soil is a poor conductor of electricity, so when there is less water, the soil conducts less electricity, which means more resistance.
The FC-28 sensor can be connected in analog and digital modes. We will connect it first in analog mode and then in digital mode.
Specification
FC-28 Soil Moisture Sensor Specifications:
- input voltage: 3.3–5V
- output voltage: 0–4.2V
- input current: 35mA
- output signal: analog and digital
Pinout
Soil moisture sensor FC-28 has four pins:
- VCC: Power
- A0: analog output
- D0: digital output
- GND: ground
The module also contains a potentiometer that will set the threshold value. This threshold value will be compared on the LM393 comparator. The LED will signal us the value above or below the threshold.
Analog mode
To connect the sensor in analog mode, we need to use the analog output of the sensor. Soil moisture sensor FC-28 accepts analog output values from 0 to 1023.
Humidity is measured as a percentage, so we will compare these values from 0 to 100 and then display them on the serial monitor. You can set different moisture values and turn the water pump on/off according to these values.
Wiring diagram
Connect the soil moisture sensor FC-28 to the Arduino as follows:
- VCC FC-28 → 5V Arduino
- GND FC-28 → GND Arduino
- A0 FC-28 → A0 Arduino
Code for analog output
For the analog output, we write the following code:
int sensor_pin = A0; int output_value ; void setup() ( Serial.begin(9600); Serial.println("Reading From the Sensor ..."); delay(2000); ) void loop() ( output_value= analogRead(sensor_pin); output_value = map(output_value ,550,0,0,100); Serial.print("Mositure: "); Serial.print(output_value); Serial.println("%"); delay(1000); )
Code Explanation
First of all, we defined two variables, one for the contact of the soil moisture sensor and the other for storing the output of the sensor.
int sensor_pin = A0; int output_value ;
In the setup function, the command Serial.begin(9600) will help in communication between Arduino and serial monitor. After that, we will print “Reading From the Sensor ...” on the normal display.
Void setup() ( Serial.begin(9600); Serial.println("Reading From the Sensor ..."); delay(2000); )
In the loop function, we will read the value from the analog output of the sensor and store the value in a variable output_value. Then we will compare the output values from 0-100 because humidity is measured in percentage. When we took readings from dry soil, the sensor value was 550, and in wet soil, the sensor value was 10. We compared these values to get the moisture value. After that, we printed these values on the serial monitor.
Void loop() ( output_value= analogRead(sensor_pin); output_value = map(output_value,550,10,0,100); Serial.print("Mositure: "); Serial.print(output_value); Serial.println("%") ;delay(1000); )
Digital mode
To connect the FC-28 soil moisture sensor in digital mode, we will connect the sensor's digital output to an Arduino digital pin.
The sensor module contains a potentiometer which is used to set the threshold value. The threshold value is then compared with the sensor output value using the LM393 comparator, which is placed on the FC-28 sensor module. The LM393 comparator compares the output value of the sensor and the threshold value, and then gives us the output value through a digital output.
When the sensor value is greater than the threshold value, the digital output will give us 5V and the sensor LED will light up. Otherwise, when the sensor value is less than this threshold value, 0V will be transmitted to the digital output and the LED will not light up.
Wiring diagram
The connections for the soil moisture sensor FC-28 and Arduino in digital mode are as follows:
- VCC FC-28 → 5V Arduino
- GND FC-28 → GND Arduino
- D0 FC-28 → Pin 12 Arduino
- LED positive → Pin 13 Arduino
- LED minus → GND Arduino
Code for digital mode
The code for digital mode is below:
intled_pin=13; int sensor_pin=8; void setup() ( pinMode(led_pin, OUTPUT); pinMode(sensor_pin, INPUT); ) void loop() ( if(digitalRead(sensor_pin) == HIGH)( digitalWrite(led_pin, HIGH); ) else ( digitalWrite(led_pin, LOW); delay(1000); ) )
Code Explanation
First of all, we initialized 2 variables to connect the LED output and the digital output of the sensor.
int led_pin = 13; int sensor_pin = 8;
In the setup function, we declare the LED pin as an output pin, because we will turn on the LED through it. We declared the sensor pin as an input pin, because the Arduino will receive values from the sensor through this pin.
Void setup() ( pinMode(led_pin, OUTPUT); pinMode(sensor_pin, INPUT); )
In the loop function, we read from the output of the sensor. If the value is higher than the threshold value, then the LED will turn on. If the sensor value is below the threshold value, the indicator will turn off.
Void loop() ( if(digitalRead(sensor_pin) == HIGH)( digitalWrite(led_pin, HIGH); ) else ( digitalWrite(led_pin, LOW); delay(1000); ) )
This concludes the introductory lesson on working with the FC-28 sensor for Arduino. Good luck with your projects.
Not all owners of gardens and orchards have the opportunity to take care of their plantings every day. Nevertheless, without timely watering, one cannot count on a good harvest.
The solution to the problem will be an automatic system that allows you to ensure that the soil in your area maintains the required degree of moisture throughout your absence. The main component of any automatic watering is the soil moisture sensor.
The concept of a humidity sensor
The humidity sensor also has other names. It is called a moisture meter or humidity sensor.
As can be seen in the photo of soil moisture sensors, such a device is a device consisting of two wires connected to a weak source of electricity.
With an increase in humidity between the electrodes, the current strength and resistance decrease, and vice versa, if there is not enough water in the soil, these indicators increase. The device turns on with a simple push of a button.
Keep in mind that the electrodes will be in moist soil. Therefore, it is recommended to turn on the device through the key. This technique will reduce the negative effects of corrosion.
Why is this device needed?
Moisture meters are installed not only on open ground, but also in greenhouses. Controlling watering times is what soil moisture sensors are used for. You do not need to do anything, just turn on the device. After that, it will work without your participation.
However, gardeners and gardeners should monitor the condition of the electrodes, as they can undergo corrosive destruction and fail as a result.
Types of soil moisture sensors
Consider what soil moisture sensors are. They are usually divided into:
Capacitive. Their design is similar to an air condenser. The work is based on a change in the dielectric properties of air depending on its humidity, which causes an increase or decrease in capacity.
Resistive. The principle of their operation is to change the resistance of a hygroscopic material, depending on how much moisture it contains.
Psychometric. The principle of operation and the scheme of the device of such sensors will be more complicated. It is based on the physical property of heat loss during evaporation. The instrument consists of a dry and a wet detector. The temperature difference between them is used to judge the amount of water vapor in the air.
Aspiration. This type is in many ways similar to the previous one, the difference is the fan, which serves to pump the air mixture. Aspiration devices for determining humidity are used in places with weak or intermittent air movement.
Which humidity sensor to choose depends on each specific case. The choice of device is also influenced by the features of the automatic irrigation system you have installed and your financial capabilities.
Materials needed to create a sensor with your own hands
If you decide to start making a moisture meter yourself, then you need to prepare:
- electrodes with a diameter of 3-4 mm - 2 pcs.;
- textolite base;
- nuts and washers.
Manufacturing instructions
How to make a soil moisture sensor with your own hands? Here is a brief tutorial:
- Step 1. Attach the electrodes to the base.
- Step 2. We cut the threads at the ends of the electrodes and sharpen them on the reverse side for easier immersion in the soil.
- Step.3. We make holes in the base and screw the electrodes into them. We use nuts and washers as fasteners.
- Step 4. We select the necessary wires that fit the washers.
- Step 5. Isolate the electrodes. We deepen them into the ground by 5 - 10 cm.
Note!
The sensor requires: a current of 35 mA and a voltage of 5 V. At the end, we connect the device using three wires, which we connect to the microprocessor.
The controller allows you to combine a sensor with a buzzer. After that, a signal is given if the amount of moisture in the soil decreases sharply. An alternative to a sound signal can be a light bulb.
The soil moisture sensor is, without a doubt, a necessary thing in the household. If you have a cottage or garden, then by all means take care of acquiring it. Moreover, the device is not at all necessary to buy, since you can easily do it yourself.
Photo of soil moisture sensors
Note!
Note!
Many gardeners and gardeners are deprived of the opportunity to take care of planted vegetables, berries, fruit trees on a daily basis due to workload or during vacation. However, the plants need regular watering. With the help of simple automated systems, you can ensure that the soil on your site will maintain the necessary and stable moisture throughout your absence. To build a garden irrigation system, you will need the main control element - a soil moisture sensor.
Humidity sensor
Humidity sensors are also sometimes referred to as moisture meters or humidity sensors. Almost all soil moisture meters on the market measure moisture in a resistive way. This is not a completely accurate method because it does not take into account the electrolytic properties of the measured object. The readings of the device can be different with the same soil moisture, but with different acidity or salt content. But experimental gardeners are not so interested in the absolute readings of the instruments as relative ones, which can be adjusted for the water supply actuator under certain conditions.
The essence of the resistive method is that the device measures the resistance between two conductors placed in the ground at a distance of 2-3 cm from each other. This is the usual ohmmeter, which is included in any digital or analog tester. Previously, these tools were called avometers.
There are also devices with a built-in or remote indicator for operational control over the state of the soil.
It is easy to measure the difference in electrical conductivity before watering and after watering using the example of a pot with an aloe houseplant. Reading before watering 101.0 kOhm.
Reading after watering after 5 minutes 12.65 kOhm.
But an ordinary tester will only show the resistance of the soil area between the electrodes, but will not be able to help in automatic watering.
The principle of operation of automation
In automatic watering systems, the rule “water or don’t water” usually applies. As a rule, no one needs to regulate the force of water pressure. This is due to the use of expensive controlled valves and other unnecessary, technologically complex devices.
Almost all humidity sensors on the market, in addition to two electrodes, have in their design comparator. This is the simplest analog-to-digital device that converts the incoming signal into digital form. That is, at a set humidity level, you will get one or zero (0 or 5 volts) at its output. This signal will become the source for the subsequent actuator.
For automatic watering, the most rational would be to use an electromagnetic valve as an actuator. It is included in pipe breaks and can also be used in micro-drip irrigation systems. Turns on by applying 12 V.
For simple systems operating on the principle of "the sensor worked - the water went", it is enough to use a comparator LM393. The microcircuit is a dual operational amplifier with the ability to receive a command signal at the output with an adjustable input level. The chip has an additional analog output that can be connected to a programmable controller or tester. Approximate Soviet equivalent of a dual comparator LM393- microchip 521CA3.
The figure shows a finished humidity switch together with a Chinese-made sensor for only $ 1.
Below is a reinforced version, with an output current of 10A at an alternating voltage of up to 250 V, for $ 3-4.
Irrigation automation systems
If you are interested in a full-fledged automatic irrigation system, then you need to think about purchasing a programmable controller. If the area is small, then it is enough to install 3-4 humidity sensors for different types of irrigation. For example, a garden needs less watering, raspberries love moisture, and melons need enough water from the soil, except during extremely dry periods.
Based on our own observations and measurements of humidity sensors, we can approximately calculate the efficiency and effectiveness of water supply in the areas. Processors allow you to make seasonal adjustments, can use the readings of humidity meters, take into account precipitation, seasons.
Some soil moisture sensors are equipped with an interface RJ-45 to connect to the network. The processor firmware allows you to configure the system so that it will notify you of the need for watering through social networks or SMS. This is useful in cases where it is not possible to connect an automated watering system, for example, for indoor plants.
For irrigation automation system, it is convenient to use controllers with analog and contact inputs that connect all sensors and transmit their readings via a single bus to a computer, tablet or mobile phone. The executive devices are controlled via the WEB-interface. The most common universal controllers are:
- MegaD-328;
- Arduino;
- hunter;
- toro;
- Amtega.
These are flexible devices that allow you to fine-tune the automatic watering system and entrust it with complete control over the garden.
A simple irrigation automation scheme
The simplest irrigation automation system consists of a moisture sensor and a control device. You can make a soil moisture sensor with your own hands. You will need two nails, a 10 kΩ resistor and a power supply with an output voltage of 5 V. Suitable from a mobile phone.
As a device that will issue a command for watering, you can use a microcircuit LM393. You can purchase a ready-made node or assemble it yourself, then you will need:
- resistors 10 kOhm - 2 pcs;
- resistors 1 kOhm - 2 pcs;
- resistors 2 kOhm - 3 pcs;
- variable resistor 51-100 kOhm - 1 pc;
- LEDs - 2 pcs;
- any diode, not powerful - 1 pc;
- transistor, any medium power PNP (for example, KT3107G) - 1 pc;
- capacitors 0.1 microns - 2 pcs;
- chip LM393- 1 PC;
- relay with a threshold of 4 V;
- circuit board.
The assembly diagram is shown below.
After assembly, connect the module to the power supply and soil moisture level sensor. to the output of the comparator LM393 connect tester. Set the trip threshold using the trim resistor. Over time, it will need to be corrected, perhaps more than once.
Schematic diagram and pinout of the comparator LM393 presented below.
The simplest automation is ready. It is enough to connect an actuator to the closing terminals, for example, an electromagnetic valve that turns the water supply on and off.
Irrigation automation actuators
The main actuating device for irrigation automation is an electronic valve with and without water flow control. The latter are cheaper, easier to maintain and manage.
There are many controlled cranes and other manufacturers.
If your site is experiencing problems with water supply, purchase solenoid valves with a flow sensor. This will prevent the solenoid from burning out if the water pressure drops or the water supply fails.
Disadvantages of automatic irrigation systems
The soil is heterogeneous and differs in its composition, so one moisture sensor can show different data in neighboring areas. In addition, some areas are shaded by trees and are wetter than those in sunny locations. Also, the proximity of groundwater, their level in relation to the horizon, has a significant impact.
When using an automated irrigation system, the landscape of the area should be taken into account. The site can be divided into sectors. In each sector, install one or more humidity sensors and calculate their own operation algorithm for each. This will greatly complicate the system and it is unlikely that it will be possible to do without a controller, but subsequently it will almost completely save you from wasting time on ridiculous standing with a hose in your hands under the hot sun. The soil will be filled with moisture without your participation.
Building an effective automated irrigation system cannot be based only on the readings of soil moisture sensors. It is imperative to additionally use temperature and light sensors, take into account the physiological need for water of plants of different species. Seasonal changes must also be taken into account. Many companies producing irrigation automation systems offer flexible software for different regions, areas and crops.
Don't be fooled by silly marketing slogans when purchasing a system with a humidity sensor: our electrodes are gold plated. Even if this is so, then you will only enrich the soil with noble metal in the process of electrolysis of the plates and wallets of not very honest businessmen.
Conclusion
This article talked about soil moisture sensors, which are the main control element of automatic watering. And also the principle of operation of the irrigation automation system was considered, which can be purchased ready-made or assembled by yourself. The simplest system consists of a humidity sensor and a control device, the do-it-yourself assembly diagram of which was also presented in this article.
Homemade, stable soil moisture sensor for automatic irrigation system
This article arose in connection with the construction of an automatic watering machine for the care of indoor plants. I think that the watering machine itself may be of interest to a do-it-yourselfer, but now we will talk about a soil moisture sensor. https://website/
The most interesting videos on Youtube
Prologue.
Of course, before reinventing the wheel, I went over the Internet.
Industrial-made humidity sensors turned out to be too expensive, and I have not been able to find a detailed description of at least one such sensor. The fashion for trading "pig in bags", which came to us from the West, seems to have already become the norm.
Although there are descriptions of home-made amateur sensors on the network, they all work on the principle of measuring soil resistance to direct current. And the very first experiments showed the complete failure of such developments.
Actually, this did not really surprise me, since I still remember how, as a child, I tried to measure the resistance of the soil and discovered in it ... an electric current. That is, the arrow of the microammeter recorded the current flowing between two electrodes stuck into the ground.
The experiments, which took a whole week, showed that soil resistance can change quite quickly, and it can periodically increase and then decrease, and the period of these fluctuations can be from several hours to tens of seconds. In addition, in different flower pots, soil resistance varies in different ways. As it turned out later, the wife selects an individual composition of the soil for each plant.
At first, I completely abandoned the measurement of soil resistance and even began to build an induction sensor, as I found an industrial humidity sensor on the network, about which it was written that it was induction. I was going to compare the frequency of the reference oscillator with the frequency of another oscillator, the coil of which is dressed on a plant pot. But, when I started to prototype the device, I suddenly remembered how I once got under the “step voltage”. This prompted me to another experiment.
Indeed, in all home-made structures found on the network, it was proposed to measure the resistance of the soil to direct current. But what if you try to measure the resistance to alternating current? Indeed, in theory, then the flowerpot should not turn into a "battery".
I assembled the simplest scheme and immediately tested it on different soils. The result was reassuring. No suspicious encroachments in the direction of increasing or decreasing resistance were found even for several days. Subsequently, this assumption was confirmed on an operating watering machine, the operation of which was based on a similar principle.
The electrical circuit of the soil moisture threshold sensor.
As a result of research, this circuit appeared on a single microcircuit. Any of the listed microcircuits will do: K176LE5, K561LE5 or CD4001A. We sell these microcircuits for only 6 cents.
The soil moisture sensor is a threshold device that responds to changes in AC resistance (short pulses).
On the elements DD1.1 and DD1.2, a master oscillator is assembled that generates pulses with an interval of about 10 seconds. https://website/
Capacitors C2 and C4 are separating. They do not let the direct current generated by the soil into the measuring circuit.
Resistor R3 sets the threshold, and resistor R8 provides the hysteresis of the amplifier. Trimmer resistor R5 sets the initial offset at the input DD1.3.
Capacitor C3 is anti-interference, and resistor R4 determines the maximum input resistance of the measuring circuit. Both of these elements reduce the sensitivity of the sensor, but their absence can lead to false positives.
You should also not choose the supply voltage of the microcircuit below 12 Volts, as this reduces the actual sensitivity of the device due to a decrease in the signal-to-noise ratio.
Attention!
I don't know if prolonged exposure to electrical pulses can be detrimental to plants. This scheme was used only at the stage of development of the watering machine.
In order to water the plants, I used a different scheme, which generates only one short measuring pulse per day, timed to coincide with the time of watering the plants.