Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Thermometer with timer or thermostat control function. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Power regulators, thermometers, heat stabilizers

Comments on the article Comments on the article

Descriptions of various electronic digital thermometers have been repeatedly published on the pages of Radio magazine. As a rule, they contained a temperature-to-frequency converter and non-discrete digital measuring elements that convert the measured frequency into temperature readings. A temperature-frequency converter built on non-discrete elements requires calibration and allows achieving acceptable accuracy in a rather limited range (due to the non-linearity of the temperature characteristics of the elements). The use of modern element base - microcontrollers and special sensors - greatly simplifies the circuitry of the device while increasing the functionality and accuracy of measurements.

The schematic diagram of the proposed thermometer is shown in fig. one.

Thermometer with timer or thermostat control function

Its basis is the popular microcontroller (MK) PIC16F84A (DD1). To measure the temperature, an integral digital sensor (VK1) DS18B20 from MAXIM was used. This chip does not require calibration and allows you to measure the ambient temperature from -55 to +125 °C, and in the range -10 ... +85 °C, the manufacturer guarantees an absolute measurement error no worse than ±0,5 °C. The DS18B20 sensor is the most advanced of the well-known DS18X2X family, previously produced under the Dallas Semiconductor brand. Unlike functional analogues DS1820 and DS18S20, before starting the measurement, it allows you to set the required relative accuracy of temperature conversion from the following range of values: 0,5; 0,25; 0,125 and 0,0625 °C, while the measurement time is 93.75, respectively; 187,5; 375 and 750 ms.

The principle of operation of the DS18X2X sensor is based on counting the number of pulses generated by a generator with a low temperature coefficient in the time interval, which is formed by a generator with a different temperature coefficient, while the internal logic of the sensor takes into account and compensates for the parabolic dependence of the frequencies of both generators on temperature.

The exchange of control commands and data between the sensor VK1 and MK DD1, operating at a frequency of 4 MHz, is carried out via a single-wire bidirectional data bus 1 - Wire. Each DS18B20 has a unique 48-bit serial number, laser-etched into ROM during manufacturing, allowing virtually any number of these devices to be connected to the same bus. The limiting factor is mainly only the total time spent to sequentially poll all sensors connected to the network.

With a period equal to 1 s, MK DD1 sends a command to the VK1 sensor to start the temperature measurement process with an accuracy of 0,0625 ° C and receives from it the result of the previous measurement. The 12-bit code received by the transmitter, corresponding to the measured temperature, is converted to decimal form, rounded to tenths of a degree and displayed on the HG1 LED indicator in dynamic mode. Applying voltage log. 0 to one of the RAO, RA1 or RA2 outputs, the MK turns on the corresponding bit of the indicator, while outputting the seven-element code of the digit displayed in this bit to the RBO-RB6 outputs. The control of the point on the indicator, which separates the integer part of the displayed temperature from the decimal one, is performed by the MK through the open-drain output RA4. The display period of all three digits of the indicator is approximately 12,3 ms (frequency - 81 Hz).

Since the device uses a three-digit indicator, in the range from -19,9 to +99,9 °С the temperature is displayed with an accuracy of 0,1 °С, and in the intervals -55...-20 and +100...+ 125 °С - accurate to 1 °С. In addition, in these intervals, the absolute error of temperature measurement increases to ±2 °C, so the temperature display with an accuracy of tenths of a degree loses its meaning.

At the end of each period of displaying information on the indicator, the MK checks the status of the buttons SB1 and SB2, for which it sets the voltage to a high logic level at the RAO-RA2 outputs (this corresponds to turning off all bits of the HG1 indicator), and at the output RA4 - the voltage is log 0. Bits RB5, RB6 are reconfigured for input, while internal "pull-up" resistors connected to the +5 V power bus are connected to them. Thus, when you press the SB1 or SB2 button, the high logic voltage level on RB5, RB6 is replaced by a low one, which is monitored by the MK. The elements of the LED indicator connected to these bits do not have a significant effect on the state of the indicated inputs of the MC, since the current in the opposite direction through them is negligible. Keeping the buttons pressed does not affect the operation of the indicators during the display of information, since the current between the outputs RA4 and RB5, RB6 through the buttons SB1, SB2 is limited by resistors R4, R5.

The device is powered by 220 V AC mains through a ballast capacitor C3. Thanks to the diode bridge VD1, both half-waves of the mains voltage pass through the zener diode VD2. As a result, the voltage ripple on the capacitor C5 is significantly reduced and it becomes possible to reduce the capacitance of the capacitor C3, which determines the maximum current supplied by the power source to the load.

The timing circuit R1C4R2 forms a pause before starting the MK, which is necessary so that after the device is turned on in the network, the voltage on the capacitors C5, C6 has time to increase to a level that ensures the normal operation of the MK.

When the sound signal is turned on, when the cascade on the transistor VT1 comes into operation with the sound emitter HA1 included in its collector circuit, the current consumed by the device increases significantly, therefore, the MK program provides for turning off the indicator for the duration of the signal. This cascade is powered by the energy accumulated in the capacitor C5, which leads to large "drawdowns" of the voltage on it. To maintain a stable supply voltage of the MC and the temperature sensor, an integral voltage regulator DA1 and a high-capacity oxide capacitor C6 are introduced into the device. If an audible alarm is not needed, the DA1 chip and capacitor C5 can be excluded, but in this case D815E (VD2) must be replaced with a D815A zener diode with a stabilization voltage of 5,6 V.

Codes "firmware" ROM MK for a thermometer with a timer function are shown in Table. one.

Thermometer with timer or thermostat control function
(click to enlarge)

When the SB1 button is pressed, a short beep sounds and the display shows the value of the remaining time until the sound signal sounds or 0 (in the least significant digit) if the time in the timer has not been set. The required time delay (within 1 ... 99 min; enter by pressing the SB2 button (without releasing SB1). In this case, the indicator readings begin to automatically increase at a frequency of 2 Hz. When the desired value is reached, the buttons are released. Return to the temperature readings occurs after 1 s after releasing the button SB1.At the end of the set time, the device emits an intermittent sound signal with a frequency of 10 Hz for 1500 s.

In table. 2 shows the codes of the "firmware" of the MC, endowing the described device with the function of controlling a thermostat that maintains a given temperature in a controlled environment with an accuracy of ±1 °C.

Thermometer with timer or thermostat control function
(click to enlarge)

Viewing and setting the temperature (in the range of -54 ... +124 ° С) are carried out, as in the previous case, using the buttons SB1 and SB2. The set temperature value is stored in the non-volatile data memory of the MK and loaded from it each time the device is connected to the network.

When the device is operated with a thermostat, the signal to control the heater or refrigerator compressor is removed from the RA3 output, while instead of the cascade, an optotriac relay is installed on the transistor VT1, which controls the power supply of the actuator or contactor, which, in turn, connects the heater or compressor to the mains. A diagram of a possible variant of such a relay is shown in fig. 2.

Thermometer with timer or thermostat control function

Given in table. 2 "firmware" MK is designed to control the heating element. For example, if the set temperature in the thermostat is +30 ° C, then a log signal will appear at the output of RA3 MK. 1 (corresponds to turning on the heater) when the temperature of the controlled medium drops below +29 °C, but as soon as the temperature rises to +31 °C, the heater will be turned off. Thus, the hysteresis between turning the heater on and off is 2 °C. The first underlined byte (02) in Table 2 is "responsible" for its value. 01: if it is changed to "1", the hysteresis will decrease to 03 °C, and if it is replaced by "3", it will increase to XNUMX °C, etc. The smaller the hysteresis, the more accurately the set temperature will be maintained in the controlled environment, but more often cycles of switching on and off of the actuator will be repeated, and vice versa.

When controlling the refrigerator compressor, the signal is log. 1 at the output of RA3, which includes the cooling system, should appear if the temperature exceeds the specified limit, and be replaced by a log level. 0 as soon as the temperature falls below the specified limit, again taking into account the hysteresis specified by the value of the first underlined byte in Table. 2. To implement this mode of operation, the underlined 2nd, 3rd and 4th bytes of the table must be replaced by "19", "15" and "11" respectively

Source texts of programs

When programming the MK, you must specify: generator type - HS, WDT and PWRT timers - enabled.

All parts of the thermometer are mounted on a printed circuit board made of double-sided foil fiberglass (Fig. 3).

Thermometer with timer or thermostat control function

The board is designed to install MLT resistors, capacitors KD (C1, C2), K73-17V with a rated voltage of 400 V (C3), KM (C7) and K50-35 (the rest). To reduce the dimensions of the device, the parts are installed on both sides of the board (where their reference designations are indicated). Wire jumpers are soldered into the holes of the contact pads, marked on the drawing with a nearby dot, during installation (their function is also performed by the output of the capacitor C7). The three-digit LED indicator HG1 is assembled from three single-digit LSD3212-20 (green glow) and can be replaced by any other with a current consumption of not more than 20 mA per element (segment). Before installation in place, the leads of 12 indicators are cut off in the immediate vicinity of the case.

The integrated stabilizer 78L05 (DA1) can be replaced by any other with a stabilization voltage of +5 V. The HA1 sound emitter capsule is any small-sized one with a winding with a resistance of 8 ... 25 Ohm (the author used the HC0903A electromagnetic emitter).

If you intend to use a thermometer in harsh climatic conditions, oxide capacitors C5 and C6 should be selected with an extended temperature range (marked on the case "+105 ° C" or higher), and MK PIC16F84A - E / P version, indicating that this microcircuit can work at temperatures from -40 to +125 °C. In this case, the mounted thermometer board is placed in a sealed plastic case and filled with a sealant (for example, epoxy). The holes for the buttons on the inside are sealed with a piece of thin rubber, after which, on both sides of the resulting rubber membrane, above the buttons SB1 and SB2, plastic circles with a diameter slightly smaller than the diameter of the holes in the case are glued. Thus, complete isolation of the device elements from the external environment is ensured. When using the device under normal conditions, sealing can be omitted.

It is impossible to place the temperature sensor inside the thermometer case, as this will lead to an increase in the measurement error (due to heating of the elements) and the inertia of the thermometer readings when the ambient temperature changes. One design solution is to place the sensor chip inside a suitably sized glass drug ampule. The exit points of the flexible cable from the ampoule and from the thermometer case are carefully filled with sealant. The length of a three-core cable can be from several centimeters to tens of meters.

Assembled from serviceable parts and without installation errors, the device does not need to be adjusted.

Author: S.Koryakov, Shakhty, Rostov region

See other articles Section Power regulators, thermometers, heat stabilizers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Mine detector in a boot 07.04.2003

The French engineer Christophe Keroleinen proposed a mine detector that not only signals the presence of a mine in the ground, but stops a person walking through a minefield.

Sensitive sensors are mounted in boots, the signal from them goes to the microprocessor mounted on the belt. Electrodes are glued to certain points of the leg muscles. When the microprocessor applies voltage to them, the muscles are paralyzed, and it is simply impossible to take the next step directly on the mine. All this happens in just 20 microseconds - much faster than a person could be aware of the beep of a mine detector.

The prototype device is being tested by the French army.

Other interesting news:

▪ ASUS Eee Tablet

▪ Tyrannosaurus Air Conditioner

▪ The memory effect of lithium-ion batteries

▪ New ATX specification from Intel

▪ Compact photorelays with increased insulation voltage 3,75 kV

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Instructions for use. Article selection

▪ Hercules article. Popular expression

▪ article How long ago and under what circumstances did the penny appear? Detailed answer

▪ article Conductor. Standard instruction on labor protection

▪ article Simulator of meow sounds. Encyclopedia of radio electronics and electrical engineering

▪ article Adjusting the Uout of a transformerless power supply. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024