STM32L1x temperature sensor example


Add to my manuals
14 Pages

advertisement

STM32L1x temperature sensor example | Manualzz

AN3964 Application overview

This section describes how the temperature sensor works and how the temperature measurement is performed by the STM32L1x microcontroller embedded on the STM32L-

DISCOVERY or 32L152CDISCOVERY.

A brief description of how the example temperature measurement application was implemented follows afterwards.

STM32L1xxDISCOVERY stands either for STM32L-DISCOVERY or 32L152CDISCOVERY evaluation kit throughout the document.

Note:

The temperature sensor integrated in the STM32L1x microcontroller provides an analog output voltage proportional to the chip junction temperature of the device.

Please note that the temperature information provided by sensor is the thermal chip junction temperature (actual temperature of semiconductor surface) and may differ from the ambient temperature. Please see section “Thermal characteristics” of product datasheet for more details.

The integrated temperature sensor provides reasonably linear characteristics with a deviation typically of ± 1% from linear asymptotic functions and a temperature range equal to that of the device (–40 °C to 85 °C) with a maximum junction temperature of 150 °C.

The sensor provides good linearity but quite poor interchangeability and must be calibrated to obtain good overall accuracy. If the application is designed to only measure the relative temperature variations, the temperature sensor does not need to be calibrated.

The temperature sensor is internally connected to Channel 16 (ADC_IN16) of the ADC

(analog-to-digital converter) in the STM32L1x and is used to sample and convert the temperature sensor output voltage. The raw ADC data must be further processed to display the temperature in a standardized unit of measurement (Celsius, Farenheit or Kelvin).

The ADC reference voltage (V

DDA

= V

REF+

) is connected to the 3 V V

DD power supply of the

STM32L1xxDISCOVERY boards. If the V

DD

value is not accurately known, as in case of battery-operated applications, it must be measured to obtain a correct overall ADC conversion range (see below section for details).

Temperature measurement on battery-operated devices

The power supply voltage applied to the microcontroller is subject to change on devices directly powered from a battery. The value converted by the ADC follows the drift of the battery voltage if the ADC reference voltage is tied to V

DDA

, which is the case for devices in low pin-count packages. The supply voltage needs to be known to compensate for such voltage drift. The actual supply voltage (V

DDA

) can be determined by using the embedded

DocID022101 Rev 3 5/14

13

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals