How to design a simple temperature measurement application using the STM32L-DISCOVERY
This document details a method for implementing a temperature measurement application using the integrated temperature sensor of the STM32L1 microcontroller embedded on the STM32L-DISCOVERY board. The solution utilizes the device's internal peripherals and requires no additional hardware, displaying the chip junction temperature on an LCD.
| Temperature range | -40 °C to 85 °C |
|---|---|
| Maximum junction temperature | 150 °C |
| Linearity deviation | + 1% |
| ADC Reference Voltage | 3V |
| Bandgap accuracy | + 5 mV |
| Calibration data format | 12-bit unsigned number |
| Sampling rate | Every 2 seconds |
| CPU Frequency | 16 MHz |
No, the demonstration application does not require any additional hardware.
Factory calibration data is stored during manufacturing, while user calibration allows the user to perform a two-point calibration to improve accuracy if factory data is missing or for better precision.
The temperature is evaluated using linear approximation based on two calibration points (cold and hot) and the current ADC value.