House, design, renovation, decor.  Courtyard and garden.  With your own hands

House, design, renovation, decor. Courtyard and garden. With your own hands

» Corrosion-resistant soil moisture sensor, suitable for summer cottages. Homemade, stable soil moisture sensor for automatic irrigation system Applications of the moisture sensor

Corrosion-resistant soil moisture sensor, suitable for summer cottages. Homemade, stable soil moisture sensor for automatic irrigation system Applications of the moisture sensor

Not all owners of gardens and vegetable gardens have the opportunity to take care of their plantings every day. Nevertheless, without timely watering, you 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 irrigation is a soil moisture sensor.

Humidity sensor concept

The moisture sensor also has other names. It is called a moisture meter or moisture sensor.


As you can see 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.

It should be borne in mind that the electrodes will be in moist soil. Therefore, it is recommended to turn on the device through a key. This 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 don't need to do anything, just turn on the device. Then it will work without your participation.

However, gardeners and gardeners should monitor the condition of the electrodes, as they can corrode and fail as a result.

Types of soil moisture sensors

Consider what kind of soil moisture sensors are. They are usually divided into:

Capacitive. Their design is similar to 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. Their principle of operation is to change the resistance of a hygroscopic material, depending on how much moisture it contains.

Psychometric. The principle of operation and the design of such sensors will be more complicated. It is based on physical property heat loss during evaporation. The device consists of a dry and a wet detector. By the temperature difference between them, the amount of water vapor in the air is judged.

Aspiration. This view 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 the device is also influenced by the features of the automatic irrigation system installed in you and your financial capabilities.


Materials required 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 instruction

How to make a soil moisture sensor with your own hands? Here's a quick tutorial:

  • Step 1. Attach the electrodes to the base.
  • Step 2. Cut a thread at the ends of the electrodes and sharpen it with back side for easier immersion in the soil.
  • Step 3. We make holes in the base and screw electrodes into them. We use nuts and washers as fasteners.
  • Step 4. We select the necessary wires that fit the washers.
  • Step 5. We insulate 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 the sound signal is that the light bulb comes on.

Soil moisture sensor, no doubt, is a necessary thing on the farm. If you have a summer cottage or a vegetable garden, then by all means take care of purchasing it. Moreover, it is not at all necessary to buy the device, since you can easily make it yourself.

Photo of soil moisture sensors

Note!

Note!

The poet Andrei Voznesensky once said: "laziness is the engine of progress." Perhaps, it is difficult to disagree with this phrase, because most electronic devices are created precisely for the purpose of making our everyday life easier with you, full of worries and all sorts of vain affairs.

If you are reading this article now, then you are probably very tired of the process of watering flowers. After all, flowers are delicate creatures, if you pour them over, you are unhappy, you forget to water for a day, that's it, they are about to fade. And how many flowers in the world died just from the fact that their owners went on vacation for a week, leaving the poor green fellows to wither in a dry pot! Scary to imagine.

It is to prevent such terrible situations that automatic irrigation systems are invented. A sensor is installed on the pot that measures the moisture content of the soil - it is for stainless steel metal bars, stuck into the ground at a distance of a centimeter from each other.

They are connected via wires to a circuit whose task is to open the relay only when the humidity drops below the set one and close the relay at the moment when the soil is again saturated with moisture. The relay, in turn, controls a pump that pumps water from the reservoir directly under the root of the plant.

Sensor circuit

As you know, the electrical conductivity of dry and wet soil differs quite significantly, it is this fact that underlies the operation of the sensor. A resistor with a nominal value of 10 kOhm and a section of soil between the bars form a voltage divider, their midpoint is connected directly to the input of the op-amp. The voltage is supplied to the other input of the op-amp from the midpoint of the variable resistor, i.e. it can be adjusted from zero to supply voltage. With its help, the switching threshold of the comparator is set, in the role of which the op-amp works. As soon as the voltage at one of its inputs exceeds the voltage at the other, the output will be a logical "1", the LED will light up, the transistor will open and turn on the relay. Any transistor can be used, PNP structure, suitable for current and voltage, for example, KT3107 or KT814. Operational amplifier TL072 or any similar, for example, RC4558. A low-power diode should be installed in parallel with the relay winding, for example, 1n4148. The supply voltage of the circuit is 12 volts.

Due to the long wires from the pot to the board itself, a situation may arise that the relay does not switch clearly, but begins to click with the frequency of the alternating current in the network, and only after a while it is set in the open position. To eliminate this bad phenomenon, an electrolytic capacitor with a capacity of 10-100 μF should be installed in parallel with the sensor. Archive with the board. Happy build! Author - Dmitry S.

Discuss the article SCHEME OF SOIL MOISTURE SENSOR

It will save you from monotonous repetitive work, and the soil moisture sensor will help to avoid excess water - it is not so difficult to assemble such a device with your own hands. The laws of physics come to the rescue of the gardener: moisture in the soil becomes a conductor of electrical impulses, and the more there is, the lower the resistance. As the humidity decreases, the resistance increases, and this helps to track optimal time glaze.

The design of the soil moisture sensor consists of two conductors that are connected to a weak source of energy; a resistor must be present in the circuit. As soon as the amount of moisture in the space between the electrodes increases, the resistance decreases and the current increases.

Moisture dries up - resistance increases, current decreases.

Since the electrodes will be in a humid environment, it is recommended to switch them on through a wrench to reduce the damaging effects of corrosion. During normal times, the system is off and only starts up to check the humidity at the push of a button.

Soil moisture sensors of this type can be installed in greenhouses - they provide control over automatic irrigation, so the system can function without human intervention at all. In this case, the system will constantly be in working order, but the condition of the electrodes will have to be monitored so that they do not become unusable under the influence of corrosion. Similar devices can be installed on outdoor beds and lawns - they will instantly get the information you need.

In this case, the system turns out to be much more accurate than a simple tactile sensation. If a person considers the ground to be completely dry, the sensor will show up to 100 units of soil moisture (when evaluated in a decimal system), immediately after watering this value rises to 600-700 units.

After that, the sensor will allow you to monitor the change in moisture content in the soil.

If the sensor is supposed to be used outdoors, it is advisable to carefully seal its upper part in order to prevent information distortion. To do this, it can be coated with a waterproof epoxy resin.

The sensor is assembled as follows:

  • The main part - two electrodes, the diameter of which is 3-4 mm, they are attached to the base made of PCB or other material protected from corrosion.
  • At one end of the electrodes, you need to cut a thread, on the other hand, they are made sharpened for more convenient immersion in the ground.
  • In the PCB plate, holes are drilled into which the electrodes are screwed; they must be secured with nuts and washers.
  • Outgoing wires must be put under the washers, after which the electrodes are insulated. The length of the electrodes, which will be immersed in the ground, is about 4-10 cm, depending on the container used or the open bed.
  • The sensor requires a 35 mA current source, the system requires a 5V voltage. Depending on the amount of moisture in the soil, the return signal range will be 0-4.2 V. The resistance loss will indicate the amount of water in the soil.
  • The connection of the soil moisture sensor is carried out through 3 wires to the microprocessor, for this purpose, you can purchase, for example, an Arduino. The controller will allow you to connect the system with a buzzer to give a sound signal when the soil moisture is too low, or to an LED, the brightness of the lighting will change when the sensor changes.

Such homemade device can become a part of automatic irrigation in the "Smart Home" system, for example, using the Ethernet controller MegD-328. The web interface shows the moisture level in a 10-bit system: the range from 0 to 300 indicates that the ground is completely dry, 300-700 - there is enough moisture in the soil, more than 700 - the ground is wet and no watering is required.

The design, consisting of a controller, a relay and a battery, can be removed into any suitable housing, for which any plastic box can be adapted.

At home, using such a humidity sensor will be very simple and reliable at the same time.

The application of the soil moisture sensor can be very diverse. They are most often used in automatic watering systems and manual watering of plants:

  1. They can be installed in flower pots if the plants are sensitive to the water level in the soil. If we are talking about succulents, for example, about cacti, it is necessary to pick up long electrodes that will react to changes in moisture levels directly at the roots. They can also be used on other fragile plants. Connecting to an LED will allow you to pinpoint when it's time to conduct.
  2. They are indispensable for organizing watering of plants. By a similar principle, air humidity sensors are also assembled, which are needed to start up the plant spraying system. All this will automatically ensure watering of plants and a normal level of atmospheric humidity.
  3. At the dacha, the use of sensors will allow you not to keep in mind the time of watering each garden bed, the electrical engineering itself will tell you about the amount of water in the soil. This will help prevent over-watering if it has been raining recently.
  4. The use of sensors is very convenient in some other cases as well. For example, they will allow you to control soil moisture in the basement and under the house near the foundation. In the apartment, it can be installed under the sink: if the pipe starts to drip, the automation will immediately report this, and it will be possible to avoid flooding of neighbors and subsequent repairs.
  5. A simple sensor device will allow you to fully equip all problem areas of the house and garden with a warning system in just a few days. If the electrodes are long enough, they can be used to control the water level, for example, in an artificial small reservoir.

Self-fabrication of the sensor will help equip the house automatic system control at minimal cost.

Factory-made components are easy to purchase online or in a specialized store, most devices can be assembled from materials that are always found in the home of an electrician.

More information can be found in the video.

I have written a lot of reviews about summer cottages, and since we are talking about summer cottages, automatic watering is one of the priority areas of automation. At the same time, you always want to take into account precipitation so as not to drive the pumps in vain and not flood the beds. Quite a few copies have been broken on the way to getting soil moisture data seamlessly. In the review, there is another option that is resistant to external influences.


A pair of sensors arrived in 20 days in individual anti-static bags:




Characteristics on the seller's website :):
Brand: ZHIPU
Type: Vibration Sensor
Material: Blend
Output: Switching sensor

Unpacking:


The wire has a length of about 1 meter:


In addition to the sensor itself, the kit includes a control scarf:




The length of the sensor sensors is about 4 cm:


The sensor tips look like graphite - they get dirty in black.
We solder the contacts to the scarf and try to connect the sensor:




The most common soil moisture sensor in Chinese stores is:


Many people know that after a short time it is eaten by the external environment. The effect of the influence of corrosion can be slightly reduced by applying power immediately before the measurement and turning it off when there is no measurement. But this does not change much, this is how mine looked after a couple of months of use:




Someone is trying to use thick copper wire or stainless steel rods, an alternative designed specifically for an aggressive environment acts as a subject of review.

Let's put the board from the kit aside and take care of the sensor itself. The sensor is a resistive type, it changes its resistance depending on the humidity of the environment. It is logical that without a humid environment, the resistance of the sensor is huge:


We lower the sensor into a glass of water and see that its resistance will be about 160 kOhm:


If you take it out, then everything will return to its original state:


Let's move on to testing on the ground. In dry soil, we see the following:


Let's add some water:


More (about a liter):


Almost completely poured one and a half liters:


I added another liter and waited 5 minutes:

The board has 4 pins:
1 + power supply
2 land
3 digital output
4 analog output
After dialing, it turned out that the analog output and ground are directly connected to the sensor, so if you plan to use this sensor by connecting to the analog input, the board does not make much sense. If you do not want to use the controller, then you can use the digital output, the response threshold is adjusted with a potentiometer on the board. Seller's recommended wiring diagram when using digital output:


When using digital input:


Let's put together a small layout:


I used the Arduino Nano here as a power source without loading the program. The digital output is connected to the LED. It's funny that the red and green LEDs on the board are on at any position of the potentiometer and the humidity of the sensor environment, the only thing when the threshold is triggered, the green shines a little weaker:


Having set the threshold, we get that when the specified humidity at the digital output is 0, with a lack of humidity, the supply voltage:




Well, since we have a controller in our hands, we will write a program to test the operation of the analog output. Connect the analog output of the sensor to pin A1, and the LED to pin D9 of the Arduino Nano.
const int analogInPin = A1; // sensor const int analogOutPin = 9; // Output to LED int sensorValue = 0; // read value from the sensor int outputValue = 0; // value sent to the PWM output with the LED void setup () (Serial.begin (9600);) void loop () (// read the sensor value sensorValue = analogRead (analogInPin); // translate the range of possible sensor values ​​(400-1023 - set experimentally) // to the PWM output range 0-255 outputValue = map (sensorValue, 400, 1023, 0, 255); // turn on the LED at a given brightness analogWrite (analogOutPin, outputValue); // print our numbers Serial.print ("sensor ="); Serial.print (sensorValue); Serial.print ("\ t output ="); Serial.println (outputValue); // delay delay (2);)
I commented all the code, the brightness of the LED is inversely proportional to the humidity detected by the sensor. If it is necessary to control something, then it is enough to compare the obtained value with an experimentally determined threshold and, for example, turn on the relay. The only thing I recommend is to process several values ​​and use the average to compare with the threshold, so random spikes or drops are possible.
We immerse the sensor and see:


Controller output:

If you take it out, then the output of the controller will change:

Video of this test build:

In general, I liked the sensor, it gives the impression of being resistant to the influence of the external environment, whether this is so - time will tell.
This sensor cannot be used as an accurate indicator of humidity (as well as all similar ones), its main application is to determine the threshold and analyze the dynamics.

If it is interesting, I will continue to write about my country crafts.
Thanks to everyone who read this review to the end, I hope someone will find this information useful. All full control over soil moisture and goodness!

I plan to buy +74 Add to favourites I liked the review +55 +99

Hello everyone, today in our article we will look at how to make a soil moisture sensor with our own hands. The reason self-made sensor wear (corrosion, oxidation), or simply the inability to purchase, a long wait and a desire to make something with your own hands can serve. In my case, the desire to make the sensor itself was wear, the fact is that the sensor probe, with a constant voltage supply, interacts with the soil and moisture, as a result of which it oxidizes. For example, SparkFun sensors cover it with a special compound (Electroless Nickel Immersion Gold) to increase the resource of work. Also, in order to extend the life of the sensor, it is better to supply power to the sensor only at the time of measurement.
One "fine" day, I noticed that my irrigation system moistens the soil unnecessarily, when checking the sensor, I removed the probe from the soil and this is what I saw:

Due to corrosion between the probes, additional resistance appears as a result of which the signal becomes less and the arduino considers the soil to be dry. Since I am using an analog signal, I will not do a circuit with a digital output on the comparator to simplify the circuit.

The diagram shows the comparator of the soil moisture sensor, the part that converts the analog signal to digital is marked in red. The unmarked part is the part we need to convert the moisture to an analog signal, and we will use it. Below I have given a diagram for connecting the probes to arduino.

The left side of the diagram shows how the probes are connected to the arduino, and I brought the right side (with resistor R2) in order to show how the ADC readings change. When the probes are lowered into the ground, resistance is formed between them (in the diagram I displayed it conditionally R2), if the soil is dry, then the resistance is infinitely large, and if it is wet, then it tends to 0. Since two resistances R1 and R2 form a voltage divider, and the midpoint is the output (out a0), then the voltage at the output depends on the value of the resistance R2. For example, if the resistance R2 = 10Kom, then the voltage will be 2.5V. You can solder the resistance on the wires so as not to make additional decoupling, for the stability of the readings, you can add a 0.01μF capacitor between - power supply and out. the connection diagram is as follows:

Since we have dealt with the electrical part, we can move on to the mechanical part. For the manufacture of probes, it is better to use the material that is least susceptible to corrosion in order to extend the life of the sensor. You can use "stainless steel" or galvanized metal, you can choose any shape, you can even use two pieces of wire. I chose "galvanized" for the probes; I used a small piece of getinax as a fixing material. It is also worth considering that the insistence between the probes should be 5mm-10mm, but you should not do more. I soldered the sensor wires to the galvanized ends. Here's what happened in the end:

Didn't bother to do detailed photo report, everything is so simple. Well, the photo in work:

As I indicated earlier, it is better to use the sensor only at the time of measurement. The best option switching on through a transistor switch, but since my current consumption was 0.4mA, you can turn it on directly. To supply voltage during measurements, you can connect the VCC sensor contact to the PWM pin or use the digital output at the time of measurement to supply a high (HIGH) level, and then set it low. It is also worth considering that after applying voltage to the sensor, it is necessary to wait some time for the readings to stabilize. Example via PWM:

Int sensor = A0; int power_sensor = 3;

void setup () (
// put your setup code here, to run once:
Serial.begin (9600);
analogWrite (power_sensor, 0);
}

void loop () (

delay (10000);
Serial.print ("Suhost": ");
Serial.println (analogRead (sensor));
analogWrite (power_sensor, 255);
delay (10000);
}

Thank you all for your attention!