Life.augmented
Skip to main content
Go Search
  

STM32 Evaluation Tools

Modify settings and columns
STM32 Discovery Kit, STM32 Nucleo, STM32 Eval Board
Share Discussion
  
View: 
Post
Started: 5/11/2013 7:44 PM
hernandez_vazquez.jo
  Posts : 7
Calculate Temperature Sensor STM32L Discovery
hi , I have a question , when I  calculate the temperature with this code using the formulate in the data sheet:

val_adc=ADC_GetConversionValue(ADC1);
vsense=(val_adc*Vref)/0xfff;
val_adc=(vsense/Avg_Slope)-273.15;
in the data sheet the values are:
Vref=3V Avg slope=1.61mV

i calculated 33ºC , but its strange, i dont know if that result its correct o is wrong... 

Tags: #stm32l #discovery #sensor
Posted: 5/11/2013 9:41 PM
clive1
  Posts : 8781
i calculated 33ºC , but its strange, i dont know if that result its correct o is wrong... 

Bit hard to cross check without some actual measurements?

It measures die temperature, normally you'd heat and cool the external package with a thermal source
Edited: 5/12/2013 7:54 PM
baird.hal.001
  Posts : 411
Two things to consider:

1. Vref is 3V on the discovery board, may be something else on another board.

2. The internal temperature sensor has a large variation in offset, so much so that ST recommends it be used only for relative temperature. To use it for actual temperature, let the processor board stabilize at ambient temperature, then add a numerical correction offset to get the ambient temperature. Then place the board in different ambient temperatures and see  if the results are reasonable.

Calibrating each board this way in a production environment might be impractical. An external temperature sensor is often used in this case.

Cheers, Hal


From: hernandez_vazquez.jo
Posted: Saturday, May 11, 2013 7:44 PM
Subject: Calculate Temperature Sensor STM32L Discovery

hi , I have a question , when I  calculate the temperature with this code using the formulate in the data sheet:

val_adc=ADC_GetConversionValue(ADC1);
vsense=(val_adc*Vref)/0xfff;
val_adc=(vsense/Avg_Slope)-273.15;
in the data sheet the values are:
Vref=3V Avg slope=1.61mV

i calculated 33ºC , but its strange, i dont know if that result its correct o is wrong... 

Browse Private Forums

NOTE: these forums are exclusive for users of this Extranet!)