Company Details

  • Xi'an Gavin Electronic Technology Co., Ltd

  •  [Shaanxi,China]
  • Business Type:Manufacturer , Trade Company
  • Main Markets: Africa , Americas , Asia , Caribbean , East Europe , Europe , Middle East , North Europe , Oceania , West Europe , Worldwide
  • Exporter:61% - 70%
  • Certs:ISO9001, CE, RoHS
Inquiry Basket ( 0 )

Xi'an Gavin Electronic Technology Co., Ltd

Home> Industry Information> Real-time Temperature Control Based on Combination of AVR Microcontroller and Temperature Sensor

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

February 17, 2022

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.

The above is the Real-time Temperature Control Based on Combination of AVR Microcontroller and Temperature Sensor we have listed for you. You can submit the following form to obtain more industry information we provide for you.

You can visit our website or contact us, and we will provide the latest consultation and solutions

Share to:

Send Inquiry

Home> Industry Information> Real-time Temperature Control Based on Combination of AVR Microcontroller and Temperature Sensor
Communicate with Supplier?Supplier
Coco Ms. Coco
What can I do for you?
Contact Supplier