Design of multi-point infrared temperature measurement system based on MLX90615 and STM32

Publisher:温暖的微风Latest update time:2013-10-09 Source: dzscKeywords:MLX90615 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  0 Introduction

  At present, the digital temperature sensor DS18B20 of DALLAS is widely used in multi-point temperature measurement systems. Its advantage is that only one bus is needed to complete the data exchange and control in the system. However, the DS18B20 has a slow response speed and low precision. In practical applications, when the number of DS18B20 connected to the bus exceeds 8, it is necessary to provide an independent power supply for each DS18B20, which makes system maintenance very difficult. Infrared temperature measurement technology has developed rapidly as a convenient and accurate non-contact temperature measurement technology. Infrared temperature measurement can realize continuous and real-time temperature monitoring of difficult-to-reach areas or dangerous areas within its field of view, effectively reducing the risk factor of temperature measurement operations; and it has the advantages of small size, high precision, networking and good real-time performance. This paper uses the digital infrared temperature sensor MLX90615 as the temperature detection device, and uses the STM32 microprocessor as the core to design and implement a multi-point infrared temperature measurement system.

  The advantages of this system are: high temperature measurement accuracy; measurement does not affect the distribution of the temperature field; non-contact temperature measurement reduces the risk factor; short response time and easy to achieve dynamic measurement.

  1 Basic principles of infrared radiation temperature measurement

  Infrared radiation is a type of light that is invisible to the human eye, commonly known as infrared light. It is light between red light and microwaves in visible light. Due to the movement of charged particles, all objects with a temperature above absolute zero are constantly emitting infrared radiation energy to the surrounding space, and the energy wavelength is mainly concentrated in the 0.6~15 μm band. The relationship between its radiation energy density and temperature conforms to the Stefan-Boltzmann radiation law:

  

  From formula (1), we can know that as long as the temperature and emissivity of an object are known, the radiant power it emits can be calculated. Conversely, if the radiant power of an object is measured, the temperature of the object can be determined. The output signal of the infrared sensor is the result of the combined effect of the target temperature To and the sensor's own temperature Ta:

  

  Where: the temperature unit is Kelvin; A is the instrument constant, which is related to the design structure of the sensor.

  2 Hardware Design

  The hardware part of the non-contact multi-point infrared temperature measurement system is mainly composed of an infrared sensor group, a microprocessor, other peripheral circuits and a PC. The infrared sensor converts the infrared radiation within its field of view into a digital signal, transmits the data to the STM32 microprocessor through the SMBus bus, and the microprocessor communicates with the host computer through a serial port to display the temperature data on the host computer.

  2.1 Infrared sensor part

  The sensor part uses the digital infrared sensor MLX90615ESG-DAA, which is a high-precision digital temperature measurement chip produced by Melexis. It has two output modes: PWM and SMBus. The normal working ambient temperature range is -40~85℃, and the temperature range of the measured object is -40~115℃. If a smaller temperature measurement range is required, the corresponding control word in the E2PROM can be modified through the SMBus bus to change this range, thereby improving the accuracy. The emissivity can be set to any value between 0~1.0, according to the formula:

  Emissivity = dec2hex[round(16 384×ε)], convert any floating point number ε between 0 and 1.0 into a hexadecimal number and then write it into the corresponding control word.

  MLX90615 is mainly composed of infrared thermopile sensor, low noise amplifier , 16-bit analog/digital converter and DSP unit, and its block diagram is shown in Figure 1. The infrared thermopile sensor converts the collected infrared radiation into electrical signals, and sends them to the analog/digital converter after amplification by the low noise amplifier . The digital signal output by the analog/digital converter is conditioned by the FIR/IIR low-pass filter and sent to the digital signal processor. The digital signal processor processes the digital signal and outputs the measurement result and saves it in the internal RAM of MLX90615, which can be read by the main control CPU unit through SMBus or PWM.

  

  Several infrared sensors are connected to the microprocessor as slave devices through the SMBus bus. The typical SMBus configuration is shown in Figure 2 [3]. Both the SDA and SCL pins require a 300 kΩ weak pull-up. Note that the MLX90615 infrared sensor supports 7-bit addresses, so the maximum number of sensors on the same bus is 127. [page]

  

  2.2 Microprocessor

  The microprocessor uses the 32-bit microcontroller STM32F103C8T6 based on ARM Cortex-M3. This microprocessor has the advantages of high speed and reliability, wide temperature range, rich resources, and low power consumption. It is widely used in medical care, handheld devices, motor control, etc. STM32F103C8T6 has 64 KB of on-chip FLASH memory , 32 general I/O pins, 2 10-channel 12-bit A/D converters, 3 general timers and other peripheral resources and USART, I2C, SPI, CAN and other communication interfaces, which can meet the design requirements of multi-point infrared temperature measurement system.

  3 Software Design

  3.1 MLX90615 transmission protocol

  The SMBus data transmission protocol provides the possibility for data communication between the master device and the slave device. The protocol stipulates that only one master device can be valid on the bus at a certain time. The master device can "communicate" with the slave device through "reading data" and "writing data". The data transmission format is shown in Figure 3 and Figure 4. Among them, S is the start bit, Slave Address is the slave device address, Wr is the write flag, Command is the command byte, Rd is the read flag, PEC is the error data packet, and P is the stop bit.

  

  The data on SDA can be changed 300 ns after SCL becomes low level, and the data is captured on the rising edge of SCL. The 16-bit data is transmitted in 2 times, one byte each time. Each byte is transmitted in the format of high bit (MSB) first and low bit (LSB) last. The 9th clock between two bytes is the response clock. The data transmission timing is shown in Figure 5.

  

  3.2 Temperature acquisition module

  The factory default address of the MLX90615 infrared temperature sensor is 0x5b, so the address of the infrared sensor should be modified by software first to avoid the situation of "one call and hundreds of responses" on the bus. MLX90615 supports 7-bit addresses, and the address value can be 1~127. All sensors will respond to the 0×00 address, which should be avoided. When changing the address, it should be ensured that only one sensor is connected to the bus, and the sensor address control word must be cleared first, that is, write the "0×00" address first, and then write the specified address value. The process is shown in Figure 6.

  Initialization mainly completes the settings of general IO, serial port, interrupt and SMBus bus.

  

  After setting a unique address for each MLX90615 infrared sensor, connect it to the SMBus bus through the SDA and SCL lines to communicate with the microprocessor.

  The microprocessor, as the master device on the bus, sends a command to the first MLX90615 on the bus and waits for a response. After receiving the response, it reads the temperature value at that point and transmits it to the host computer through the serial port for display. Then it sends a command to the second MLX90615 and waits for a response. After receiving the response, it reads the temperature at that point and transmits it to the host computer for display. And so on, temperature data is collected for all MLX90615 on the bus. The formula for converting the temperature value read from the MLX90615 to Celsius temperature is:

  

  The data reading flow chart is shown in Figure 7. [page]

  

  3.3 Host computer interface

  The temperature monitoring interface of the host computer is written in MFC class library under C++, which connects the host computer to the microprocessor through the serial port, receives and displays the temperature data sent by the microprocessor. The monitoring point can be controlled and selected by clicking the buttons on the interface, as shown in Figure 8.

  

  4 Experimental Results

  The experiment uses three MLX90615 sensors to monitor hot water, ice and indoor temperature respectively. The variance, average value and reference temperature are obtained after 1 minute of monitoring as shown in Table 1.

  

  The results show that MLX90615 has higher temperature measurement accuracy, more stable measurement results, and a response speed of 7-9 ms. The disadvantage is that the distance to the object being measured must be kept within 2 cm during temperature measurement. When the distance exceeds 70 cm, the measured temperature is the ambient temperature.

  5 Conclusion

  This paper designs and implements a non-contact multi-point temperature measurement system based on the MLX90615 infrared sensor. The system has a measurement accuracy of up to 0.02 °C, fast response speed, and strong anti-interference ability. The interface between the sensor and the microprocessor is simple, which simplifies the hardware design work and provides a new method for multi-point temperature measurement. The experimental results show that this method has high temperature measurement accuracy, fast response speed, and non-contact measurement effectively reduces the risk factor, providing a new way for multi-point temperature measurement.

Keywords:MLX90615 Reference address:Design of multi-point infrared temperature measurement system based on MLX90615 and STM32

Previous article:Design of embedded somatosensory remote control based on ARM
Next article:Multi-channel voltage measurement design based on STM32

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号