Real-time Temperature Control Based on Combination of AVR Microcontroller and Temperature Sensor

With the development of computer technology, especially the one-chip microcomputer technology, the temperature has a great influence on people's life and work, so the temperature must be collected in real time and analyzed. To achieve this, real-time and accurate measurement monitoring. Data is transmitted using the serial port and analyzed on the PC. Due to the advantages of convenient, simple and flexible control of the single-chip microcomputer, the high-performance avr single-chip microcomputer is used to control the GTJ4-10A solid state relay, and the most total temperature control is achieved. Thus, the temperature curve is always drawn on the PC and the data is saved and analyzed.

1 System composition and basic principle

The system consists of temperature acquisition module, solid state relay control module, single chip module, PC software processing module. Four modules add up to achieve temperature control, as well as temperature acquisition and temperature-software analysis. Their logical relationship is shown in Figure 1.

The task of this system is to collect the temperature of a particular environment, save it and display it again, and control the solid state relay through the SCM to control the temperature value. Then the current temperature is displayed in real time through the PC and the current Temperature analysis and preservation. Easy to compare with other temperature values. First of all, the GTJ4-10A solid state relay is controlled by the ATmega16 microcontroller to control the AC power and reach the control temperature value. At this time, the current temperature value is collected by the DS18B20 temperature sensor. The collected data results are sent to the MCU via Tx. The temperature value reached by the MCU is sent to the computer through the serial communication port. On the other hand, the temperature data is compared and analyzed, and then the GTJ4-10A solid state relay is controlled by the IO. In order to achieve the temperature control. On the other hand, the temperature value obtained by the PC is sent to the MFC software for drawing the temperature curve, and the temperature value and the time for collecting the current temperature are recorded by the save button. Then display the temperature and time through the display button. This is the real-time acquisition and analysis of temperature.

2 hardware design

This system mainly uses high-performance AVR microcontroller, GTJ4-10A solid state relay, DS18B20 temperature sensor, and alarm output circuit. The main system circuit diagram is omitted.

2.1 Introduction to ATmega16 Microcontroller

The ATmega16 is a low-power 8-bit CMOS microcontroller based on the enhanced AVR RISC architecture. Due to its advanced instruction set and single clock cycle instruction execution time, the ATmega16's data throughput is as high as 1 MIPS/MHz, which can slow down the system's power consumption and processing speed. The ATmega16AVR core has a rich instruction set and 32 general-purpose working registers. All registers are directly connected to the arithmetic logic unit (ALU) so that one instruction can simultaneously access two independent registers within one clock cycle. This structure greatly improves code efficiency and has up to 10 times higher data throughput than a typical CISC microcontroller. Therefore, it is possible to perform data transmission and control of the relay and temperature acquisition.

2.2 Temperature Acquisition Module

DS18B20 adopts Dallas's unique single-bus protocol, the temperature conversion result can be selected as 9-12 bits, and the maximum conversion time is 750 ms when the conversion result is 12 bits. It can be judged whether the conversion is completed by reading the status value of DS18B20. The temperature range is -55 to +125°C, and the accuracy is within ±0.5°C.

2.3 Solid State Relay Control

The relay module unit is controlled by the IO port of the SCM, so that the calculator of the SCM counts. When the ambient temperature needs to be heated, we allow the relay to work through IO. When the value reaches a certain value, the relay IO port is given a low level, so that the microcontroller can pass through the microcontroller. And the use of relays to achieve the role of weak points to control the exchange of electricity, here is the use of a single-chip PWM to achieve control, so as to achieve the size of the temperature control. The specific circuit diagram is shown in Figure 2.

Real-time Temperature Control Based on Combination of AVR Microcontroller and Temperature Sensor

2.4 Alarm output circuit

The alarm output circuit controls the 8550 transistor through the PA6 port of the microcontroller to control the buzzer. When the temperature reaches a certain value, the buzzer alarms. At this time, the microcontroller is notified to stop heating, and then the solid state relay controls the heating device so that the temperature is maintained near a constant temperature value. If the temperature value is lower than a certain value, the SCM informs the heating device of heating. This principle is controlled by the collected temperature value, so as to meet the requirements of the user.

Green Light Film

Eye protection:The principle of chlorophyll defocusing is adopted to prevent the eyeball from focusing for a long time, effectively alleviate eye fatigue, and achieve better eyesight protection.

Anti-blue light, ultraviolet light:The Green Light Film can actively filter the target wavelength while providing a band in the range of 380-400nm. It can effectively block 100% harmful light.

Edge coverage:The soft material fully covers the edges of any device, so it can be affixed to curved screen and round edges, 100% provides excellent edge coverage, and there is no gap between the edges of the device.

Oleophobic and waterproof:The oleophobic coating surface of the Green Light Screen Protector can provide your phone with oleophobic and waterproof properties, which can prevent sweat, grease residue, and fingerprints.

Sensitive touch:The 0.14mm ultra-thin film does not interfere with the touch response, almost as if it does not exist. When using a mobile phone, the fingertips can be easily swiped, bringing you a comfortable gaming experience.

Green Light Film,Green Light Screen Protector,Anti Green Light Screen Protector,Anti-green Light Screen Protector

Shenzhen Jianjiantong Technology Co., Ltd. , https://www.tpuscreenprotector.com