Do-it-yourself thermostat: simple instructions and wiring diagram. How it works and how it works at home

  1. Electromagnetic relays and their connection to the thermostat
    (which are, how they differ and most importantly how to connect them to the thermostat)

Electromagnetic relays.

What are these devices? What are they needed for? How to choose them correctly?

The main component of any relay device is electrical contacts or contact groups that switch circuits for lighting, heating and cooling, ventilation and humidification, as well as switching circuits for drives of various actuators and mechanisms. Moreover, the initiating effect for switching can be both an electrical signal and various physical phenomena such as a change in pressure or temperature. But now we will consider only relay devices with switching occurring by supplying them with a voltage of a certain magnitude, called the "trigger voltage". These are electromagnetic relays, contactors and starters.

Electromagnetic relays.

The principle of operation of electromagnetic relays is that when voltage is applied to the winding of an electromagnet, a magnetic field arises, attracting a metal part called a "yoke" to the core of the electromagnet. This part acts on the moving contacts of the contact groups. It should be noted that, depending on the type of relay, there may be several of these contact groups. Most often from one to six.

And now in more detail about the elements of the relay design

Relay solenoid coil winding.

The electromagnet is usually performed according to the classical scheme. A frame is put on a metal core, and a coil is wound on this frame. The number of turns of this coil and some other parameters determine the relay actuation voltage.

For a relay, the most important parameters are the operate voltage and the type of current, DC or AC, for which it is designed. These parameters are indicated on the relay body or directly on its winding. For DC voltage this can be for example = 12 V or 12 VDC (DC - direct curren),. And for alternating current ~ 220 V or 220 VAC (AC - alternating current). Sometimes the electrical resistance is indicated on the winding to calculate the current in the winding circuit according to Ohm's law:

The current (in Amperes) is directly proportional to the voltage (in Volts) and inversely proportional to the resistance (in Ohms). I = U / R.

The meaning of this formula is that with an increase in the voltage on the electric circuit, the current increases, and with an increase in the resistance in the circuit, it decreases. It should be noted that understanding Ohm's Law is very important for understanding almost all electrical processes.

For some types of DC relays, the polarity of the connection of the electromagnet winding is significant. This feature is indicated by the symbol<+>near one of the contacts.

It should be added that if the control voltage is applied to the relay winding through a transistor, thyristor, microcircuit or other electronic component, one must not forget about the protective diode that suppresses the EMF of the self-induction of the coil. The diode must be connected parallel to the winding in reverse connection (cathode to plus, anode to minus). Otherwise, the control electronic component will be damaged. It should be noted that some types of relays already have a diode in their composition. In this case, on its body you can see the symbol of this diode with the anode and cathode tied to the winding contacts.

Contact groups.

The contact groups of the secondary circuit can be normally open and close the secondary electrical circuit after voltage is applied to the relay coil, normally closed, open the circuit and switch.

Relay switching capacity.

The most important parameter of contact groups is the rated current for which the contacts are designed.

For example, the photo on the left shows two very similar relays. They have the same contact groups in the form of two switching contacts, but different windings. At the top, the operating voltage of the winding is 220 V AC, and at the bottom, 12 V DC. And on the right is a simple thermostat with a miniature low voltage relay controlled by 12 VDC and designed to switch low voltage 115 VAC or 14 DAC.

This current depends on many design factors. But the main one can be called the area of ​​contacts in contact in a closed state. The larger the “spots”, the greater the permissible current. And of course, this parameter is written on the relay case. The second important parameter is the maximum voltage in the switched circuit. It also depends on a number of factors, in this case they can be excluded from consideration. For example, on the case there may be an inscription 10 A 240VAC, or 10 A 28 VDC. It should be noted that the allowable DC voltage is lower than the allowable DC voltage. Therefore, the type of current must be watched carefully.

What is a relay for?

With relays, we can have three main goals.

First, it is the control of the load, the current consumption of which, and, accordingly, the power consumption, is higher than the capabilities of the control device.

Secondly, the control of devices with different supply voltages. This is possible because the coil and contact groups of the relay are completely isolated from each other. (This feature is called galvanic isolation.)

Below is a conditional functional diagram of the switching on-off of the executive device, taking into account these possibilities. This diagram also illustrates the use of the protective diode mentioned above and very important in this case.

This scheme should be used for executive devices and mechanisms operating in the on-off mode. These devices include various pumps, compressors, heaters, various lighting devices with a controlled operation mode, phyto-lamps.

The actuators are controlled through the contacts of the electromagnetic relay. As an example, the actuators are selected with a supply voltage of 220 volts AC. And a control voltage of 12 volts is applied to the relay coil.

For normal operation of the circuit, it is necessary to ensure that the rated operating voltage of the relay contacts is equal to or higher than the mains voltage. And the rated operating current was higher than the current consumed by the load in peak conditions. When controlling incandescent lamps, it should be borne in mind that in a cold state the resistance of its filament is 10 times less than after reaching the glow mode.

It can be added that instead of a bipolar transistor NPN structure, you can use field effect MOSFET transistors with an N-type channel, or a low-power primary relay.

We are building a thermostat.

Let's take the simplest TR-12V thermostat as a basis. This is an inexpensive open-frame thermostat that allows you to control the heating of the heating element through a built-in small-sized relay.

This version of the circuit is designed for connecting a low-voltage heating element, powered from the same power source as the regulator itself. Connections of heating elements powered from a 220 volt electrical network undesirable due to the fact that the manufacturer installs an electromagnetic relay with a maximum voltage of 125VAC on some copies of the thermostat.

As a heater, heating element, we use a special heating wire made of carbon fiber.

Stripping the ends of the heater to connect to the terminals is straightforward. After stripping the insulation, the tip of this wire looks like a fluffy brush, consisting of many thin hairs.

And for connection to a control device, this brush can be crimped with a crimp tip and connected to ordinary screw terminals. It is these terminals that are used in the thermostat and in the power supply.

Resistivity, measured with an ohmmeter, is in the order of 20 ohms per linear meter. (A length of about 300 mm has a resistance of slightly more than 6 ohms).

Thus, a half-meter length of a heating wire with a 12-volt supply releases a thermal power of about 15 watts. Two, three or four such segments connected in parallel, emit 30, 45 or 60 watts, respectively. Naturally, the power of the 12 VDC power supply must be greater than the power released by the heating element.


Carbon fiber is a modern material consisting of thin carbon filaments with a diameter of 5 to 15 microns, formed mainly by carbon atoms. Carbon atoms are combined into microscopic crystal structures aligned parallel to each other. The alignment of these structures gives the fiber greater tensile strength.

The carbon fiber heater is very convenient for the high temperature precision heating system. Uniform distribution of the released heat power, small specific gravity allowing the temperature on the surface of the heater to change very quickly, allowing to configure any form of heater flexibility, all this contributes to the efficiency of using this type of heater.

In the following articles, we will tell you about a variety of other electrical and electronic devices that may be of interest to a farmer.

Compliance with the temperature regime is a very important technological condition not only in production, but also in everyday life. Being so important, this parameter must be regulated and controlled by something. A huge number of such devices are produced, which have many features and parameters. But making a thermostat with your own hands is sometimes much more profitable than buying a ready-made factory analogue.

Create a thermostat with your own hands

General concept of temperature controllers

Devices that fix and simultaneously regulate the set temperature value are found to a greater extent in production. But they also found their place in everyday life. To maintain the required microclimate in the house, thermostats for water are often used. They make such devices for drying vegetables or heating an incubator with their own hands. A similar system can find its place anywhere.

In this video, we will find out what a temperature controller is:


In fact, most thermostats are only part of the overall circuit, which consists of the following components:

  1. A temperature sensor that measures and records, as well as transfers the received information to the controller. This happens due to the conversion of thermal energy into electrical signals recognized by the device. The sensor can be a resistance thermometer or thermocouple, which in their design have a metal that reacts to temperature changes and changes its resistance under its influence.
  2. The analytical unit is the regulator itself. It receives electronic signals and reacts depending on its functions, after which it transmits the signal to the actuator.
  3. An actuator is a kind of mechanical or electronic device that, when receiving a signal from the unit, behaves in a certain way. For example, when the set temperature is reached, the valve will shut off the coolant supply. Conversely, as soon as the readings fall below the preset values, the analytical unit will give the command to open the valve.

These are the three main parts of the temperature control system. Although, in addition to them, other parts, such as an intermediate relay, can participate in the circuit. But they perform only an additional function.

Principle of operation

The principle by which all regulators work is to take a physical quantity (temperature), transfer data to the control unit circuit, which decides what needs to be done in a particular case.

If you make a thermal relay, then the simplest option will have a mechanical control circuit. Here, with the help of a resistor, a certain threshold is set, upon reaching which a signal will be given to the actuator.

To get additional functionality and the ability to work with a wider temperature range, you will have to integrate the controller. This will also help to increase the life of the device.

In this video, you can see how to make your own thermostat for electric heating:

Homemade temperature controller

There are actually a lot of schemes for making a thermostat yourself. It all depends on the area in which such a product will be used. Of course, creating something too complex and multifunctional is extremely difficult. But a thermostat that can be used to heat an aquarium or dry vegetables for the winter can be created with a minimum of knowledge.

The simplest scheme

The simplest do-it-yourself thermostat circuit has a transformerless power supply, which consists of a diode bridge with a parallel connected zener diode, which stabilizes the voltage within 14 volts, and a quenching capacitor. You can also add a 12 volt stabilizer here if you wish.


The creation of a thermostat does not require much effort and money investment

The whole circuit will be based on the TL431 Zener diode, which is controlled by a divider consisting of a 47 kΩ resistor, a 10 kΩ resistance and a 10 kΩ thermistor acting as a temperature sensor. Its resistance decreases with increasing temperature. Resistor and resistance are best matched to obtain the best response accuracy.

The process itself looks like this: when a voltage of more than 2.5 volts is generated on the control contact of the microcircuit, it will open, which will turn on the relay, supplying a load to the actuator.

How to make a thermostat for an incubator with your own hands, you can see in the video presented:

Conversely, when the voltage drops, the microcircuit will close and the relay will turn off.

To avoid rattling of the relay contacts, it is necessary to select it with a minimum holding current. And parallel to the inputs, you need to solder a 470 × 25 V capacitor.

When using an NTC thermistor and a microcircuit that has already been in use, it is worth first checking their performance and accuracy.

Thus, the simplest device turns out regulating the temperature. But with the right ingredients, it performs excellently in a wide range of applications.

Indoor device

Such thermostats with a do-it-yourself air temperature sensor are optimal for maintaining the specified microclimate parameters in rooms and containers. It is fully capable of automating the process and controlling any heat emitter, from hot water to heating elements. At the same time, the thermal switch has excellent performance data. And the sensor can be either built-in or remote.

Here, a thermistor, indicated in the diagram R1, acts as a temperature sensor. The voltage divider includes R1, R2, R3 and R6, the signal from which goes to the fourth pin of the operational amplifier microcircuit. The fifth contact of DA1 receives a signal from the divider R3, R4, R7 and R8.

The resistances of the resistors must be selected in such a way that at the lowest low temperature of the measured medium, when the resistance of the thermistor is maximum, the comparator is positively saturated.

The voltage at the output of the comparator is 11.5 volts. At this time, the transistor VT1 is in the open position, and the relay K1 turns on the executive or intermediate mechanism, as a result of which heating begins. As a result, the ambient temperature rises, which lowers the resistance of the sensor. At the input 4 of the microcircuit, the voltage begins to increase and, as a result, exceeds the voltage at pin 5. As a result, the comparator enters the phase of negative saturation. At the tenth output of the microcircuit, the voltage becomes approximately 0.7 volts, which is a logical zero. As a result, the transistor VT1 closes, and the relay turns off and turns off the actuator.

On the LM 311 chip

Such a do-it-yourself thermocontroller is designed to work with heating elements and is able to maintain the set temperature parameters within 20-100 degrees. This is the safest and most reliable option, since it uses galvanic isolation of the temperature sensor and control circuits, and this completely eliminates the possibility of electric shock.

Like most similar circuits, it is based on a DC bridge, in one arm of which a comparator is connected, and in the other - a temperature sensor. The comparator monitors the misalignment of the circuit and reacts to the state of the bridge when it crosses the balance point. At the same time, he tries to balance the bridge with a thermistor, changing its temperature. And thermal stabilization can occur only at a certain value.

Resistor R6 sets the point at which balance should be formed. And depending on the temperature of the environment, the thermistor R8 can enter into this balance, which allows you to regulate the temperature.

In the video, you can see an analysis of a simple thermostat circuit:


If the temperature set by R6 is lower than the required one, then the resistance on R8 is too large, which reduces the current on the comparator. This will cause current to flow and open the semiconductor VS1. which will turn on the heating element. This will be signaled by the LED.

As the temperature rises, the resistance of R8 will begin to decrease. The bridge will tend to the balance point. On the comparator, the potential of the inverse input gradually decreases, and on the direct one - it increases. At some point, the situation changes, and the process takes place in the opposite direction. Thus, the thermocontroller with its own hands will turn on or off the actuator depending on the resistance R8.

If LM311 is not available, then it can be replaced with the domestic KR554SA301 microcircuit. It turns out a simple do-it-yourself thermostat with minimal costs, high accuracy and reliability.

Required materials and tools

By itself, the assembly of any circuit of an electric temperature controller does not take much time and effort. But to make a thermostat, minimal knowledge of electronics is required, set of parts according to the diagram and tool:

  1. Pulse soldering iron. You can use a regular one, but with a thin sting.
  2. Solder and flux.
  3. Printed circuit board.
  4. Acid to etch the tracks.

Advantages and disadvantages

Even a simple do-it-yourself thermostat has a lot of advantages and positive aspects. There is no need to talk about factory multifunctional devices at all.

Temperature controllers allow:

  1. Maintain a comfortable temperature.
  2. Save energy.
  3. Do not involve a person in the process.
  4. Observe the technological process, increasing the quality.

The disadvantages include the high cost of factory models. Of course, this does not apply to home-made devices. But the production, which is required when working with liquid, gaseous, alkaline and other similar media, have a high cost. Especially if the device must have many functions and capabilities.

Industrial and household automation for control of heating systems must be completed with various temperature control thermostats, which turn on the switching off of heaters or actuators. As a result, the temperature in the house is maintained at a given level. This operating mode of the equipment allows you to obtain significant energy savings with a comfortable microclimate in the house.

Types of thermal relays

The simplest (also the cheapest) temperature controller looks like a small electronic unit with a temperature setting knob, mounted on the wall and connected to the actuator with wires. By functionality, the regulators are divided into the following views:

  1. With the possibility of programming. They are equipped with liquid crystal displays, and can be wired or wirelessly connected to the controlled object. The program can be made in such a way that during the absence of people, the temperature will decrease, and an hour before they return, it will rise.
  2. Programmable with a GSM module, which allows remote control of the installation by means of SMS messages. Advanced models have special applications for installation on smartphones.
  3. Regulators are battery powered, that is, they have full autonomy. The disadvantage is that the batteries need to be changed regularly.
  4. Outdoor temperature measurement wireless with sensors. They are considered the most effective, since they provide the principle of regulation taking into account the change in temperature outside.

By appointment thermostats classified as:

The main characteristics of thermostats

Regulators are adjustable and with hard tuning to the specified parameters. There are models that work as alarms, that is, they give a signal when a specified temperature is reached. When buying a thermostat, you should take into account the features of the existing heating system - the type of boiler and its location, the size of the heated area, is there a need for simultaneous heating of all rooms, etc. Based on these criteria, you need to choose a thermostat with the necessary parameters:

  • the actuation indicator is the temperature value at which the relay contacts close or open;
  • the return rate is characterized by the values ​​at which the device returns to its original state;
  • differential is a range of temperature values ​​in which the state of the regulator does not change after actuation;
  • the value of the switched current and voltage determines the possibility of connecting executive devices of a certain power to the device;
  • contact resistance value;
  • response time;
  • the error can be up to 10% in both directions from the set value.

Choosing the optimal thermostat

The best option, of course, would be the regulator supplied with the boiler, however, it often happens that its parameters do not meet the requirements. In a huge assortment models and prices, where models from the simplest mechanical ones to systems operating through a computer are presented, it is difficult to make the right choice.

In terms of functionality for home automation, the kit bm4022 thermostat is perfect. With its help, you can control and regulate the temperature not only of the air in the room, but also of the coolant in the heating system, if you use an external sensor. It is possible to turn on the fan for cooling of an object if it reaches the set temperature. The adjustable threshold between 0 and 150 ° C allows the temperature to be maintained at a predetermined level. A powerful electromagnetic relay can directly control heating devices up to 2 kW. Upon purchase, it is possible to select a complete set for specific requirements.

Connecting the thermostat

After installing the regulator, it is necessary to supply power to it from a separate machine installed in the switchboard. For this it is used two-wire cable that is connected to the input terminals of the regulator "zero" and "phase". If the value of the current switched by the device corresponds to the power of the connected heater, then the wires from it are connected to the output terminals "plus" and "minus". It is better to choose the cross-section of the wires with a margin so that they do not heat up when the maximum current passes through them.

If the current consumed by the heater exceeds the limit parameters of the thermal relay, a magnetic starter with the appropriate current must be connected to the output terminals. load... A starter is also required to connect several heaters to one regulator. The heater body must be grounded. A separate low resistance wire is used for grounding. After that, the regulator can be turned on.

If you do not have at least minimal skills in working with electrical equipment, then in order to avoid trouble, it is better to invite a qualified electrician.

In everyday life and in a subsidiary farm, it is often required to maintain the temperature regime of a room. Previously, this required a rather huge circuit made on analog elements, we will consider one such for general development. Today everything is much simpler, if it is necessary to maintain the temperature in the range from -55 to + 125 ° C, then the programmable thermometer and thermostat DS1821 can perfectly cope with this goal.


Thermostat circuit on a specialized temperature sensor. This DS1821 thermal sensor can be bought cheaply in ALI Express (to order, click on the picture just above)

The thermostat on and off temperature threshold is set by the TH and TL values ​​in the sensor memory, which must be programmed into the DS1821. If the temperature rises above the value written in the TH cell, a logical unit level will appear at the sensor output. To protect against possible interference, the load control circuit is implemented so that the first transistor is locked in that half-wave of the mains voltage when it is equal to zero, thereby supplying a bias voltage to the gate of the second field-effect transistor, which turns on the optosimistor, and that already opens the VS1 smistor that controls the load ... The load can be any device, such as an electric motor or heater. The blocking reliability of the first transistor must be adjusted by selecting the required value of the resistor R5.

The DS1820 temperature sensor is capable of recording temperatures from -55 to 125 degrees and operates in thermostat mode.


Thermostat circuit on the DS1820 sensor

If the temperature exceeds the upper threshold TH, then the output of the DS1820 will be a logical unit, the load will be disconnected from the mains. If the temperature drops below the lower programmed level TL, then a logical zero will appear at the output of the temperature sensor and the load will be turned on. If there are any unclear points, the homemade design was borrowed from # 2 for 2006.

The signal from the sensor goes to a direct output of the comparator on the CA3130 operational amplifier. The inverting input of the same op-amp receives the reference voltage from the divider. The variable resistance R4 sets the required temperature regime.


Thermostat circuit on the LM35 sensor

If the potential at the direct input is lower than that set at pin 2, then at the output of the comparator we will have a level of about 0.65 volts, and if on the contrary, then at the output of the comparator we will get a high level of about 2.2 volts. The signal from the op-amp output through transistors controls the operation of the electromagnetic relay. At a high level, it turns on, and at a low level, it turns off, switching the load with its contacts.

The TL431 is a programmable zener diode. Used as a voltage reference and power supply for low power circuits. The required voltage level at the control pin of the TL431 microassembly is set using a divider across the resistors Rl, R2 and a thermistor with negative TCS R3.

If the voltage at the TL431 control pin is higher than 2.5V, the microcircuit passes current and turns on the electromagnetic relay. The relay switches the control output of the triac and connects the load. With an increase in temperature, the resistance of the thermistor and the potential at the control contact TL431 decreases below 2.5V, the relay releases its front contacts and turns off the heater.

With the help of resistance R1, we adjust the level of the desired temperature to turn on the heater. This circuit is capable of driving a heating element up to 1500 W. The relay is suitable for RES55A with an operating voltage of 10 ... 12 V or its equivalent.

The analogue thermostat design is used to maintain the set temperature inside the incubator, or in a drawer on the balcony for storing vegetables in winter. Power is supplied from a 12 volt car battery.

The design consists of a relay in the event of a temperature drop and disconnects when the set threshold rises.


The temperature of the thermostat relay actuation is set by the voltage level on pins 5 and 6 of the K561LE5 microcircuit, and the relay switch-off temperature is set by the potential on pins 1 and 21. The temperature difference is controlled by the voltage drop across the resistor R3. In the role of temperature sensor R4, a NTC thermistor is used, i.e.

The design is small and consists of only two blocks - a measuring unit based on a comparator based on an op-amp 554SA3 and a load switch up to 1000 W built on a power regulator KR1182PM1.

The third direct input of the op-amp receives a constant voltage from a voltage divider consisting of resistances R3 and R4. The fourth inverse input is supplied with voltage from another divider on resistance R1 and thermistor MMT-4 R2.


The temperature sensor is a thermistor located in a glass flask with sand, which is located in the aquarium. The main unit of the structure is m / s K554SAZ - voltage comparator.

From the voltage divider, which also includes a thermistor, the control voltage goes to the direct input of the comparator. The other input of the comparator is used to regulate the required temperature. A voltage divider is made of resistances R3, R4, R5, which form a bridge that is sensitive to temperature changes. When the temperature of the water in the aquarium changes, the resistance of the thermistor also changes. This creates an imbalance in the voltages at the comparator inputs.

Depending on the voltage difference at the inputs, the output state of the comparator will change. The heater is made in such a way that when the water temperature drops, the aquarium thermostat automatically starts up, and when the water temperature rises, it turns off. The comparator has two outputs, collector and emitter. To control the field-effect transistor, a positive voltage is required, therefore, it is the collector output of the comparator that is connected to the positive line of the circuit. The control signal is received from the emitter pin. Resistors R6 and R7 are the output load of the comparator.

The IRF840 field-effect transistor is used to turn the heating element on and off in the thermostat. For the discharge of the gate of the transistor, a diode VD1 is present.

The thermostat circuit uses a transformerless power supply. The excess alternating voltage is reduced due to the reactance of the capacitor C4.

The basis of the first design of the thermostat is a PIC16F84A microcontroller with a DS1621 temperature sensor with an l2C interface. At the moment of power-up, the microcontroller first initializes the internal registers of the temperature sensor, and then adjusts it. The thermostat on the microcontroller in the second case is already made on the PIC16F628 with the DS1820 sensor and controls the connected load using the relay contacts.


DIY temperature sensor

The temperature dependence of the voltage drop across the pn junction of semiconductors is the best fit for creating our homemade sensor.