Do-it-yourself construction and repairs

Soil indicator diagram for houseplants. Homemade, stable soil moisture sensor for automatic irrigation installation. Module Specifications

Connect an Arduino with an FC-28 Soil Moisture Sensor to detect when your soil under your plants needs water.

In this article we are going to use 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 as output. We're 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. Two probes allow a current to pass through the soil, which gives a resistance value that ultimately 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 there will be more resistance.

The FC-28 sensor can be connected in analog and digital modes. First we will connect it 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

The FC-28 soil moisture sensor has four contacts:

  • 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 a value above or below the threshold.

Analogue mode

To connect the sensor in analog mode, we will need to use the analog output of the sensor. The FC-28 soil moisture sensor 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 those values.

Electrical diagram

Connect the FC-28 soil moisture sensor to 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 to hold the contact of the soil moisture sensor and another to hold 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 this, 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. We will then compare the output values ​​from 0-100 because humidity is measured as a percentage. When we took readings from dry soil, the sensor value was 550, and in wet soil, the sensor value was 10. We correlated 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 digital output of the sensor to the digital pin of the Arduino.

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 sensor output value and the threshold value and then gives us the output value through a digital pin.

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 pin and the LED will not light up.

Electrical diagram

The connections for the FC-28 soil moisture sensor 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:

Int led_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 have initialized 2 variables to connect the LED pin and the digital pin 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 sensor output. If the value is higher than the threshold value, the LED will turn on. If the sensor value is below the threshold value, the indicator will go 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. Successful projects to you.

Arduino Soil Moisture Sensor designed to determine the moisture content of the soil in which it is immersed. It lets you know if your home or garden plants are under- or over-watered. Connecting this module to the controller allows you to automate the process of watering your plants, garden or plantation (a kind of “smart watering”).

The module consists of two parts: a YL-69 contact probe and a YL-38 sensor, wires for connection are included. A small voltage is created between the two electrodes of the YL-69 probe. If the soil is dry, the resistance is high and the current will be less. If the ground is wet, the resistance is less, the current is a little more. Based on the final analog signal, you can judge the degree of humidity. The YL-69 probe is connected to the YL-38 sensor via two wires. In addition to the contacts for connecting to the probe, the YL-38 sensor has four contacts for connecting to the controller.

  • Vcc – sensor power supply;
  • GND – ground;
  • A0 - analog value;
  • D0 – digital value of the humidity level.
The YL-38 sensor is built on the basis of the LM393 comparator, which outputs voltage to output D0 according to the principle: wet soil - low logical level, dry soil - high logical level. The level is determined by a threshold value that can be adjusted using a potentiometer. Pin A0 supplies an analog value that can be transferred to the controller for further processing, analysis and decision making. The YL-38 sensor has two LEDs that indicate the presence of power supplied to the sensor and the level of digital signals at output D0. The presence of a digital output D0 and a D0 level LED allows the module to be used autonomously, without connecting to a controller.

Module Specifications

  • Supply voltage: 3.3-5 V;
  • Current consumption 35 mA;
  • Output: digital and analog;
  • Module size: 16×30 mm;
  • Probe size: 20×60 mm;
  • Total weight: 7.5 g.

Usage example

Let's consider connecting a soil moisture sensor to Arduino. Let's create a project for a soil moisture level indicator for a houseplant (your favorite flower that you sometimes forget to water). To indicate the level of soil moisture we will use 8 LEDs. For the project we will need the following parts:
  • Arduino Uno board
  • Soil moisture sensor
  • 8 LEDs
  • Bread board
  • Connecting wires.
Let's assemble the circuit shown in the figure below


Let's launch the Arduino IDE. Let's create a new sketch and add the following lines to it: // Soil moisture sensor // http://site // contact for connecting the analog output of the sensor int aPin=A0; // contacts for connecting indication LEDs int ledPins=(4,5,6,7,8,9,10,11); // variable to save the sensor value int avalue=0; // variable for the number of glowing LEDs int counted=8; // value of full watering int minvalue=220; // critical dryness value int maxvalue=600; void setup() ( // initializing the serial port Serial.begin(9600); // setting up the LED indication pins // to OUTPUT mode for(int i=0;i<8;i++) { pinMode(ledPins[i],OUTPUT); } } void loop() { // получение значения с аналогового вывода датчика avalue=analogRead(aPin); // вывод значения в монитор последовательного порта Arduino Serial.print("avalue=";Serial.println(avalue); // scale the value by 8 LEDs counted=map(avalue,maxvalue,minvalue,0.7); // indication of the humidity level for(int i=0;i<8;i++) ( if(i<=countled) digitalWrite(ledPins[i],HIGH); //light the LED else digitalWrite(ledPins[i],LOW) ; // turn off the LED ) // pause before the next value is received 1000 ms delay(1000); ) The analog output of the sensor is connected to the analog input of the Arduino, which is an analog-to-digital converter (ADC) with a resolution of 10 bits, which allows the output to obtain values ​​from 0 to 1023. The value of the variables for complete watering (minvalue) and severe dry soil (maxvalue ) we obtain experimentally. Greater soil dryness corresponds to a larger analog signal value. Using the map function, we scale the analog value of the sensor to the value of our LED indicator. The higher the soil moisture, the higher the LED indicator value (number of lit LEDs). By connecting this indicator to a flower, we can see the degree of humidity on the indicator from a distance and determine the need for watering.

Frequently asked questions FAQ

1. Power LED does not light up
  • Check the presence and polarity of the power supplied to the YL-38 sensor (3.3 - 5 V).
2. When watering the soil, the soil moisture indicator LED does not light up
  • Adjust the response threshold using the potentiometer. Check the connection of the YL-38 sensor with the YL-69 probe.
3. When watering the soil, the value of the analogue output signal does not change
  • Check the connection of the YL-38 sensor with the YL-69 probe.
  • Check for the presence of a probe in the ground.

Would you like your plants to tell you when they need to be watered? Or just kept you updated on soil moisture levels?

In this article we will look at an automated irrigation project using a soil moisture level sensor:

Soil Moisture Sensor Overview

Such sensors are quite easy to connect. Two of the three connectors are power (VCC) and ground (GND). When using the sensor, it is advisable to periodically disconnect it from the power source to avoid possible oxidation. The third output is a signal (sig), from which we will take readings. The two sensor contacts operate on the principle of a variable resistor - the more moisture in the soil, the better the contacts conduct electricity, the resistance drops, and the signal at the SIG contact increases. Analog values ​​may vary depending on the supply voltage and resolution of your microcontroller analog pins.

There are several options for connecting the sensor. The connector shown in the figure below:

The second option is more flexible:

And of course, you can directly solder the contacts to the sensor.

If you plan to use the sensor outside your apartment, you should additionally think about protecting the contacts from dirt and direct sunlight. It may be worth considering housing or applying a protective coating directly to the humidity sensor pins and conductors (see picture below).

Soil moisture level sensor with a protective coating applied to the contacts and insulated conductors for connection:

The problem of the fragility of the soil moisture level sensor

One of the disadvantages of sensors of this type is the fragility of their sensitive elements. For example, Sparkfun solves this problem by using additional coating (Electroless Nickel Immersion Gold). The second option for extending the life of the sensor is to supply power to it directly when readings are taken. When using Arduino, everything is limited to applying a HIGH signal to the pin to which the sensor is connected. If you want to power the sensor with more voltage than the Arduino provides, you can always use an additional transistor.

Soil moisture control - example project

The project below uses a humidity level sensor, an analogue of the Arduino board - RedBoard and an LCD display, which displays data about the soil moisture level.

SparkFun Soil Moisture Sensor:

The red wire (VCC) connects to 5V on the Arduino, the black wire connects to ground (GND), and the green wire connects to analog pin 0 (A0). If you are using a different analog pin on the Arduino, be sure to modify the microcontroller sketch below accordingly.

The LCD display is connected to 5V, ground and digital pin 2 (can also be modified and code changed) to communicate with the microcontroller via serial communication protocol.

It is worth noting that if you want to extend the life of your sensor, you can connect its power to the digital pin and power it only when reading data, and then turn it off. If you constantly power the sensor, its sensitive elements will soon begin to rust. The higher the soil moisture, the faster corrosion will occur. Another option is to apply plaster of Paris to the sensor. As a result, moisture will flow in, but corrosion will be significantly slowed down.

Program for Arduino

The sketch is quite simple. To transfer data to the LCD display, you need to connect the Software Serial library. If you don't have it, you can download it here: Arduino GitHub

Additional explanations are provided in the comments to the code:

// An example of using a soil moisture level sensor with an LCD display.

SoftwareSerial mySerial(3,2); // pin 2 = TX, pin 3 = RX (not used)

int thresholdUp = 400;

int thresholdDown = 250;

int sensorPin = A0;

String DisplayWords;

int sensorValue;

mySerial.write(254);

mySerial.write(128);

// clear the display:

mySerial.write(" ");

mySerial.write(" ");

// move the cursor to the beginning of the first line of the LCD display:

mySerial.write(254);

mySerial.write(128);

// "Dry, Water it!"

mySerial.write(254);

mySerial.write(192);

mySerial.print(DisplayWords);

) else if (sensorValue >= thresholdUp)(

// move the cursor to the beginning of the second line of the display:

mySerial.write(254);

mySerial.write(192);

mySerial.print(DisplayWords);

// move the cursor to the beginning of the second line of the display:

mySerial.write(254);

mySerial.write(192);

mySerial.print(DisplayWords);

The program uses different minimum and maximum values. As a result, the average value can characterize the moisture content depending on whether the soil is wet or dry. If you do not want to use this average, the maximum and minimum values ​​can be taken to be the same. However, experiments show that the proposed approach makes it possible to more accurately characterize the processes that occur in the soil. There is no specific exact average value under real-world conditions. So you can play around with range sampling. If you are interested in the processes that occur in soil when interacting with water, read here, for example: Wiki. The processes are quite complex and interesting.

In any case, you need to adjust the variables to your own conditions: soil type, required level of moisture. So test and experiment until you decide on the appropriate values.

After organizing the reading of data from the humidity level sensor and displaying it, the project can be developed further by organizing an automatic watering system.

Humidity level sensor as part of an automatic irrigation system based on Arduino:

To automate irrigation, we will need additional parts: perhaps pulleys, gears, a motor, a coupling, transistors, resistors. The list depends on your project. Well, everything that can come to hand in everyday life. One example is shown in more detail below:

This is one of many options for installing a motor for an automatic irrigation system. The wheel can be installed directly in the water. In this case, when it rotates quickly, water will be supplied to the plant. In general, you can show your imagination.

The connection diagram for a DC motor () using an example of a copy of Arduino from SparkFun is shown below:

Below is an Arduino sketch (essentially the same as the one above with a small addition for motor control):

// The sketch reads data from the sensor and displays the soil moisture level

// if the soil is dry, the engine starts running

// To work with the display, the softwareserial library is used

#include <SoftwareSerial.h>

//Connect the LCD serial RX pin to digital pin 2 of the Arduino

SoftwareSerial mySerial(3,2); // pin 2 = TX, pin 3 = RX (unused)

// Control the motor using pin 9.

// This pin must support PWM modulation.

const int motorPin = 9;

// Here we set up some constants.

// Setting the constants depends on the environmental conditions in which the sensor is used

int thresholdUp = 400;

int thresholdDown = 250;

// Configure pin A0 on Arduino to work with the sensor:

int sensorPin = A0;

pinMode(motorPin, OUTPUT); // set the pin to which the motor is connected as an output

mySerial.begin(9600); // set the data exchange rate to 9600 baud

delay(500); // wait until the display loads

// Here we declare a string that stores the data to be displayed

// on the liquid crystal display. Values ​​will change

// depending on soil moisture level

String DisplayWords;

// The sensorValue variable stores the analog value of the sensor from pin A0

int sensorValue;

sensorValue = analogRead(sensorPin);

mySerial.write(128);

// clear the display:

mySerial.write(" ");

mySerial.write(" ");

// move the cursor to the beginning of the first line of the LCD display: mySerial.write(254);

mySerial.write(128);

// recording the necessary information on the display:

mySerial.write("Water Level: ");

mySerial.print(sensorValue); //Use .print instead of .write for values

// Now we will check the humidity level against the numeric constants we pre-specified.

// If the value is less than thresholdDown, display the words:

// "Dry, Water it!"

// move the cursor to the beginning of the second line of the display:

mySerial.write(254);

mySerial.write(192);

DisplayWords = "Dry, Water it!";

mySerial.print(DisplayWords);

// starting the engine at low speed (0 – stop, 255 – maximum speed):

analogWrite(motorPin, 75);

// If the value is not lower than thresholdDown it is necessary to check, it will not

// is it greater than our thresholdUp and, if, is greater than

// display "Wet, Leave it!":

) else if (sensorValue >= thresholdUp)(

// move the cursor to the beginning of the second line of the display:

mySerial.write(254);

mySerial.write(192);

DisplayWords = "Wet, Leave it!";

mySerial.print(DisplayWords);

// turning off the engine (0 – stop, 255 – maximum speed):

analogWrite(motorPin, 0);

// If the received value is in the range between the minimum and maximum

// and the soil was wet before, but is now drying out,

// display the inscription "Dry, Water it!" (that is, when we

// approaching thresholdDown). If the soil was dry and now

//quickly moisturizes, displays the words "Wet, Leave it!" (that is, when we

// approaching thresholdUp):

// move the cursor to the beginning of the second line of the display:

mySerial.write(254);

mySerial.write(192);

mySerial.print(DisplayWords);

delay(500); //Half a second delay between readings

Good luck with implementing automatic watering for your plants!

A soil moisture sensor will help you get rid of monotonous repetitive work, and a soil moisture sensor will help you avoid excess water - it’s not that difficult to assemble such a device with your own hands. The laws of physics come to the aid of the gardener: moisture in the soil becomes a conductor of electrical impulses, and the more there is, the lower the resistance. As humidity drops, resistance increases and this helps track the optimal watering time.

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

The moisture dries - the resistance increases, the current decreases.

Since the electrodes will be in a humid environment, it is recommended to turn them on via a key to reduce the destructive effects of corrosion. During normal times, the system is turned off and only starts up to check the humidity by pressing a button.

Soil moisture sensors of this type can be installed in greenhouses - they provide control over automatic watering, so the system can function without human intervention at all. In this case, the system will always be in working condition, but the condition of the electrodes will have to be monitored so that they do not become unusable due to corrosion. Similar devices can be installed on garden beds and lawns in the open air - they will allow you to instantly obtain the necessary information.

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

After this, the sensor will allow you to monitor changes in moisture content in the soil.

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

The sensor design is assembled as follows:

  • The main part is two electrodes, the diameter of which is 3-4 mm, they are attached to a base made of textolite or other material protected from corrosion.
  • At one end of the electrodes you need to cut a thread, on the other side they are made pointed for more convenient immersion into the ground.
  • Holes are drilled in the PCB plate into which the electrodes are screwed; they need to be secured with nuts and washers.
  • Outgoing wires need to be placed under the washers, after which the electrodes are insulated. The length of the electrodes that will be immersed in the ground is about 4-10 cm, depending on the container or open bed used.
  • To operate the sensor, a current source of 35 mA is required; the system requires a voltage of 5V. Depending on the amount of moisture in the soil, the range of the returned signal will be 0-4.2 V. Resistance losses will demonstrate the amount of water in the soil.
  • The soil moisture sensor is connected via 3 wires to the microprocessor; for this purpose, you can purchase, for example, Arduino. The controller will allow you to connect the system to a buzzer to sound a signal when soil moisture decreases excessively, or to an LED, the brightness of the lighting will change with changes in the operation of the sensor.

Such a homemade device can become part of an automatic watering system in a Smart Home system, for example, using the MegD-328 Ethernet controller. The web interface shows the humidity 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, relay and battery, is 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 at the same time reliable.

The application of a 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. When it comes to succulents, such as cacti, it is necessary to select long electrodes that will respond to changes in humidity levels directly at the roots. They can also be used for other fragile plants. Connecting to an LED will allow you to accurately determine when it is time to carry out.
  2. They are indispensable for organizing watering of plants. Using a similar principle, air humidity sensors are also assembled, which are needed to put the plant spraying system into operation. All this will allow you to 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 remember the time of watering each bed; electrical engineering itself will tell you about the amount of water in the soil. This will prevent overwatering if it has recently rained.
  4. The use of sensors is very convenient in some other cases. For example, they will allow you to control soil moisture in the basement and under the house near the foundation. In an apartment, it can be installed under the sink: if the pipe starts to drip, the automation will immediately report this, and flooding of neighbors and subsequent repairs can be avoided.
  5. A simple sensor device will allow you to fully equip all problem areas of your home 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.

Making your own sensor will help you equip your home with an automatic control system at minimal cost.

Factory-made components can be easily purchased via the Internet or in a specialized store; most of the devices can be assembled from materials that can always be found in the home of an electrical engineering enthusiast.

More information can be found in the video.

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 detect 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 into it, and as soon as water gets into them, the machine will disconnect the load from the network. Or if we use the rear contacts, the automatic relay will turn on the pump or the device we need.

We manufacture the sensor itself in exactly the same way as in the previous diagram. If liquid gets on the contacts of the F1 sensor, the sound alarm will begin to emit a constant sound signal, and the HL1 LED will also light up.

Using the SA1 toggle switch, you can change the order of the HL1 indication to a continuous LED glow in standby mode.

This humidity sensor circuit can be used as a rain detector, overflow of a liquid container, water leakage, etc. The circuit can be powered from any five-volt DC power source.

The source of the sound signal is a sound emitter with a built-in sound generator. The humidity sensor is made from a strip of foil PCB with a thin track in the foil. If the sensor is dry, the sound signal does not signal. If the sensor gets wet, we will immediately hear an intermittent alarm signal.

The design is powered by a Krona battery and will last for two years, because during standby mode, the circuit consumes almost zero current. Another bonus of the circuit is the fact that almost any number of sensors can be connected parallel to the input and thus cover the entire controlled area at a time. The detector circuit is built on two 2N2222 type transistors connected in a Darlington manner."

List of radio components

R1, R3 - 470K
SW1 - button
R2 - 15k
SW2 - switch
R4 - 22K
B1 - crown type battery
C1 - capacitor with a capacity of 0.022 µF
T1, T2 - input terminals
PB1 - (RS273-059) piezo buzzer
Q1, Q2 - 2N2222 type transistors

When the first transistor opens, it immediately unlocks the second, which turns on the piezo buzzer. In the absence of liquid, both transistors are securely off and very low current is consumed from the battery. When the buzzer is turned on, the current consumption increases to 5 mA. Sound emitters of type RS273-059 have a built-in generator. If a more powerful alarm is needed, connect several buzzers in parallel or use two batteries.

We manufacture printed circuit boards with dimensions of 3*5 cm.

The test toggle switch connects a 470 kOhm resistance to the input, simulating the action of a liquid, thereby checking the functionality of the circuit. Transistors can be replaced with domestic ones, such as KT315 or KT3102.

An automatic humidity sensor is designed to turn on forced ventilation of a room at high air 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 its simplicity of design makes it easy to modify its components to suit specific operating conditions. The diagram of the humidity sensor is shown in the figure below.

The scheme works as follows. When the air humidity in the room is normal, the resistance of the dew sensor - gas resistor B1 does not exceed 3 kOhm, transistor VT2 is open, the powerful high-voltage field-effect transistor VT1 is closed, the primary winding of transformer T1 is de-energized. The load connected to the XP1 connector will also be de-energized.

As soon as the air humidity approaches the point of dew, for example, a boil left unattended, the bathroom is filled with hot water, the cellar is flooded with melted water, groundwater, the thermostat of the water heater has failed, the resistance of the gas resistor B1, the sharp alternating current is removed from the secondary winding T1 and supplied to the bridge diode rectifier VD2. Rectified voltage ripples are smoothed out by a high-capacity oxide capacitor C2. The parametric DC voltage stabilizer is built on a composite transistor VT3 with a high base current transfer coefficient of the KT829B type, a zener diode VD5 and a ballast resistor R6.

Capacitors SZ, C4 reduce 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 VAC, can be connected to the XP1 socket. A bridge rectifier VD1 is installed in the open supply circuit of the step-down transformer T1 and the high-voltage load. A pulsating DC voltage is supplied to the drain of the field-effect transistor. The cascade on transistors VT1, VT2 is powered by a stabilized voltage of +11 V, set by the zener diode VD7. The voltage is supplied to this zener diode through the chain R2, R3, VD4, HL2. This circuit design allows the field-effect transistor to be opened completely, which significantly reduces the power dissipated on it.

Transistors VT1, VT2 are included as a Schmitt trigger, which prevents the field-effect transistor from being in an intermediate state, which prevents it from overheating. The sensitivity of the humidity sensor is set by trimming resistor R8, and, if necessary, by selecting the resistance of resistor R7. Varistors RU1 and RU2 protect device elements from damage by network voltage surges. The green LED HL2 indicates the presence of supply voltage, and the red LED HL1 signals high humidity and the device is switched to forced ventilation mode.

You can connect up to 8 low-voltage fans with a current consumption of up to 0.25 A each to the device and, or several fans with a supply voltage of 220 V. If using this device it is necessary to control a more powerful load with a supply voltage of 220 V, then to the output 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 negative TKS, 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 the ventilation also when the air temperature rises above 45...50 °C, when the stove burners are operating at full power.

In place of transformer T1, 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 not less than the current of the low-voltage load. Without rewinding the secondary winding “Yunost”, “Sapphire”. Unified transformers TPP40 or TN46-127/220-50 are also suitable. When making a transformer yourself, you can use an W-shaped magnetic core 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 will do. 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 advisable to choose a heat sink with which the temperature of the VT3 transistor body 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, you can unwind several turns from the secondary winding of the transformer. The field effect transistor IRF830 can be replaced with KP707V2, IRF422, IRF430, BUZ90A, BUZ216. When installing 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.

KBU diode bridges can be replaced with similar ones 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 use, for example, AL307, KIPD40, L-63 series. Oxide capacitors are imported analogs of K50-35, K50-68. Varistors - any low or medium power for a classified 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 VCRs 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 mechanism fogs up, which prevents the magnetic tape from wrapping and damaging. The device can be mounted on a printed circuit board measuring 105x60 mm. 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 spacer. To protect the mounted board from moisture, the mounting and printed conductors are coated with several layers of FL-98, ML-92 varnish or tsaponlac.

There is no need to paint over the gas resistor. To check the device’s functionality, you can simply exhale air from your 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 fight the increased humidity. In standby mode, the device consumes current from the network 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 worrying about power consumption. Since the device is partially galvanically connected to the 220 V AC mains voltage, appropriate precautions should be taken when setting up and operating the device.

As a result of numerous experiments, this soil sensor circuit appeared on one single chip. Any of the microcircuits will do: K176LE5, K561LE5 or CD4001A.

The air humidity sensor, the diagram and drawings of which are attached, makes it possible to fully automate the process of monitoring and managing the relative humidity of the air in any room. This humidity sensor circuit makes it possible to measure relative humidity in the range from 0–100%. With very high accuracy and stability of parameters

Light and sound alarm for water boiling. - 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.