1 Introduction
Generally speaking, temperature measurement methods can be divided into contact and non-contact. Contact temperature measurement can only measure the temperature after the object being measured and the temperature sensor reach thermal equilibrium, so the response time is long and it is easily affected by the ambient temperature; while infrared temperature measurement determines the temperature of the object based on the infrared radiation energy of the object being measured. It does not contact the object being measured and has the characteristics of not disturbing the temperature distribution field of the object being measured, high temperature resolution, fast response speed, wide temperature measurement range, good stability, etc. In recent years, it has been increasingly widely used in automotive electronics, aviation and military.
2 Overview of temperature measurement principle
The full name of PWN is Pulse Width Modulation, which means adjusting the period and width of the pulse to achieve the purpose of voltage and frequency conversion. In the digital pulse width modulation method, the number is the control signal, and the duty cycle is changed by changing the ratio of high and low levels. The PWM control circuit is widely used in control circuits such as switching power supplies, uninterruptible power supplies (UPS), DC motor speed regulation, and AC motor variable frequency speed regulation.
SPI (Serial Peripheral Interface) is a synchronous serial peripheral interface proposed by Motorola. It allows the CPU to communicate and exchange information with various peripheral interface devices in a serial manner, which can increase the transmission speed and reduce the resource usage of the device. In addition, it can be simulated by software even on a microcontroller without an SPI interface.
The MLX90601 series temperature measurement modules produced by Melexis are very easy-to-use infrared temperature measurement devices. All modules are calibrated before leaving the factory and can directly output linear or quasi-linear signals. They have good interchangeability and eliminate the need for complex calibration processes.
The module uses the MLX90247 thermoelectric element as the infrared sensing part. The output is the result of the combined effect of the temperature of the object being measured (TO) and the temperature of the sensor itself (Ta). Ideally, the output voltage of the MLX90247 is:
The temperature unit is Kelvin, and a is the instrument constant.
The sensor's own temperature is measured by the built-in thermistor of the MLX90247. The two temperature signals output from the MLX90247 are amplified by two high-performance, low-noise chopper-stabilized amplifiers on the internal MLX90313 device and then output after A/D conversion.
This series of modules has an accuracy of ±0.2℃ and a compact size. The object and ambient temperature can be output in two channels. There are multiple output modes: analog linear output, PWM output, programmable SPI output, etc. It is suitable for a variety of application environments. The following takes MLX90601-CAA as an example to focus on its characteristics and usage.
MLX90601EZA-CAA has two application products: industrial and commercial. It can output the temperature of the object being measured and the sensor in PWM and SPI respectively. In addition, the internal preset value of the module can be changed through the SPI programmable pin, and it also has a relay drive output to further drive the subsequent circuit.
3 MLX90601EZA-CAA Introduction
The electrical characteristics of the MLX90601EZA-CAA are listed in Table 1. The pinout is shown in Figure 1, and the functions of each pin are as follows:
REL1 (pin 1): relay output;
VSS (pin 2): ground;
VDD (pin 3): power supply;
SDIN (pin 4): SPI data input;
SDOUT (pin 5): SPI data output;
CSB (pin 6): chip select;
SCLK (pin 7): clock;
IROUT (pin 8): PWM output of the temperature of the object being measured;
VREF (pin 9): reference voltage;
TEMPOUT (pin 10): PWM ambient temperature output.
[page]
4 Application Design
4.1 MLX90601EKA-CAA temperature measurement characteristics
Taking PWM output as an example, the PWM output format of the MLX90601EKA-CAA temperature signal is shown in Figure 2.
The typical cycle of the PWM signal is 102.4ms. Each cycle starts with a forward buffer time t1, during which the output signal is always 1; t2 and t3 are valid signal parts; t4 is the error signal part, such as: the sensor temperature exceeds the preset value, some measures that cannot be automatically repaired by MLX90313 occur, etc.; t5 is the backward buffer time, and the output signal is always 0. The duty cycle description of each period is listed in Table 2.
The temperature value is calculated as follows:
Where: t is the measured temperature, DutyCycle is the percentage of t2 in the timing diagram, that is, t2/total cycle T, Tmin is the set lower temperature limit (factory setting is -20℃), and Tmax is the set upper temperature limit (factory setting is 120℃).
The linear relationship between the output temperature value and DutyCycle is shown in Figure 3. It can be seen from the figure that within the effective range of the sensor (-20℃-120℃), the temperature value of the object to be measured and the temperature value of the sensor itself have a good linear relationship with DutyCycle.
4.2 MCU Interface Circuit
The hardware circuit connecting MLX90601-CAA and microcontroller is shown in Figure 4. The power supply voltage of MLX90601EKA-CAA is +5V. The CS, IR and TEMPOUT pins can be directly connected to the ordinary I/O port of MCU, but due to some reasons in its internal circuit, the signals collected by the IR and TEMPOUT pins of the circuit connected in this way are always 0. The solution is to connect a tri-state gate (such as 74HC125) between MLX and MCU: the CS pin of MLX and the control terminal of the tri-state gate (EN) are both connected to the I/O port of MCU, the output signal of MLX is first connected to the input terminal of the tri-state gate, and then the output signal is connected to the I/O port of MCU.
[page]
The SPI interface circuit is shown in Figure 4, and a three-state gate is also required for switching. Its working sequence is shown in Figures 5 and 6. When a falling edge appears on the chip select signal of MLX, the write command starts, and when a rising edge appears, the write command ends. During this period, a total of 32 clock pulses appear, and the rising edge is always valid. The same is true for the read command. The order of the SDI write command is: 8-bit command, 8-bit address, 16-bit data, with the high bit first; after 8 clock cycles of the write command are input, the input command code, address code and the first 8 bits of data are output at the SDO port for verification. The read command is basically similar to the write command, so it will not be repeated.
4.3 Software Flowchart
The software flow for collecting a PWM cycle is shown in Figure 7. Where T is the output value of the IROUT or TEMPOUT pin. Use timer 0 or 1 to record the duty cycle of a PWM pulse: when the T value changes from 0 to 1, the timer starts counting. When the microcontroller determines that the T value changes from 1 to 0, the values of TF0, TH0, TL0 (or TF1, TH1, TL1) are extracted and assigned to a group of intermediate variables. Then, when the T value changes from 0 to 1, the values of TF0, TH0, TL0 (or TF1, TH1, TL1) are extracted and assigned to the second group of intermediate variables. Calculate the time represented by the two groups of intermediate variables. The first group of intermediate variables represents the duration of a PWM pulse high level, and the second group of intermediate variables represents the total duration. DutyCycle = the first group value / the second group value. Substituting it into the temperature value calculation formula in Section 3.1 can calculate the measured temperature value.
4.4 Experimental data and conclusions
Table 3 is a comparison of the characteristics and experimental data of the MLX90601EZA-CAA temperature sampling circuit (referred to as MLX in the table), the kerosene thermometer and the A1100 digital temperature and humidity measuring instrument.
Note: In Table 3, the "body temperature" item of the thermometer is measured by a medical thermometer, and the reading is 36.5℃, which is very close to the value measured by MLX.
In the experiment, MLX showed high sensitivity and accuracy. Since it is a non-contact measurement, it has a wide range of applications, and does not require high heat dissipation performance of the circuit board when working for a long time. If the circuit (set as Sensor1) and the circuit composed of the contact temperature sensor (set as Sensor2) are covered with a sealed cover and the temperature inside the cover is measured, after a period of time, the reading of Sensor2 can be seen to have an obvious upward trend. This is mainly because Sensor2 also adds the heat dissipated by the circuit board to the ambient temperature, while the reading of Sensor1 remains basically stable. Therefore, in embedded applications that require high accuracy and fast response speed, the MLX90601 series infrared temperature measurement module is a good choice.
Previous article:Design test system using MSP430 series microcontroller
Next article:Temperature Recording System Based on BASIC Stamp Microcontroller
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Chuanglong TMS320C6748 development board——UART register introduction and program
- Notice: "ST MEMS Sensor Technology Forum" is renamed "ST Sensor and Low Power Wireless Technology Forum"
- Ti CC2540 Bluetooth module study notes
- Coding Standards - IAR Settings
- 12V700MA power supply solution
- DSP generates bin file method
- Leez AI LAN Object Detection
- Capacitors in circuits,,,,,
- [Rewarded Live Broadcast] Recommend "TI mmWave Packaged Antenna Sensor IWR6843" to achieve building industrial sensing simply and efficiently
- Theoretical speed calculation of WiFi protocols