cancel
Showing results for 
Search instead for 
Did you mean: 

ADC value to temperature

loder
Associate II
Posted on April 12, 2016 at 21:28

Hello,

i now managed to reada analog value from my temperature sensor and i am now wondering how i can convert that value (3643) to a temperature? I didn't see any kind of formula how the value is calculated with Vref (reference Voltage) and how i can get the input voltage on its own. Do you have any ideas how i can do this?

Best regards

#adc-vrefint #adc
2 REPLIES 2
Olivier GALLIEN
ST Employee
Posted on January 27, 2017 at 11:57

Refer to exemple in Cube eg STM32Cube_FW_L4_V1.6.0\Projects\STM32L476RG-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor

Computation of ADC value to temperature is available in ll_adc lib : __LL_ADC_CALC_TEMPERATURE 

Refer to AN3964 for theory  

http://www.st.com/content/ccc/resource/technical/document/application_note/b9/21/44/4e/cf/6f/46/fa/DM00035957.pdf/files/DM00035957.pdf/jcr:content/translations/en.DM00035957.pdf

 

Hope it help 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Posted on January 27, 2017 at 14:39

Hi again

Gustamko.Master

Apology for my first answer about STM32

For STM8 relevant software exemple and application note are available here

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm8-embedded-software/stsw-stm8license%3d14855239874html

http://www.st.com/content/ccc/resource/technical/document/application_note/46/07/39/dd/1d/f8/46/7a/DM00028pdf/files/DM00028pdf/jcr:content/translations/en.DM00028pdf

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.