DIY diagrams of simple outdoor thermometers. The simplest electronic thermometer. Types of thermometers that you can make yourself

How to Make a Simple Digital Temperature Meter (10+)

Simple DIY digital thermometer

I needed to quickly make a simple temperature meter from scrap parts. The circuit turned out to be simple, easy to replicate by people with basic electronics skills.

Circuit diagram of an electronic digital temperature meter

The design is a classic bridge. One arm of the bridge is made of a resistor and a temperature sensor with a linear dependence of voltage on temperature. The second arm is a voltage divider

The circuit is powered by a stabilized 9V voltage source. Attention! You cannot use sources that produce high-frequency pulsations at the output. Measuring device will not work in such conditions. You can power it from a Krona battery, but then, as it discharges and the voltage on it decreases, adjustments will be required

Details

Resistor R1- low-power 6.8 kOhm.

Resistor R2- low-power 30 kOhm.

Resistor R3- low-power trimmer 5 kOhm.

Meter A- a regular digital tester.

Operating principle, setup, calibration

The voltage on the VD1 sensor is directly proportional to the temperature. Moreover, a change in temperature by 1 GHz leads to a change in voltage by 10 mV, which is very convenient, as it simplifies the conversion of instrument readings into temperature values.

We carry out the adjustment like this. We measure the ambient temperature with a regular thermometer. We turn on the tester and switch it to voltage measurement mode with a limit of 2000 mV. Using the tuning resistor R3, we achieve readings on the indicator equal to the current temperature multiplied by 10. That is, if it is 21 degrees in our room, then the indicator should show 210 mV.

That's it, now you can take measurements. The indicator readings must be divided by 10. If the indicator shows, for example, -120, then the temperature is -12 GHz.

Unfortunately, errors are periodically found in articles; they are corrected, articles are supplemented, developed, and new ones are prepared.

Today we will tell you how to make an electronic thermometer from three parts with your own hands.

A very simple and fairly accurate thermometer can be made if you happen to have an old dial ammeter with a 100 µA scale lying around.
This will require only two parts.
The temperature is measured by the LM 35 sensor. This integrated silicon includes a temperature-sensitive element - a primary converter and a signal processing circuit, made on a single chip and enclosed in a housing, such as, for example, the KT 502 (TO-92). The LM 35 sensor has a design variation with the same parameters, but a different pinout and heat sink, which is very convenient for contact temperature measurements.
The output voltage of the LM 35 sensor is proportional to the Celsius scale (10mV/C). At a temperature of 25 degrees this sensor has an output voltage of 250 mV, and at 100 degrees the output is 1.0 V.
The sensor designation is somewhat unusual. The pinout is shown in the figure.

In the diagram, the sensor is depicted as a rectangle with the designation of the device type and pin numbering.
thermometer is shown in the figure and is so simple that it requires no explanation.
The assembled thermometer must be calibrated.
Turn on the diagram. Press the LM 35 sensor tightly to the reservoir of the mercury thermometer, for example using electrical tape, wrap the junction or simply put everything under a pillow. Since any thermal processes are inertial, you will have to wait half an hour or more for the temperatures of the sensor and thermometer to equalize, then use the potentiometer to set the microammeter needle to the number corresponding to the temperature of the thermometer. That's all. You can use a thermometer.

In the author’s version, a thermometer from 0 to 50 degrees Celsius with a division value of 0.1 degrees was used for calibration, so the thermometer turned out to be quite accurate.
Unfortunately, finding such a thermometer is problematic. For rough calibration, you can simply place the sensor next to a thermometer that measures, say, the temperature in the room, wait two hours and set the desired temperature on the microammeter scale.
If you still find an accurate thermometer, then instead of a dial gauge you can use a digital multimeter, for example the Chinese VT-308V, as an indicator, then the temperature readings can be read down to tenths of a degree.
For those who want to get acquainted with integrated sensors in detail, please visit kit-e.ru or rcl-radio.ru (search LM 35).

In Fig. 79 given circuit diagrams the simplest semiconductor thermometers on diodes(Fig. 79, a) and a transistor (Fig. 79.6), published in one of the American radio magazines. In the thermometer, the diagram of which is shown in Fig. 79, a, the sensitive element (sensor) is four silicon diodes connected in series and powered by a direct current of 1 mA. In this case, a shift of the current-voltage characteristic of silicon diodes towards zero by 2.11±0.06 mVI°C is used. Thus, with an increase in temperature from -18 to +100 ° C, the voltage acting on each diode decreases by more than 400 mV (from 688 to 270 mV). Consequently, the voltage on all four diodes will decrease by 1.6 V, i.e. it will be 4 times greater.



To measure voltage fluctuations on the diodes, they are included in one of the arms of the bridge, which generally consists of a voltage divider across resistors R3-R5 and resistor R1 connected in series with diodes D1-D4. The thermometer indicator is a microammeter connected to the diagonal of the bridge through a variable resistor R2. The bridge is powered constant voltage 6 V, stabilized silicon zener diode D5.


Setting up a diode thermometer comes down to calibrating its scale, which is done as follows. Diodes coated with waterproof varnish are placed in a vessel with water, the temperature of which is controlled with a mercury thermometer. The length of the conductors connecting diodes D1-D4 to the meter can be several meters. When cooling or heating water, you can go through the temperature range from zero to 100 ° C, while making the appropriate marks on the microammeter scale. “Zero” is shifted to the desired place on the instrument scale by adjusting the variable resistor R4, and the temperature measurement range is selected variable resistor R2. Any source can be used to power the diode thermometer direct current voltage 12-16 V.


A transistor thermometer, the circuit of which is shown in Fig. 1, is significantly more sensitive. 79, b.


This is explained by the fact that here a transistor is used as a sensitive element, operating in an amplifier stage assembled according to a circuit with separated loads. Thanks to the amplifying properties of the transistor, the sensitivity of the thermometer increases tens of times. The controls and settings here are the same as in the previously discussed design.


When making a thermometer according to the diagram in Fig. 79, or you can use diodes like D105 or D106 (D1-D4), KS156A (D5). In the thermometer according to the diagram in Fig. 79, b transistor T1 can be of type KT315 or KT312 with any letter index. A thermometer with a transistor of the KT312 type will have less thermal inertia, since this transistor has a metal body, while the KT315 has a plastic body.


All described thermometers can also measure negative temperatures down to -70 ° C. In this case, it is advisable to install a microammeter in the thermometer at 100 μA with zero in the middle of the scale.


Semiconductor thermometers are very convenient for remote temperature measurement. For example, by placing several groups of diodes at different points of the refrigerator, by switching them you can control the temperature of the corresponding area. Another example is measuring the temperature of the earth's surface and the near-earth layer of air. In rural areas, this is of great importance, as it can warn of the onset of spring and summer frosts on the soil. You can monitor the temperature of the soil or air in the garden or vegetable garden using the readings of a device installed directly in the room. There are other possible applications for semiconductor thermometers.


Vasiliev V. A. Foreign amateur radio designs. M., "energy", 1977.

Hello, friends!

On this page I will tell you about homemade electronic thermometer. This device is designed to measure temperature outside the window on the street, made by me in several copies, each of which works flawlessly.

The measurement limits are limited from below by the type of sensor used at the level of -40ºС, from above - by the hardware circuit and software at +80ºС. Thus, the measurement range of the electronic thermometer is -40...80ºС. The temperature measurement accuracy is no worse than ±1ºС.

As temperature sensor The LM335Z sensor is used, made in the TO-92 housing:

This sensor has 3 legs, of which only two are actually used: “+” and “-”:

The sensor has the characteristic of an almost ideal zener diode (voltage stabilizer), the stabilization voltage of which linearly (more precisely, almost linearly) depends on the temperature of the sensor itself. By setting any current through the sensor in the range from 0.4 to 5 mA (for example, as shown in the figure above, using a resistor of a suitable value), we obtain the voltage on the sensor, which in tens of mV represents the absolute temperature (in Kelvin):

So, for example, at a temperature of 0ºС = 273.15K, ideally there will be a voltage on the sensor of 2.7315V, at a temperature of -40ºС = 233.15K on the sensor there will be 2.3315V, at 100ºС = 373.15K on the sensor there will be 3.7315V.

Thus, by measuring the voltage on the sensor, we are able to find out the temperature of the sensor itself.

basis electronic thermometer is a microcontroller from Atmel ATtiny26. This microcontroller is a microcircuit whose functions can be changed by reprogramming it. The microcontroller has several programmable pins, the purpose and functions of which can be determined by the designer of the device circuit (i.e., myself) using the firmware written into the microcontroller. In addition, this microcontroller contains a number of useful devices, including an Analog-to-Digital Converter (ADC) voltage.

An ADC is a device designed to convert an input analog signal (i.e., some current voltage value on one of the legs of the microcontroller) into some numerical value, which can then be used in the firmware as an input parameter. The resolution of this ADC is 10 bits. This means that inside the microcontroller, the result of converting the input voltage is represented by a number in the range from 0 to 1023 (0...1023, i.e. a total of 1024 values ​​- this is exactly the number 2 to the power of 10).

To obtain the ADC result, the input voltage is compared with the reference voltage generated by the Reference Voltage Source (VS) built into the microcontroller. According to the description for this microcontroller, its ION generates a voltage of 2.56V, however, the permissible range of its deviation from sample to sample is 2.4 ... 2.9V. Typical value is 2.7V. Thus, if the input voltage = 2.7V, i.e. equal to the reference voltage, then the ADC result will be equal to 1023, if the input voltage is half of the reference voltage, i.e. 1.35V, then the ADC result will be equal to half of 1023, i.e. i.e. 511. If the input voltage is greater than the reference voltage, i.e. more than 2.7V, then the ADC result will still be equal to 1023:

Since the maximum temperature for which it is designed Digital Thermometer, is 80ºС or 353.15K, and, therefore, the voltage on the sensor will ideally be equal to 3.5315V, which is greater than the reference voltage of the microcontroller ADC (2.7V), we will need a voltage divider from the sensor, for which we use two resistors:

Now you need to select the values ​​of all resistors. The device is powered from an unstabilized power supply, which uses a Chinese mobile phone charger:

Such charging device have a fairly large spread of output voltages, which (voltages), moreover, can change under load (sag). For thermometers, I selected chargers whose output voltage at idle (i.e., without load) is about 5.2...5.8V. This is no longer possible, since the maximum maximum supply voltage of the ATtiny26 microcontroller is 6V. We also assume that under load output voltage Such a power supply can drop to 4.5V.

Let's consider two limiting cases:

  1. The voltage on the sensor is minimal (at sensor temperature -40ºС), the supply voltage is maximum (let’s take 6V for convenience):

  1. The voltage on the sensor is maximum (at sensor temperature 80ºС), the supply voltage is minimum (4.5V).

It can be seen that with the resistor values ​​indicated in the figures above, the current through the sensor is in the range of 0.87...3.67 mA, which is within the permissible limits of the sensor itself (0.4...5 mA). The values ​​of the voltage divider resistors from the sensor are chosen such that the current through them does not have a large influence on the current through the sensor, and at the same time, so that their reduced resistance (which in this case is about 7 kOhm) is significantly less than the input resistance of the microcontroller ADC (100 MOhm according to the description of the microcontroller).

It is also clear that throughout the entire operating range electronic thermometer, the voltage supplied to the ADC input varies within 1.74...2.64V, which corresponds to the ADC result within 660...1001. Therefore, if the ADC result is less than 660, we can talk about a sensor malfunction or a short circuit. If the ADC result is greater than 1001, we can talk about a malfunction of the sensor or its break, because if it breaks, the voltage divider on the 9.1 kOhm and 27 kOhm resistors will be connected almost to the supply voltage (through a 1 kOhm resistor).

Now let's consider digital indicator. It uses a four-digit seven-segment indicator from kingbright CA04-41SRWA or CC04-41SRWA with a bright red glow. CA04-41SRWA differs from CC04-41SRWA in the direction of the LEDs: in CC04 they are connected according to a circuit with a common cathode (common negative):

in CA04 - according to the scheme with a common anode (common plus):

In a seven-segment indicator, the segments are named with Latin letters a, b, c, d, e, f, g, h as follows:

Each segment of the indicator is a separate LED, which can be turned on, i.e. lit, or turned off, i.e. not lit, depending on the polarity of the voltage supplied to them:

A resistor is needed to limit the current through the segment (LED) to required level. Without it, an unacceptably large current will flow through the LED - the LED will fail and burn out.

Let's estimate how many segments there are in four digits. It turns out that there are 8 x 4 of them = 32 separate segments (LEDs). If we controlled each segment on a separate wire, then to control a four-digit indicator we would need a microcontroller with 32 programmable legs, not counting the ADC input and power pins. Additionally, 32 resistors would be required in each segment (LED) circuit:

Is there a way to reduce the number of controllable pins on a microcontroller? It turns out there is! Already in the CA04-41SRWA indicator (CC04-41SRWA) the segments (LEDs) are connected according to the following scheme:

It can be seen that the segment pins of the first and second, as well as the third and fourth digits are combined in pairs. However, I went even further and already in the scheme itself electronic thermometer combined the segment findings of these two groups:

How many programmable microcontroller legs will we now need to control such an indicator? It turns out that it’s just 8 + 4 = 12. True, now we will have to manage not only segment, but also general digit outputs. Why?

Let's say we want to light only the "a" segment on the first digit, and only the "b" segment on the second digit. The remaining segments of these digits and all segments of other digits must be turned off. What should we do?

To light the “a” segment on the first digit, we need to apply “+” to the common wire of the first digit and “-” to the wire of the combined “a” segments. Similarly, to light the “b” segment on the second digit, we need to apply “+” to the common wire of the second digit and “-” to the wire of the combined “b” segments.

But then we will also have segment “a” of the second digit on, and segment “b” of the first digit, because current will flow to them too. But we don’t need them! What to do?

Who said they have to burn at the same time?

In fact, first we will apply “+” only to the common electrode of number 1, and to the common electrodes of the remaining numbers we will apply “-”, which prohibits their operation. Now, we will apply to the combined segment terminals the combination of signals necessary to display the desired sign on number 1 (in this case, “-” to the wire of the combined segments “a” and “+” to the remaining wires of the combined segments. Now we will only have the “segment” lit. a" of the first digit:

After some time, we will now apply “+” only to the common electrode of number 2, and we will apply “-” to the common terminals of the remaining numbers, including the common terminal of number 1. At the same time, we will change the combination of signals on the combined segment pins to the combination necessary to display the desired sign on number 2 (in our case, “-” on the wire of the combined segments “b” and “+” on the remaining wires of the combined segments. Now we will have a light on only the "b" segment of the second digit:

Similarly, after some more time, we will proceed with the third digit, only now we will not apply “-” to any of the wires of the combined segments, i.e. we will apply “+” to everything:

The same goes for the fourth digit:

After some more time, we turn on the “a” segment of the first digit again:

If the time for switching digits is short enough, that is, the digits switch quickly enough, we, people, create the illusion that segment “a” of the first digit and segment “b” of the second digit are lit simultaneously, and not alternately, but The method described above for including numbers is called " dynamic display".

Now where to connect the current limiting resistors? To common wires, or to segment ones? If you want to save on four resistors, connect to common ones; if you want the numbers to light up evenly, connect to segment ones.

In fact, if a resistor is connected to the common wire of any digit, then this resistor will generate current for ALL segments CURRENTLY ON in this digit. If this is one segment, all the current will flow only through this segment. If there are two segments, then the resistor current will be divided in half between these two segments; if all eight segments must burn, then the resistor current will be divided between all eight segments at once, i.e., each specific segment will receive only 1/8 of the resistor current. Thus, in each specific segment, the current will depend on how many segments are included in a given figure. The current is directly related to the brightness of the glow: the higher the current, the higher the brightness, the lower the current, the lower the brightness. As a result, the brightness of each digit will depend on how many segments are lit in it. This scheme was used in the first domestic “home” telephones with Caller ID of the “RUS” brand. It looked completely ugly.

If you connect resistors to segment terminals, each resistor at a particular time will work only on one segment of the indicator, therefore the currents and, consequently, the brightness of all segments of all digits will be the same. It looks much better.

In my practice, I use only the second option and connect resistors only to the segment pins:

How to choose the value of these resistors?

At normal operation segments (LEDs), a voltage drop of about 2V occurs across them. Some more voltage drop is formed due to the output resistance of the microcontroller pins. This drop can be of the order of 1V at the maximum permissible current through a specific pin of the microcontroller, which, according to the instructions for the ATtiny26 microcontroller, is 40mA. The rest of the voltage is extinguished by our resistor.

Through which indicator wires does the maximum current flow? The maximum current flows through the common wires of the indicator at the moment when all eight segments are lit, since these wires carry the total current from all segments of a given digit.

Let's take this current through the common wires (at the moment when all eight segments of a given number are lit) at the level of the maximum permissible for this microcontroller, i.e. 40 mA. Then the current through any segment should be eight times less, i.e. 5mA. Considering that the maximum supply voltage of an electronic thermometer can reach 5.8V, we find that the resistor can drop 5.8 - 2 - 1 = 2.8V. So we need a resistor that will provide a current of 5mA with a voltage drop across it of 2.8V: 2.8 / 0.005 = 560 Ohms. In fact, we have not yet taken into account that 5.8V is the maximum NOLP voltage of our power supply, while under load it can drop, so the current through each indicator segment will be even less than 5mA. Consequently, the current in the common wires of the indicator will be less than 40mA, therefore, the microcontroller current limit will never be reached.

By the way, in electronic thermometer there is no need to use a dot segment in the numbers (the "h" segment). Therefore, the electronic thermometer circuit provides only seven combined segment wires, and not eight, since the combined wire of the point "h" segments is not used in the electronic thermometer circuit:

This circumstance further reduces the current through the common wires of the numbers.

Let's now talk about the ATtiny26 microcontroller in more detail.

The microcontroller can be compared to the real one desktop computer, only in a greatly truncated and reduced form.

The microcontroller has a built-in CPU, which performs all arithmetic and logical calculations.

The microcontroller has a program memory into which the developer (i.e., me) writes his own microprogram developed by him, in accordance with which all further operation of the microcontroller is carried out. This program memory can be compared to the hard drive of a desktop computer, which contains, for example, a program Microsoft Word. If we want to prepare Text Document and for this we launch Microsoft Word, then at this moment its (i.e. Word’s) program actually begins to execute.

The microcontroller has RAM, which stores the current values ​​of the program’s operating variables, for example, ADC results from a temperature sensor, or sets of data for output to a seven-segment indicator at different moments of dynamic display.

The microcontroller has a non-volatile EEPROM memory designed to store custom settings even when the microcontroller power is turned off. Let's say you have a TV at home. Once you set up TV channels in it, and now you watch them, switching between them. Next, take it, turn off the TV and remove the plug from the socket. Now the TV circuit is completely de-energized. But nevertheless, the next time this TV is plugged in, for some reason the previously made program settings were retained! And we can watch our tuned TV channels again. Where are these settings saved? If the TV was built on an ATtiny26 microcontroller, these settings would be stored in non-volatile EEPROM memory. Non-volatile, because we turned off the TV from the outlet, but the TV channel settings were still saved. EEPROM memory can also be compared to the hard drive of a desktop computer, but now we will not be writing to it. Microsoft program Word, and the results of its work are text files prepared by us.

The microcontroller has a clock frequency, which in this ATtiny26 microcontroller can reach 16 MHz. In this case, the microcontroller processor can theoretically produce up to 16 million arithmetic or logical operations in one second. Source clock frequency can be different devices, For example quartz resonator or crystal oscillator. IN electronic thermometer The 8 MHz RC oscillator built into the microcontroller is used as a clock source.

The microcontroller has programmable input/output ports, or, more simply, programmable legs. Each of these legs can be used as an input - to enter information into the microcontroller, such as information about whether a button is pressed or not, or as an output - to output signals from the microcontroller, for example to a seven-segment LED indicator.

The microcontroller even has a “Reset” leg - similar in function to the Reset button on system unit desktop computer.

In addition, the microcontroller has a number of built-in useful devices that can take on many standard functions and thereby relieve the burden on the central processor. These include timers, comparator, ADC, communication interfaces with external devices or other microcontrollers, interrupt controllers, etc. All these useful devices can be turned on, off, selected various modes, as well as control the results of their work using memory cells (control registers) specially provided in the microcontroller, by writing into which different sets of data can be controlled by a particular microcontroller device. From a programmer's point of view, these control registers are no different from the cells of a regular random access memory microcontroller.

The microprogram for the microcontroller is prepared on a desktop computer. For this, I use the program development environment for microcontrollers Algorithm Builder - this is a domestic analogue of Assembler, which, however, allows you not to “write” programs, but to “draw” them in a very convenient graphical form:

For some time now, this environment has become completely free for any volume of the program! You can download it from the developer's page. This program was created and maintained by a Russian craftsman This address Email protected from spam bots. You must have JavaScript enabled to view it. .

In order for the microcontroller to start working using the prepared firmware, it must be programmed. The microcontroller is programmed right in the circuit electronic thermometer(so-called “in-circuit programming”), by connecting the microcontroller to a desktop computer through a special programmer. How to do it simple programmer, working through the computer's COM port, is described in the instructions for the Algorithm Builder environment. A more sophisticated version of the programmer for this environment is presented on the AVR USB programmer for Algorithm Builder page.

To program the microcontroller, 5 wires are used - 4 signal and one common. The signal wires include the “Reset” wire, since the microcontroller is programmed while in the Reset state. The other 3 signal wires are ordinary I/O legs, which, in addition to programming, can be used for their intended purpose, i.e. as I/O ports. In particular, in the circuit of an electronic thermometer, some combined segment pins of a seven-segment indicator are connected to them. However, it is necessary that the part of the circuit connected to these pins does not interfere with the programming process, otherwise programming will become impossible.

In order to prevent the microcontroller from triggering a reset under the influence of external electromagnetic interference, I connect a 5.6nF capacitor to the “Reset” pin in the immediate vicinity of the microcontroller:

Why exactly 5.6nF? In general, the more, the better. But it was experimentally determined that 5.6nF is the maximum capacitance for this capacitor, at which the microcontroller programming circuit continues to work stably. After all, this capacitor shunts the signals at the "Reset" input coming from the programmer. If the capacitance of this capacitor is increased, then the programming process becomes unstable, and if it is greatly increased, it becomes completely impossible.

You can program the microcontroller not just once, but many times (10,000 times guaranteed, according to the instructions). This is especially useful when debugging a device, where we can first program only the display functions (if the device has an indicator or other means of displaying information) to see what is happening internally, and then gradually build out the rest of the firmware.

For the convenience of connecting the programmer to the microcontroller, in most of my devices on microcontrollers, I provide a five-pin connector of the following type:

It is to this that the programmer is connected to write the microprogram into the microcontroller.

Finally, in order for the microcontroller to work at all, it must be powered. For this purpose, the "VCC", "AVCC" and "GND" pins are used. According to the power supply system, the ATtiny26 microcontroller is divided into two parts: digital and analog. The analog part refers to the ADC and everything connected to it inside the microcontroller. This part is powered through its own power output (or rather input) called "AVCC". The other (rest) or "digital" part of the microcontroller is powered through the "VCC" pin (input). Both of these wires should be supplied with “+” from the power supply. The "-" power supply is connected to the "GND" (or "Ground" or "Common") pins of the microcontroller. The ATtiny26 microcontroller has two “GND” pins:

To protect the microcontroller from the influence of external and internal electromagnetic interference, the rules for constructing radio circuits strongly recommend that you bypass the power pins with ceramic capacitors in the immediate vicinity of the microcontroller:

In addition, to further protect the analog part of the microcontroller from interference, it is recommended to supply power to the “AVCC” pin through an LC, or at least an RC filter. For “R” I used a 30 Ohm resistor, for “C” I used a 1 µF capacitor:

Finally, to reduce the level of noise at the input of the ADC to which the sensor is connected temperature through a resistive voltage divider, I also connected a 1 µF capacitor to this input, and took the power for the sensor itself from the power input of the "AVCC" microcontroller:

How is a microcontroller able to control a seven-segment LED indicator and apply either “+” or “-” to its pins? It turns out that each programmable input-output, if it is used in the microcontroller firmware as an output, is connected inside the microcontroller according to the following circuit:

If we want the output to be “+”, in the microcontroller firmware we issue a logical one (logical “1”) to this pin:

If we want the output to be “-” (aka “0”, “Common” or “Ground”), then in the microcontroller firmware we must output a logical zero (logical “0”) to this pin:

The seven-segment indicator is connected to eleven programmable pins of the microcontroller, but for simplicity, we will consider only two of them. To light the segment “a” of the first digit, we need to apply “+” to the common wire of the first digit and “-” to the segment pin “a”. To do this, we need to submit a log in the microcontroller firmware. "1" to the general output of the first digit and the log. "0" to segment pin "a". In this case, the “a” segment of the first digit will be lit:

If we want to turn off this segment, we will do the opposite: we will submit a log in the microcontroller firmware. "1" to segment output "a" and log. "0" to the general output of the first digit. Then our segment “a” of the first digit will not light up - after all, this LED will be locked:

When using the CC04-41SRWA seven-segment indicator instead CA04-41SRWA(remember that they differ in the polarity of the LEDs), you need to change the log in the firmware. "0" and log. "1".

So, it's time to consider complete circuit diagram of an electronic thermometer:

Actually, the full diagram shows everything that we talked about above. The numbers 0603 and 0805 next to the designation of resistors and capacitors indicate their standard size (in hundredths of an inch). This designation is used to indicate the size of radio elements for surface mounting.

The capacitor on pin 17 of the microcontroller is actually connected to the ADC ION to give it greater stability and protect the ADC from interference.

Legs 19 and 20 of the microcontroller are not used in this circuit, and so that they do not “dangle in the air,” I connected them to the common wire of the circuit. In the microcontroller firmware, these pins are written as outputs to which logical zero is output at all times. Thus, the internal circuit of the microcontroller is additionally connected to the common wire through these legs:

The microcontroller firmware is structured as follows. First, after power is applied, as well as after a reset, the entire RAM of the microcontroller is cleared, including all control registers of all useful devices built into the microcontroller. This was done in order to know for sure that we will not have random data in RAM or false inclusions of certain things internal devices as a result of failures from, for example, a short-term power loss.

After clearing the RAM, some internal devices are configured, such as:

Timer No. 0 (and there are 2 of them in this microcontroller: Timer No. 0 and Timer No. 1), because the part of the firmware responsible for the dynamic indication will work according to this timer;

A watchdog timer that will cause a reboot (Reset) of the microcontroller if it freezes (if the firmware is inactive for more than 0.5 seconds);

I/O ports. It is at this moment that it is determined which of the programmable legs will be the output to the seven-segment LED indicator, the ADC input becomes precisely the input, and grounded pins 19 and 20 become “additional GND pins”;

Analog-to-Digital Converter (ADC), at this moment the exact input to which the temperature sensor is connected is selected, the built-in Reference Voltage Source (VS) (2.7V) is selected and the first ADC process is started.

After this, the microprogram goes into loop and begins to go in a circle, executing the unconditional jump operator on itself. When Timer No. 0 counts down the specified time (approximately 1/500 sec), it causes an interrupt, the firmware stops walking in a “closed circle” and processes the part of the algorithm specified in the interrupt processing from Timer No. 0. Timer #0 itself starts counting down the next 1/500th of a second. Upon completion of interrupt processing from Timer No. 0, the microprogram returns to its “closed circle”. Thus, the algorithm described in interrupt processing for Timer No. 0 is executed 500 times per second. What kind of algorithm is this?

The interrupt processing algorithm for Timer No. 0 contains two parts: an algorithm for preparing values ​​displayed on indicators, and an algorithm for processing dynamic indications.

The algorithm for preparing values ​​displayed on indicators works as follows. The ADC algorithm (see below) supplies the absolute value of the measured temperature (in Kelvin). This value determines sensor damage (break or short circuit), and also determines the temperature value in ºС and selects the method for displaying this temperature on the indicators. So,

if the sensor is damaged (if temperature too small (short circuit) or too large (break)) the indicator displays dashes " - - - - ";

At a temperature of 0...9ºС, for example 5ºС, the temperature value is displayed on the indicator in the form: "5 ºС" (the first digit does not light up);

At temperature more than 9ºС, for example 27ºС, the temperature value is displayed on the indicator in the form: “2 7 ºС”;

At temperatures in the range -1...0ºС the indicator displays the value temperature in the form: "- 0 º C";

At a temperature in the range of -9...-1ºС, for example at a temperature of -7ºС (i.e. at a temperature in the range of -8...-7ºС), the value is displayed on the indicator temperature in the form: "- 7 º C";

At temperature less than -9ºС, for example at a temperature of -18ºС (i.e. at a temperature in the range of -19...-18ºС), the temperature value is displayed on the indicator in the form: "- 1 8 º".

In order to display on the indicator temperature value, it must first be “decomposed into components,” that is, into tens and units of ºС. After receiving the value of each indicator digit (symbols "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", " " , “-”, “º” and “C”), using this value, one or another set of segments is selected for a given indicator location, displaying the required symbol. These four sets (according to the number of familiar places (digits) on the indicator) are stored in four cells (bytes) of RAM.

The algorithm for processing dynamic indication is arranged as follows. A cell is assigned in RAM, which represents the number of the digit displayed in this moment dynamic indication. The value of this cell increases by one with each interrupt from Timer No. 0, and when the value “4” is reached, it is reset to zero. Thus, the value of this cell “runs through” a series of values ​​0, 1, 2, 3, then again 0, 1... etc. The value “0” corresponds to the first digit of the indicator, “1” to the second, ... , "3" - fourth. It is by the value of this cell that the dynamic indication algorithm selects the indicator digit that must be turned on during the time until the next interruption of Timer No. 0. A combination of signals for this particular indicator digit is output to the segment wires of the indicator (exactly one of those four that are stored in RAM by the algorithm for preparing values ​​for the indicator). And the common wire of this particular digit is supplied with a “+” that allows it to glow (log. “1”). Thus, each digit lights up during the period of time between interruptions from Timer No. 0, i.e. for 1/500 sec. Since there are only four digits, the indicator is updated at a frequency of 125Hz.

The ADC, upon completion of the next conversion, just like Timer No. 0, causes an interrupt. However, the algorithm for processing this interrupt is its own. After processing of this interrupt is completed, the next ADC conversion starts.

The ADC interrupt processing algorithm performs the following actions. In the RAM of the microcontroller, a cell (of 2 bytes) is assigned that functions as a counter of completed ADC conversions (which is the same as a counter of the received ADC results). With each interrupt upon completion of the next ADC conversion, the value of this cell increases by one. In addition, another cell (of 3 bytes) is assigned in the RAM, which is used to summarize the ADC results. With each interruption upon completion of the next ADC conversion, the new ADC result obtained is added to the existing value of this cell.

When the counter of completed ADC conversions reaches the value 16384, this counter is reset to zero and starts counting again, and the sum of the ADC results is divided by 16384, the result is stored, and the sum itself is then also reset to accumulate the sum of the next 16384 ADC conversion results.

The result of dividing the sum by 16384 is the average of the ADC results over 16384 results. Averaging is necessary to increase the stability of readings and eliminate flickering of the least significant digit. The average value is used to calculate temperatures in Kelvin. To recalculate the result of the ADC conversion to Kelvin, it is necessary to multiply the ADC result by a certain coefficient. This coefficient is very easy to determine.

To calculate a certain coefficient, the microcontroller firmware is changed in such a way that the indicator displays not the temperature, but directly the average value of the ADC results. The sensor is placed in a glass of water in which pieces of ice float and the whole mixture is intensively mixed to stabilize the temperature in the glass and equalize the temperature of the sensor with it (the sensor, of course, must already be protected from moisture (see below), otherwise the water will will short-circuit his conclusions and greatly distort the results). Temperature a mixture of water and ice, as everyone knows, is 0ºС or 273.15K. Let's assume that the average ADC result is 761 units. Then our required coefficient is 761 / 273.15 = 2.786. Actually, after dividing the average ADC result by this coefficient, we get temperature in K. This temperature value in Kelvin is stored in one of the RAM cells of the microcontroller, in order to then be used by the algorithm for preparing the values ​​displayed on the indicators (see above).

The average ADC result is obtained approximately once every 2 seconds. This is how often the readings change electronic thermometer with a sudden change sensor temperature.

Lastly, I would like to note that while the first average value of the ADC results is being determined (i.e., for about 2 seconds), all used segments are turned on on the indicator, i.e., “8 8 8 8.” This was done to be able to quickly check the serviceability of all used indicator segments if necessary.

At the request of site visitors, I provide the source code and firmware for the microcontroller firmware of the electronic thermometer with detailed comments:

I remind you that all materials from this page can be used only for personal use (not for commercial purposes).

The AVR USB microcontroller programmer page for Algorithm Builder talks about how to build a more advanced programmer for programming microcontrollers from this environment.

In addition, it will be necessary to program its so-called "Fuse bits". These bits determine a number of critical parameters of the microcontroller, such as the clock source and programming method. You can set the required Fuse bits values ​​in the "Options" menu - "Project options..." - the "Fuse bits" tab, or from the programming window via the Fuse bits link... In any case, these bits are set in the Fuse bits installation window, and should be installed EXACTLY as in the picture below:

Structurally Digital Thermometer made on two printed circuit boards Oh. See how to make high-quality printed circuit boards at home. On one board there is a seven-segment LED indicator, on the other the rest of the circuit:

For those who are planning to repeat this design, I am posting the trace files of these boards:

T1.PCB.rar (37.6kB) - trace file of printed circuit boards of an electronic thermometer in P-CAD program 2006:

After installing the components and cleaning them from flux, these two boards are soldered together into a single block using PLS pin combs:

The boards are mounted in a G1015 case manufactured by Gainta Industries. This case needs a little modification, cutting out a window for the indicator and a couple of holes for attaching the printed circuit board unit.

On the indicator side, thin transparent plexiglass (plexiglass), cut from a CD box, is glued to the body, onto which a tint film for tinting car windows is then glued twice. A double layer of tint film is enough to make the entire glass appear opaque (black) from the outside, but the glowing numbers of the indicator are clearly visible through it:

Using the “ears” of the case, the electronic thermometer can be screwed to a wall or something else.

In the first version, the electronic thermometer sensor is placed in a piece of tube from the telescopic antenna and filled with epoxy glue:

In subsequent versions, I wrapped the sensor with several turns of thick cotton thread (reinforcement) and soaked it with wicking sealant for car glass. This option, in my opinion, is even more moisture resistant than the first, although less durable from a mechanical point of view:

This page provides free access to all necessary information And project documentation to independently repeat this design.




Everyone in life has repeatedly had the need to find out the temperature outside the window. Many people are interested in this indicator several times a day, and the purpose may be both a domestic desire to understand how warmly to dress today, and a production need. For this you need an electronic thermometer with a remote sensor.


Scope of use of electronic thermometers for measuring air temperature

Given digital device distinguished by practicality and ease of use. Its main purpose is to measure temperature both indoors and outdoors.


First of all, electronic thermometers are relevant in everyday life: they allow you to easily and quickly find out the temperature outside. In addition, modern window thermometers for plastic windows fit perfectly into the design of today's apartments, unlike old pre-revolutionary thermometers.

In addition to home use, such thermometers are used:

  • in technological rooms;
  • in aquariums;
  • in tanks where animals are kept;
  • in warehouses;
  • for baths and saunas.

One of the important qualities of electronic thermometers with a remote sensor for home and industrial needs is the ability to continuously monitor the temperature both indoors and outside, which is especially important for the safety of products, maintaining the vital functions of some animals and creating a comfortable microclimate.


Electronic thermometer with remote sensor: device and principle of operation

In order to use of this device was convenient and brought maximum benefit, it is worth understanding the principles of its functioning.

How to use electronic thermometers with a remote sensor

The device comes with two parts:

  • Main block. It is equipped with a display and is located in the room.
  • Remote sensor. For effective operation, it should be located at a distance of no more than 65 m from the main unit.

  • The sensitive thermocouple is enclosed in a rubber, plastic or metal sheath. From it, temperature pulses are sent to the main unit. In wired models, the wire length is 1-3 m, but recently they have become increasingly popular wireless options, where a radio transmitter with a thermocouple is placed outdoors.

    A miniature sensor is inserted into the street by drilling a small hole in a wooden window frame, or through a rubber flap in the case of plastic sashes. Often the sensor is removed through the rubber seal of the plastic sash and fixed to the window glass using a suction cup. At the same time, it is easy and convenient to place the main sensor in the room on a window sill, table, rack, or even hang it on the wall.

    The principle of placing a thermometer on the refrigerator compartment is similar. The body of the device is attached to the refrigerator using a suction cup or next to the refrigerator, while the sensor is placed inside the chamber.


    Features of operation of electronic thermometers with a remote sensor

    Due to the high sensitivity of window outdoor thermometers for plastic windows, the error in measurement results is minimal. You can see the measurement data on the display of the main unit. Thus, the additional convenience of an outdoor digital thermometer is that there is no need to peer into a mercury thermometer, trying to discern readings from a barely noticeable column. On an outdoor window thermometer with a remote sensor, all information is clearly and clearly displayed on a high-contrast display in your room.


    Features and useful functions of outdoor window thermometers

    When purchasing a thermometer, pay attention to its characteristics and additional features that make digital window thermometers more convenient and functional.

    Features and advantages of electronic outdoor thermometers

    Thanks to the achievements modern technologies Digital thermometers are able to work under different conditions and are as convenient as possible in everyday life:

    • household electronic thermometers operate at wide range temperatures For the indoor main unit, the operating range is from -10 to +50°C, the outdoor sensor maintains its performance characteristics at temperatures from -50 to +70°C. This allows the thermometers to be used in all climatic zones of Russia;
    • you don’t have to worry about the safety and accuracy of the device’s readings in any weather conditions: thanks to the sealed housing, the sensor is not afraid of snow, wind, rain and scorching sun;

    • It is interesting that a radio transmitter with a thermocouple can be installed not only on the street. If you need to measure the temperature in a room or inside another object, you can place a capsule with a sensor in a greenhouse, garage, cellar, workshop and even a refrigerator;
    • wireless electronic outdoor thermometers with a remote sensor can be easily placed in any convenient place; they do not have to be near a window;
    • modern devices not only record temperature, but carry out full monitoring and analyze the data obtained.

    Additional functions of electronic digital thermometers with a remote sensor

    Modern devices have different additional features, expanding the functionality of the thermometer. When choosing a thermometer, these characteristics can play an important role.

    Function Function Description
    Determining the probability of ice When the temperature ranges from -1 to -3°C, the device warns you of an increased likelihood of ice outside.
    Data analysis The thermometer records the maximum and minimum temperatures and records this data in memory.
    USB connection Via a USB port, you can connect the interface to your computer, copy, analyze and process the received data and draw up reports based on the information in the device’s memory.
    Additional indicators The thermometer can be equipped with a clock, a built-in alarm clock and a calendar, combining in one device all the useful indicators we need every day. Among the best multifunctional models are rst window thermometers, equipped with a clock and a smart alarm clock.
    Humidity level determination The humidity indicator allows you to predict the likelihood of precipitation outside.

    If you have a need for data analysis, make sure that the selected model is equipped with USB port and the ability to process recorded indicators. If your only purpose of purchase is to find out the temperature outside, choose the simplest, most laconic thermometer model.

    Who can benefit from buying an electronic thermometer with a remote sensor with extended functionality?

    Buying a window thermometer equipped with additional features may be useful for:

    • amateur weather forecasters: without leaving your home, you can monitor all weather indicators and receive highly accurate data;
    • weather-dependent people: early prediction of weather changes will help predict well-being and adjust plans or take necessary medications on time;

    • gardeners: understanding the nuances of weather conditions will allow you to take care of the plants in time, choose the best time for planting or harvesting;
    • extreme sports enthusiasts: understanding the upcoming weather conditions will help you choose the best day for paragliding, surfing and other activities that depend on the strength of the wind;
    • people whose work and hobbies depend on weather conditions: you will be able to make plans in time and choose a good day to achieve your goals.

    Types of electronic thermometers with a remote sensor

    One of the important advantages of such thermometers is their mobility. You can not only place the main display anywhere in the room and change the location according to your mood and need, but even carry it with you.


    Desktop Wireless Digital Thermometer

    The most popular options:

  • Desktop electronic thermometer. You place the stylish display on a table, window sill or shelf and always get the information you need quickly and easily.
  • Wall-mounted electronic thermometer. With this option, you can hang the display on the wall. Modern models fit well into any interior; thermometers with a clock are especially convenient in this context.
  • Portable electronic thermometer. Such models, in particular, are in the RST line of digital thermometers: they are no larger in size than a regular smartphone, easily fit into a pocket and are convenient to carry with you if necessary.

  • Using electronic thermometers with a remote sensor for a bath

    The peculiarity of a bath or sauna in conditions of high temperature and humidity within the premises. Therefore, it is extremely important to accurately measure and maintain the desired temperature. Electronic thermometers for measuring temperature with a remote sensor are optimally suited for this purpose.

    Advantages of thermometers with remote sensors for baths

    The following characteristics make electronic thermometers with remote sensors ideal for baths:

    • resistance to temperature changes and exposure to very high temperatures;
    • adaptability to high humidity;
    • high strength, protection from mechanical damage;
    • if accidentally touched, the device body will not leave burns on the skin - it does not heat up to such an extent;
    • minimum error rate.

    Features of thermometers with remote sensors for baths

    The variety of models allows you to choose the best option for your purposes, but there are several general recommendations to help you choose the optimal model:

    • a remote thermometer sensor for a bath can be wired or wireless: in the second case, information from the sensor is sent to the main unit using radio waves;
    • in a bathhouse, an important indicator is not only temperature, but also air humidity - to measure this too, pay attention to a thermometer-hygrometer;
    • pay attention to the additional functions of bath thermometers: for example, the device can notify you with a sound signal when the set temperature is reached;
    • in the case of a remote sensor, the sensor itself is installed in the steam room, and the thermometer with indicators is mounted at the entrance - in the rest room or dressing room; thus, the temperature inside the room can be found at the entrance to the bathhouse;

    • electronic thermometers can withstand temperatures from -50 to +200°C, which allows them to function without interference in a steam room;
    • many models allow you to connect up to three wireless sensors to one main display;
    • the distance at which the sensors transmit information to the main body of the device is up to 40 m;
    • thermometers for baths are made of heat-resistant plastic and steel, so they are not afraid of the extreme conditions of the steam room;
    • The error in readings of electronic thermometers does not exceed 0.5°C.

    Why do you need a humidity sensor?

    For bathing procedures, not only temperature, but also air humidity is of great importance. Therefore, knowing both of these characteristics, you can create an optimal microclimate in the bathhouse.

    If humidity is high, the air temperature should not exceed 40°C. In case of low humidity levels, the temperature can reach 80°C.


    Thermometers for baths: comparison of manufacturers and types

    Each of the models has its own characteristics. Pay attention to the following that are relevant for working in conditions of high temperature and humidity and convenient for use in a bath:

    • electronic RST models have increased resistance to high temperatures;
    • Sawo thermometers are characterized by a variety of models and shapes, while the bodies of all products are made of high-quality wood - cedar, oak, pine and other species;
    • when choosing between capillary, dial and digital options, you should prefer to purchase a digital thermometer with a remote sensor - they are more expensive than other models, but they are safe, clear and have the highest accuracy of readings.

    Features of installing thermometers for baths

    To ensure that the thermometer functions properly and the readings are accurate, follow these rules:

  • Mount the thermometer on the wall, at a height of about one and a half meters.
  • Choose a place equidistant from both heat sources and doors and windows that are sources of cold.
  • How to make an electronic thermometer with your own hands

    If you feel the urge to invent, you can learn how to create a digital thermometer with your own hands. As a result, you will receive a working device connected to the computer via a port. Thus, you can both maintain the required temperature in the aquarium, incubator, storage room and other premises, and monitor and further analyze changes in the weather outside.


    Moreover, creating a digital thermometer with a remote sensor with your own hands allows you to connect several sensors to one two- or three-wire line. As a result, you minimize costs while still being able to monitor and regulate temperatures in multiple locations at once.

    What you need to assemble an electronic thermometer with a remote sensor yourself

    To successfully create a device you will need:

    • temperature sensor - for example, Dallas SD1820, one or more;
    • two Schottky diodes;
    • zener diodes for 3.9 V, 6.2 V and 5.6 V;
    • one diode 1N4148;
    • one 10uF capacitor at 16V;
    • one resistor 1.5 kOhm 0.25 W;
    • housing for connector;
    • nine-pin female COM port connector.

    With the proper skill, parts can be installed directly on the connector - this option is the most convenient and practical.

    As a result, you get a thermometer that operates in the temperature range from -55 to +125°C with an absolute conversion error of less than 0.5°C. The maximum full conversion time is approximately 750 ms.

    The required voltage value to power the device through a separate external output is from 3 to 5.5 V. The thermometer is placed in a TO-92 transistor housing.


    Software for operating an electronic thermometer

    The finished device does not require sensor calibration. All that remains is to connect the sensor to the computer port, after which a temperature measurement program is needed. A suitable option is Temp.Keeper: it allows you to monitor the temperature of various objects and environments depending on the placement of sensors.

    Electronic thermometers: reviews of work

    Before you buy electronic device, it is important to weigh the pros and cons. And here you should pay attention to experience real people who have been using the device for a long time.


    According to user reviews, there are two main aspects that are advised to be taken into account when purchasing:

  • Make sure the thermometer you purchase is moisture resistant. Unfortunately, not all models have this characteristic, which is of fundamental importance if you are going to use an electronic thermometer to measure temperature outside.
  • When purchasing, ask how long the battery lasts. Learn how to remove and put batteries back in so you can easily replace them if necessary. This is evidenced by the fading of the display numbers. If there are two batteries, check which one is dead and replace it - it often happens that only one of the batteries requires replacement, which saves money.

  • From their own experience, users highlight the following useful functions:

    • built-in hygrometer for measuring air humidity outside the window, because without this indicator it is difficult to maintain a comfortable indoor microclimate; however, most thermometers measure air humidity only indoors, so a thermometer with a remote sensor is relevant for you;
    • a household home thermometer with a hygrometer allows you to navigate weather conditions much more accurately and will become a real home weather station, because the indicators in your area may differ markedly from the one where meteorologists take measurements;
    • the presence of a hygrometer allows you to monitor climate change outside during the day and, for example, choose the right moment to ventilate the room;
    • By comparing humidity readings, you can determine the source of dampness in the room.

    Thus, modern thermometers with a remote sensor are not limited to simply measuring the temperature outdoors or indoors and allow you to analyze weather indicators in any conditions.