2013-05-11 10:44 AM
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.61mVi calculated 33�C , but its strange, i dont know if that result its correct o is wrong... #sensor #stm32l #discovery2013-05-11 12:41 PM
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 source2013-05-12 06:13 AM
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