High precision temperature measurement scheme based on LH32M0S3

Temperature is the most widely measured physical phenomenon in the world. Temperature sensors mainly include thermocouples, RTDs, infrared, etc. PT1000, thermocouple, infrared, etc., as temperature measuring elements widely used in the industrial field, are widely used in measurement and control fields such as power plants, building materials, coal chemical industry, metallurgy, heating, heat treatment of construction machinery, and coal quality testing.
High precision temperature measurement scheme based on LH32M0S3

1. LH32M0S3 Introduction

1.1. Structure diagram

 Figure 1. LH32M0S3 block diagram

1.2. Features

  • kernel
— 32-bit ARM® Cortex® -M0 CPU
— up to 32MHz operating frequency
  • Storage
— maximum 128 Kbytes FLASH memory
— 4 Kbytes  SRAM 
  • clock module
— internal 32MHz RC oscillator (HRC), typical accuracy ±1%
— internal 32KHz RC oscillator (LRC), typical accuracy ±10%
— 32.768KHz low-speed crystal oscillator (LXT)
  • Working environment
— VDD voltage: 2.2~3.6V
— VDDA voltage: 2.2~3.6V
— temperature range: -40~105℃
  • Power Management
— Low Power Modes: Sleep, Deep Sleep and Power Down
— support power-on/power-down reset (POR/PDR)
— support low voltage detection (LVD)
  • General purpose input and output
— 35 I/O supports up to 32MHz operating frequency
— support interrupt vector
  • High precision analog-to-digital converter (Sigma-Delta ADC)
— 24 bit High Precision Sigma-Delta ADC
— supports a maximum of 8 external input channels
— support single-ended, differential input
— 1/2/4/8/16/32/64/128 times optional gain
— Integral nonlinearity (INL) maximum 30ppm
— ADC channel temperature drift 2ppm/℃
— output rate 8Hz~8kHz  
    ENOB≥15.4 bit@8ksps, PGA=128
— Hardware automatically switches ADC channels, automatically polls and reads ADC data, interrupts notification to MCU or DMA
— comes with reference voltage, output 1.8/2.35/2.45/2.8V optional
— integrated temperature sensor/power supply voltage detection channel
  • Number Comparator
— fast-response digital comparator
  • LCD Driver
— integrated 4 COM, 20 SEG configuration
— integrated charge pump
  • LED Driver
— supports a maximum of 7 x 8 segments
  • Buzzer all the way
  • 2 timers
— 4-way 16bit advanced control timer (TIM1), 6 with dead zone and complementary control Channel PWM output
— 4-way 16bit general-purpose timer (TIM2), with PWM output
  • Programmable constant current source
— 8mA, 10mA, 12mA, 20mA
— support PWM control
  • OLED color screen DMA acceleration module
  • Serial Single Wire Debug (SWD)
  • Encapsulation


2. Measurement principle

2.1. Thermocouple

Thermocouple temperature sensor is a nickel-chromium-nickel-silicon thermocouple temperature sensor, which is made of two different materials The metal conductor forms a closed loop, one end is placed in the measured medium to feel the temperature change, and the other end is placed as a cold end in a constant working environment. When the temperatures at both ends are different, an electromotive force of a certain direction and magnitude will be generated in the loop. The basic structure of the sensor is shown in the figure below.

Figure 2. Thermocouple

In the above figure, AI0 and AI1 are the differential input of SoC, and ACM is the reference output of SoC, which can be used as an external Common-mode input for the sensor. When the temperature of the hot and cold ends is different, the sensor can generate mV-level signals on AI0 and AI1, and send this signal to the SoC for signal amplification after passing through the external filter circuit, and then enter the 24-bit high-precision ADC system structure, which The measurement reference is an internal high-precision reference, and the appropriate parameters of the ADC are configured to complete the measurement of the voltage value corresponding to the temperature range. For cold-junction compensation, the SoC's internal silicon temperature sensor or a single-wire digital temperature sensor can be used for compensation.

2.2. Infrared sensor

The thermopile in the thermopile infrared temperature sensor is a temperature measuring element, which generally consists of two The original components of the interface are composed of Thermopile and Thermistor respectively. The schematic diagram of components and component structure is as follows:

Figure 3. Thermopile infrared temperature sensor

The thermopile infrared sensor receives the infrared radiation of the target and generates a voltage signal (Thermopile two-terminal signal) , the relationship between the voltage signal and the target temperature Tobj  and the ambient temperature Tamb  is as follows:


K  is a calibration constant; F  is a function, which is related to the sensor.

①The two ends of the Thermopile are measured after LH32M0S3 built-in PGA amplification and high-precision AD digital-to-analog conversion Signal.

②LH32M0S3 collects the resistance value of NTC  - Determine the ambient temperature Tamb  by means of a resistance meter.

③ Obtain the target object temperature Tobj by calculation or table lookup.

④After obtaining the target temperature, drive the LCD  to display the actual temperature through LH32M0S3, and complete the infrared temperature measurement to the displayed temperature the process of. Other functions such as setting high and low temperature thresholds and alarms can be added according to requirements.

2.3. RTD

Figure 4. RTD resistor network

The cross-sectional area and length of the three wires led by the RTD are the same (ie r1=r2=r3), as above The platinum resistance shown in the figure is used as a bridge arm of the bridge, connect one wire (r1) to the ground of the bridge, and the other two (r2, r3) are respectively connected to the bridge arm where the platinum resistance is located and the bridge adjacent to it. arm, so that the two bridge arms introduce lead resistance of the same resistance value, and the change of lead resistance has no effect on the measurement results.

MCU_A+ and MCU_A- are measured after LH32M0S3 built-in PGA amplification and high-precision AD digital-to-analog conversion The difference between them is used to calculate the PT resistance value, and then the temperature value is calculated according to the PT resistance value. After obtaining the temperature, LH32M0S3 drives the LCD to display the actual temperature, and completes the process from temperature measurement to display temperature.

3. Introduction

The figure below introduces the RTD, thermocouple and infrared temperature measurement scheme based on SoC LH32M0S3. The measurement scheme uses AVDD to drive the three-wire RTD or uses the internal high-precision reference output of the SoC as the negative terminal reference of the thermocouple, and sends the obtained data to the internal 24-bit high-precision ADC for calculation and analysis, and then uses the unique algorithm of the software to measure The obtained value is converted to temperature, and finally the internal LCD Driver is used to drive the external LCD as a temperature measurement display.

The SoC used in the solution is highly integrated, industrial-grade reliability, rich digital interface SPI, I2C, UART, built-in LCD, LED driver, 24-bit high-precision ADC (ENOB>=19.5bit@30sps, 128 gain), low temperature drift (2ppm/℃) programmable gain amplifier, constant current source and on-chip temperature sensor, etc. It offers a wealth of possibilities for various applications.

Figure 5. Scheme schematic

The following figure is a schematic diagram of the demo board connected to PT1000 and a Fluke multimeter to measure the water temperature at the same time. The outlet water temperature is 34.4°C.

Figure 6. Actual rendering

Test 9 temperature points and draw the curve as shown below.

Figure 7. Comparison of measured accuracy

4. Summary

The chip used in the above temperature measurement scheme is an internal built-in LCD driver, 24-bit high-precision ADC , 32-bit industrial-grade MCU SoC products with low-temperature drift programmable gain amplifiers, not only solve the defects of the traditional temperature measurement scheme from the circuit, improve the measurement accuracy, but also greatly reduce the components of the measurement circuit, which is exactly The advantages of SoC products compared with ordinary MCU plus ADC chips.