Design and implementation of infrared thermometer based on STM32

Publisher:那是一条路都Latest update time:2014-09-05 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Infrared thermometer is a new type of temperature measuring instrument that combines infrared technology with microelectronics technology. Compared with traditional contact temperature measuring instruments, it has a series of advantages such as high temperature measurement accuracy, non-contact, no influence on the temperature field of the measured object, fast response speed and good stability. It is widely used in the fields of electricity, petroleum, chemical industry, medical treatment, etc. [1].

Pyroelectric infrared thermometer is a new type of infrared thermometer that works by using the pyroelectric effect. Compared with other traditional thermometers, it has the advantages of no need for refrigeration, ability to work at room temperature and wide spectral response, and has high sensitivity, fast response speed and strong anti-interference ability [2]. This paper uses pyroelectric detectors and combines the advantages of low power consumption, high performance and low cost of 32-bit ARM core processor to design an infrared thermometer with ARM microcontroller STM32 as the core.

1 Principle of infrared temperature measurement

All objects with a temperature higher than absolute zero are constantly emitting infrared radiation energy to the surrounding space. The size of the radiation energy and the distribution of its wavelength are closely related to its surface temperature. According to Wien's displacement law, for an object with a temperature of Tc, the ratio Z of the monochromatic radiation power corresponding to wavelengths λ1 and λ2 is expressed by the following formula: 2 Overall composition


Since this system needs to measure the surface temperature of a high-temperature object, a colorimetric temperature measurement scheme is adopted, that is, the ratio of the brightness of monochromatic radiation of the same object under two wavelengths changes with temperature as its temperature measurement principle. The structure of the infrared thermometer is shown in Figure 1, which mainly consists of an optical system, an infrared detector, signal processing and display output. The optical system completes the collection of light and determines the size of the field of view. The infrared detector is used to convert the infrared energy focused on the detector into an electrical signal, which is amplified, filtered, and then sent to the microcontroller for analog-to-digital conversion and signal processing. Finally, it is converted into the temperature of the measured target after temperature compensation and calibration and displayed on the LCD. 2.1 Microcontroller STM32 The STM32 series is based on the ARM Cortex-M3 core designed specifically for embedded applications that require high performance, low cost, and low power consumption. It also has a 512 KB high-speed Flash memory, which integrates 3 12-bit ADCs, 1 2-channel 12-bit DAC, and up to 11 timers, including two 16-bit PWM advanced control timers with dead zone control and emergency brake for motor control. This controller can be used to quickly perform data processing tasks such as digital filtering and temperature compensation [3]. 2.2 Optical system This part adopts a typical Newton system in the reflective optical system. Compared with the transmission and transmission-reflection combined systems, this system has less light energy loss, no chromatic aberration, simple structure and easy processing. 2.3 Detector and chopper design This system uses a pyroelectric sensor. At present, the core components of pyroelectric sensors, pyroelectric materials, mainly include lead zirconate titanate PZT, barium strontium titanate (BST) and lead tantalate scandate (PST). Here, BST film is selected. Compared with pyroelectric materials, pyroelectric film has the advantages of small size, light weight, high resolution, fast response and compatibility with microelectronics technology. Because the received radiation is very weak and the DC amplifier has zero drift, the radiation energy must be modulated before the radiation signal reaches the sensor to convert it into an alternating signal. The fan-shaped modulation disk used in this system drives the stepper motor with a square wave signal with a duty cycle of 50% generated by the pulse width modulator output port PA8 of STM32. 2.4 Signal conditioning The signal amplification circuit is divided into a preamplifier circuit and a post-amplifier circuit. In particular, the noise coefficient of the preamplifier plays a decisive role in the noise of the entire detection system. The amplifier used in this design is OP07 produced by MAXIM, USA. OP07 is an ultra-low offset operational amplifier (generally about 10 μV), with a common-mode input impedance of up to 200 MΩ and an output impedance of only 60 Ω, which can meet the needs of system design. Since the input signal range of the A/D converter of STM32 is 0-3.3 V, it is necessary to select a suitable amplification factor so that the corresponding output voltage is within 3.3 V when the highest temperature is measured. When the signal is amplified by the amplifier, its broadband noise is large. Therefore, a bandpass filter is added between the preamplifier and the post-amplifier to suppress the broadband noise and improve the signal-to-noise ratio. However, the bandwidth of the bandpass filter should be wider, otherwise when the temperature changes, the signal spectrum will easily deviate from the passband of the filter and cause measurement errors [4]. According to the needs of this system, the system uses a second-order Butterworth bandpass filter, whose center frequency is designed to be 100 Hz and the bandwidth is about 20 Hz. [page] 2.5 Detection circuit The electronic switch detector is used in this design. Compared with the analog multiplier detector, it has the advantages of simple circuit, higher accuracy, fast operation speed and no nonlinearity. The specific circuit is shown in Figure 2. As can be seen from Figure 2, the input signal V4 is the output signal of the sensor amplified by the main amplifier, V5 is the pulse signal sent by the PWM port of STM32, which is used for chopping modulation after phase shifting; V6 is the inverting voltage of V5, which is achieved by adding an inverter. In the figure, R27=R28=R29=R31=R32=0.5 R33, when V5 is high level, Q2 is turned on, and the in-phase end of OP07 is grounded; when V5 is low level, Q2 is turned off, the inverting end of OP07 is grounded, and the output voltage is 0.5. After the above circuit, the signal is still mixed with noise, which is mainly eliminated by low-pass filters. 2.6 Temperature compensation unit Since the system is affected by the ambient temperature, it is necessary to perform temperature compensation on the system. This system uses the integrated temperature sensor AD592, which is a high-performance integrated temperature sensor from AD Company in the United States. It has the advantages of high accuracy, small nonlinear error, and wide input range. The adjustable resistor R2 in the system is used to calibrate the output voltage V2. When the ambient temperature is 0, the output voltage V2 is 0; R5 is used to calibrate the temperature coefficient. After calibration, the output voltage V2 is the product of the temperature coefficient and the ambient temperature, and is connected to the ADC port PC0 of the STM32. 2.7 Analog/digital conversion unit The STM32 has three built-in 12-bit analog/digital converters (ADCs). Each ADC has up to 21 external channels and can realize single or scan conversion. In the scan mode, it automatically performs conversion on a selected set of analog inputs [5]. The measurement range of its A/D converter is 0~5 V. Because the operating frequency of this system is 150 Hz and the sampling is 10 times per cycle, the conversion rate of ADC is set to 1.5 kHz. The system uses PC1 port to sample the voltage. 2.8 Input and output unit STM32 has up to 80 multifunctional bidirectional I/O ports, so 5 independent keys can be used when designing the keyboard, namely power on, Celsius and Fahrenheit temperature conversion, emissivity correction and backlight display keys. The LCD display uses character LCD NT7502 display. The microprocessor sends data/commands to NT7502 through an 8-bit serial interface, and uses GPIO to realize the LCD read and write control timing and data signal to complete the operation control of the LCD. At the same time, it can be used to display the value of the ambient temperature. The LCD display interface circuit is shown in Figure 3. 3 System software design The system software design adopts a modular design, including the control program of the stepper motor design, the detection of the target temperature, the recognition of the key, the LCD drive, the sampling of the data, and the data processing algorithm. The flow of the entire temperature measurement process is shown in Figure 4. 4 Calibration of infrared thermometer Infrared thermometer must be calibrated to correctly display the temperature of the measured target. Traditional calibration methods such as table lookup and curve fitting method not only need to measure multiple temperature points, but also have low accuracy and large errors. In the calibration process of this system, a three-layer BP neural network algorithm is used to calibrate the temperature measurement data, which has the ability of self-learning and adaptive information parallel processing. In the calibration process, a black body furnace is used to simulate the measured target and collect the size of the signal voltage at different temperatures. After repeated measurements, the temperature measurement range is 800℃~1500℃ in the working environment temperature of 10℃~50℃. A comparative experiment was carried out with platinum-rhodium thermocouples on a medium-frequency vacuum induction melting furnace. The system has an accuracy of ±1‰, a resolution of 0.5℃, and a response time of less than 50 ms, which basically meets the initial design requirements of the system. This paper develops an infrared thermometer based on the principle of colorimetric temperature measurement. Compared with other thermometers, it can offset the influence of emissivity on temperature measurement accuracy, making the measurement result closer to the actual surface temperature of the object to be measured. Because it uses a 32-bit STM32 as the processing chip, compared with other 8-bit or 16-bit processors, the data processing capability is greatly enhanced, the temperature measurement performance is greatly improved, and the size of the thermometer is reduced. It has the advantages of simple structure, easy operation, good reliability and low price.


















































Reference address:Design and implementation of infrared thermometer based on STM32

Previous article:Digital Temperature Measurement System Based on ARM and DS18B20
Next article:Design of embedded greenhouse environment monitoring system based on UML

Recommended ReadingLatest update time:2024-11-16 21:34

STM32F4 study notes 5——The highest bit error of the data sent by the stm32 serial port
        Recently, I encountered a problem with the data transmission of the stm32 serial port when doing ModBus protocol communication based on the stm32f401 serial port. I spent a whole day looking for the problem, from the ModBus protocol format, scheduling algorithm to the serial port configuration, and finally sol
[Microcontroller]
Simple use and precautions of Stm32 platform UCOSII
1. Several concepts related to UCOSII: task priority, task stack, task control block, task ready list and task scheduler       Task priority is a concept that is easy to understand. In UCOS, each task has a unique priority. The unique identifier of a task. In UCOSII, when using the CPU, tasks with higher priorities
[Microcontroller]
Simple use and precautions of Stm32 platform UCOSII
STM32 NVIC learning
   NVIC_InitTypeDef NVIC_InitStructure;   /* Configure the NVIC Preemption Priority Bits */    /* Configure one bit for preemption priority */   /* The priority group specifies the number of bits used for preemption priority and the number of bits used for subpriority, here 1 and 7 */      NVIC_PriorityGroupConfig(NVI
[Microcontroller]
STM32 internal FLASH operation summary
The FLASH of stm32 is divided into three parts: main storage block, information block and flash memory interface register. The main memory block is used to store specific program code and user data. The starting address is 0x08000000, b0 and b1 are connected to GND and the program starts here. The information bloc
[Microcontroller]
STM32 IO configuration lighting
1. Specific code of led.c: /*----------------------------------------------------------*/ #include "led.h"   /* ------------------------------------------------------------------------- File name: led.c Description: Configure the LED port according to the hardware connection and open the corresponding register ----
[Microcontroller]
Understanding of STM32's nvic
例程:  /* Configure one bit for preemption priority */   NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);      /* Enable the WAKEUP_BUTTON_EXTI_IRQn Interrupt */   NVIC_InitStructure.NVIC_IRQChannel = WAKEUP_BUTTON_EXTI_IRQn;   NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = PreemptionPriorityValue;   NVIC_InitStr
[Microcontroller]
Understanding of STM32's nvic
Case Study: KST3420 and KST3220 use ST's FlightSenseToF sensor and STM32 for rapid prototyping
Case Study: KST3420 and KST3220 use ST's FlightSenseToF sensor and STM32 for rapid prototyping The KST3420 and KST3220 are distance measurement sensors developed by KS Technologies (also known as KST), an authorized member of the ST Partner Program, and are also an applicat
[sensor]
Case Study: KST3420 and KST3220 use ST's FlightSenseToF sensor and STM32 for rapid prototyping
STM32 startup file ld md hd cl vl xl analysis and selection
To put it bluntly, the following are the differences. There are selective differences when choosing the startup file! startup_stm32f10x_cl.s Interconnected STM32F105xx, STM32F107xx startup_stm32f10x_hd.s Large capacity STM32F101xx, STM32F102xx, STM32F103xx startup_stm32f10x_hd_vl.s Large capacity STM32F100xx startup_s
[Microcontroller]
STM32 startup file ld md hd cl vl xl analysis and selection
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号