High-precision infrared temperature measurement system based on single-chip microcomputer design

Publisher:yunhaoLatest update time:2014-10-17 Source: dzsc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  There are two main ways to measure temperature: one is the traditional contact measurement, and the other is non-contact measurement represented by infrared temperature measurement. Traditional temperature measurement not only has a slow response speed, but also must be in contact with the object being measured. Infrared temperature measurement uses infrared sensors as the core for non-contact measurement, which is particularly suitable for non-contact temperature measurement in high temperature and dangerous occasions, and has been widely used. This article will introduce in detail how to design a high-precision infrared temperature measurement system based on SOC-level microprocessors, and its application in power temperature detection and equipment fault diagnosis.

  1. Working principle of infrared thermometer

  All objects in nature with a temperature above absolute zero are constantly emitting infrared rays. The amount of infrared energy emitted by an object and its wavelength distribution are closely related to its surface temperature. The radiation energy of an object is proportional to the fourth power of the temperature, and the relationship between its radiation energy density and the temperature of the object itself conforms to Planck's law. Therefore, we can determine the surface temperature of an object by measuring the amount of infrared energy radiated by the object. Slight temperature changes will cause obvious changes in radiation energy, so the sensitivity of using infrared radiation to measure temperature is very high. In addition to relying on temperature and wavelength, the radiance of an actual object is also related to factors such as the material properties and surface state of the object. As long as a radiation coefficient that varies with the material properties and surface state is introduced, the basic law of black bodies can be applied to actual objects. This radiation coefficient is the emissivity ε, or the relative emissivity, which is defined as the ratio of the radiation performance of an actual object to that of a black body at the same temperature. This coefficient indicates the degree of closeness between the thermal radiation of an actual object and the radiation of a black body, and its value is between ε and ε.

  A value between 0 and 1.

  The working principle of the infrared thermometer is shown in Figure 1: The infrared energy radiated by the measured object is transmitted to the objective lens of the infrared thermometer through the air. The objective lens converges the infrared rays onto the infrared detector. The detector converts the radiation energy into an electrical signal, and then amplifies, shapes and filters the signal through the preamplifier and the main amplifier. After being processed by the A/D conversion circuit, it is input into the microprocessor. The microprocessor performs ambient temperature compensation, and drives the display circuit to display the temperature value after correcting the temperature value. At the same time, the microprocessor also sends out a corresponding alarm signal and accepts the emissivity input by the key to complete the emissivity setting.



  2. System hardware design

  This infrared temperature detection system is mainly composed of sensor A2PTMI, LM358 active filter circuit, AD conversion circuit, microprocessor, display circuit and other parts. Because the signal output by the sensor is 0-5V, which just meets the requirements of AD conversion, the amplifier circuit is omitted in this design, and only the sensor signal is filtered. In addition, this system also has a signal conversion circuit to output analog signals such as 4~20mA, 1~5V, and RS232 and RS485 interfaces to output digital signals to communicate with the host computer.

  2.1 Sensor A2PTMI principle and its application

  PerkinElmer A2TPMI is a multi-purpose infrared thermopile sensor with dedicated signal processing circuits and ambient temperature compensation circuits integrated inside. This integrated infrared sensor module converts the thermal radiation of the target into an analog voltage. The sensor has an optical system with a distance coefficient D:S=8:1. The infrared radiation in the air is received through the lens and then converted into a corresponding voltage signal, which is amplified by an 8-bit resolution programmable amplifier. According to the thermopile temperature measurement principle, the thermopile voltage may be positive or negative, depending on whether the target temperature is higher or lower than the ambient temperature of the A2TPMI. In order to enable negative voltage signals to be processed in a single power supply system, all internal signals are connected to the 1.255 V internal voltage reference (Vref) as a virtual analog ground signal. In order to adjust the bias voltage of the thermopile amplifier circuit, the amplifier has a programmable adjustment section that can generate a bias voltage with 8-bit resolution. In addition, the A2TPMI also integrates a temperature sensor to detect the ambient temperature. This signal is amplified to match the inverse characteristics of the thermopile amplification signal curve for signal processing. For temperature compensation, the amplified thermopile signal and the temperature reference signal are added to an amplifier. The temperature-compensated amplified signal is output to the VTobj pin, and the temperature reference signal or reference voltage is output to the Vtamb pin. The operating characteristics of the A2TPMI are configured by an internal random access register, and all parameters/configurations are permanently stored in the parallel E2PROM. The control unit provides a two-wire, bidirectional synchronous serial port (SDAT, SCLK) that can access the internal parameters of the A2TPMI in all registers. The A2TPMI sensor usually does not need to use the serial port, and the SDAT and SCLK pins are internally connected to VDD.

  2.2 Filter circuit design

  The A2TPMI amplifier uses chopper amplifier technology. Due to the characteristics of this technology, the output signals VTobj and VTamb contain about 10 mV peak, 250 kHz AC signals. These AC signals can be suppressed by an electronic low-pass filter circuit or similar software filtering. In high impedance load applications, rail to rail operational amplifier circuits such as LM358 can be used as filters for the output signals.

  The second type of filtering circuit is used in this design. Because the open-loop voltage gain and input impedance of the integrated operational amplifier are very high and the output impedance is low, the active filtering circuit has a certain voltage amplification and buffering effect, with good filtering effect, which improves the accuracy of the sensor signal.

  2.3 AD conversion circuit

  TLC2543 is a 12-bit switched capacitor successive approximation analog-to-digital converter. Its setting method is as follows: The 8-bit data serially input at the DATA INPUT terminal specifies the analog channel to be converted by TLC2543, the length of the converted output data, and the format of the output data. The upper 4 bits (D7 to D4) determine the channel number. For channels 0 to 10, the 4 bits are 0000 to IOIOH respectively. When they are 1011 to 1101, they are used for self-test of TLC2543. When they are 1110, TLC2543 enters the sleep state. The lower 4 bits determine the output data length and format. Among them, D3 and D2 determine the output data length. 01 indicates that the output data length is 8 bits, 11 indicates that the output data length is 16 bits, and the others are 12 bits. D1 determines whether the output data is sent out first with the high bit or the low bit first. 0 indicates that the high bit is sent out first. D0 determines whether the output data is unipolar (binary) or bipolar (2's complement). If it is unipolar, this bit is 0, otherwise it is 1. When the chip select CS changes from high to low, a working cycle begins. At this time, EOC is high, the input data register is set to 0, and the content of the output data register is random. At the beginning, the chip select CS is high, I/OCLOCK and DATAINPUT are disabled, DATAOU is in a high-impedance state, and EOC is high. When it becomes low, I/OCLOCK and DATAINPUT are enabled, and DATAOU is out of the high-impedance state. 12 clock signals are added from the I/OCLOCK end in sequence. As the clock signal is added, the control word is sent from DATAINPUT to TLC2543 one by one at the rising edge of the clock signal (the high bit is sent first), and at the same time, the A/D data converted in the previous cycle, that is, the data in the output data register, is shifted out from DATAOUT one by one. After TLC2543 receives the 4th clock signal, the channel number is also received. At this time, TLC2543 starts sampling the analog quantity of the selected channel and keeps it until the falling edge of the 12th clock. At the falling edge of the 12th clock, EOC becomes low and starts A/D conversion of the analog quantity sampled this time. The conversion time takes about 10t1s. After the conversion is completed, EOC becomes high. The converted data is in the output data register and will be output in the next working cycle. When the chip is interfaced with the microprocessor, it only needs to occupy four IO ports. The working timing of its 12 clocks can be found in the reference manual.


  2.4 Characteristics of SOC-level microprocessor This system uses SOC-level STC series single-chip microcomputers, whose instruction codes are fully compatible with traditional 51 single-chip microcomputers and whose operating frequency can reach 48HZ. The microprocessor used in this design has 6 clock cycles, so its operating frequency is equivalent to the 96MHZ of ordinary 51 single-chip microcomputers, which provides speed guarantee for this system. In addition, the STC89C58RD selected in this design contains a 32K program storage area and an internal expansion of 32K data FLASH memory, so that this design can easily expand related functions, such as parameter memory function. This microprocessor also supports IAP and ISP, and does not require a dedicated programmer, and the program can be debugged through an ordinary serial port. Anti-interference is also one of the reasons for choosing this single-chip microcomputer. This design is mainly used for temperature monitoring of industrial equipment, so anti-interference is very important. [page]

  3. System software design

  The software design of infrared temperature detection system mainly includes the following main modules: initialization module, I/O port query module, AD conversion module, data processing module, data correction module, display driver module, etc. In addition, there is an interrupt program processing module: 0 external interrupt, which is mainly used for parameter setting.

  The software design process is shown in Figure 3.


  The whole program is written in C51. The initialization module is mainly used to initialize the alarm signals of each channel, set the parameters such as emissivity to the default value and display them. The main program continuously scans the 12-bit digital signal sent by the AD conversion module through the I/O port query module. The communication method of the SPI bus is adopted in this program, and the serial interface method saves a large number of IO ports. After the received digital signal is processed by the data processing module, the temperature value is obtained by the table lookup method. The temperature value is corrected by the data correction module and sent to the display module for display, and the data is transmitted to the host computer interface for display, thus completing the temperature measurement of one channel. During the operation of the program, the parameters such as emissivity and alarm value can be set at any time. When the function key is pressed, the 0 external interrupt of the single-chip microcomputer is triggered, and the parameter setting button is scanned in the interrupt program, and the result is stored. After each temperature measurement is completed, the system transmits the temperature value to the host computer through RS485 and displays it on the VB interface.

  1 Experimental data processing and emissivity setting

  2 Least squares fitting of experimental data

  For a measurement system, its precision and accuracy are very important. Although this design uses 12-bit AD, which lays the foundation for the high precision of this design, due to the inevitable errors of sensors, AD and other electronic devices and external interference, the measurement results will inevitably have some deviations. Therefore, like studying other instruments, a large number of experiments were also carried out in this design, and the accuracy was further improved by processing the experimental data. The main method used is the least squares method of curve fitting. The principle is introduced as follows:

  In the best square approximation of a function, if f(x) is given only on a set of discrete points {xi, i=0,1,…,m}, then we need to perform curve fitting on the experimental data {(xi,yi), i=0,1,…,m}, where yi= f(xi). If the function y=S ((*)x) is required to fit the given data {(xi,yi), i=0,1,…,m}, then the error δi= S *(x)-yi. Let Φ 1(x), Φ2(x),…, Φn(x) be a family of linearly independent functions on C[a,b], and find a function S ((*)x in Φ =span{Φ1(x), Φ2(x),…, Φn(x)} that minimizes the sum of squared errors. Because the amount of experimental data is large, in actual operations, we can use mathematical tools such as MATLAB to complete curve fitting by calling or writing related functions, and finally select appropriate output results.

  4.2 Setting of emissivity ε

  According to the principle of infrared temperature measurement, we should first determine the emissivity of the object being measured during testing. In higher temperature measurement applications, the emissivity ε of the object being measured should be actually measured, otherwise serious errors will occur. For power equipment, its emissivity is generally between 0.85-0.95. What is measured is the blackbody radiation temperature of the object being measured. In actual measurement applications, the blackbody radiation temperature TP needs to be converted to the real temperature T. The conversion formula is: T=TPε-?

  The emissivity determination method is as follows: First, select an object to be measured and determine the actual temperature T of the object to be measured (for example, 300K). Of course, other temperatures can also be selected. The temperature value can be measured by a thermal resistor or other temperature measuring equipment. Then, align the temperature measurement system with the object to be measured to obtain a temperature value TP=T0. The set value of ε is obtained through the above formula; then the ε value is input into the system and tested again. By fine-tuning the ε value until T 0= T, the obtained ε value is the actual emissivity of the object. The actual emissivity ε of the same object to be measured is basically the same. If the material and shape of the object to be measured change, its emissivity will change, and its actual emissivity can be measured by the same method. This design has an emissivity setting and adjustment part, which can easily adjust the emissivity value. In this way, the same temperature measuring equipment can be used to adjust the emissivity to meet the temperature measurement requirements of various materials.

  6. Conclusion

  Non-contact infrared thermometers use infrared technology to quickly and easily measure the surface temperature of an object. Temperature readings can be quickly measured without mechanical contact with the object being measured. Just aim and read the temperature data on the display. Infrared thermometers are light, small, easy to use, and can reliably measure hot, dangerous or hard-to-reach objects without contaminating or damaging the object being measured. In addition, infrared thermometers can measure several readings per second, while contact thermometers take several seconds for each measurement. After experimental comparison, the error between this thermometer and the infrared thermometer produced by Fluke Corporation of the United States is within one degree, but this thermometer has a parameter setting function and is cheaper, so this thermometer has a higher cost-effectiveness. It has been used in power equipment to monitor the temperature of copper plates in high-voltage cabinets with good results.

  Innovative idea: Thermopile infrared sensors are applied to the temperature measurement system, and SOC-level microprocessor control is adopted to achieve fast and accurate measurement. The data of multiple temperature meters are managed uniformly by the database of the host computer, realizing a complex system with complete functions.

references:

[1]. LM358 datasheet http://www.dzsc.com/datasheet/LM358_1060605.html.
[2]. RS232 datasheet http://www.dzsc.com/datasheet/RS232_585128.html.
[3]. RS485 datasheet http://www.dzsc.com/datasheet/RS485_585289.html.
[4]. TLC2543 datasheet http://www.dzsc.com/datasheet/TLC2543_1116475.html.
[5]. STC datasheet http://www. dzsc.com/datasheet/STC_2043151.html.
[6]. STC89C58RD datasheet http://www.dzsc.com/datasheet/STC89C58RD_1.html.

Reference address:High-precision infrared temperature measurement system based on single-chip microcomputer design

Previous article:Monitoring method of battery temperature of communication power supply
Next article:Research on remote control system of switched reluctance motor based on single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号