Haberler:

Foruma Resim Yükleme ve Boyut Sınırlaması ( ! )  https://bit.ly/2GMFb8H

Ana Menü

internal temperature sensor

Başlatan muhittin_kaplan, 30 Aralık 2012, 12:56:08

muhittin_kaplan

Alıntı YapReading the temperature
To use the sensor:
1. Select the ADCx_IN16 input channel.
2. Select a sample time of 17.1 µs
3. Set the TSVREFE bit in the ADC control register 2 (ADC_CR2) to wake up the
temperature sensor from power down mode.
4. Start the ADC conversion by setting the ADON bit (or by external trigger).
5. Read the resulting VSENSE data in the ADC data register
6. Obtain the temperature using the following formula:
Temperature (in °C) = {(V25 - VSENSE) / Avg_Slope} + 25.
Where,
V25 = VSENSE value for 25° C and
Avg_Slope = Average Slope for curve between Temperature vs. VSENSE (given in
mV/° C or µV/ °C).
Refer to the Electrical characteristics section for the actual values of V25  and Avg_Slope.
Note: The sensor has a startup time after waking from power down mode before it can output
VSENSE at the correct level. The ADC also has a startup time after power-on, so to minimize
the delay, the ADON and TSVREFE bits should be set at the same time.

stm32f103 un data sından böyle bir açıklama var. ama ben bu Avg_Slope V25 i ne olduğunu bulamadım. Fikri Olan Var mı ?

fatih6761

V25 = VSENSE value for 25° C and
Avg_Slope = Average Slope for curve between Temperature vs. VSENSE (given in
mV/° C or µV/ °C).
Refer to the Electrical characteristics section for the actual values of V25  and Avg_Slope.
Buradan anlaşıldığına göre belgedeki Electrical Characteristics bölümünde bu sabitlerin değeri var. Karakteristik eğrisinden V25 değerini alacaksınız sonrasında bu VSENSE değerine uygun Avg_Slope değerini de eğriden okuyacaksınız.

muhittin_kaplan


fgokcegoz

Kullandığın mcu nun datasheet inde arattırırsan bulabilirsin hocam. STM32F103VG nin datasheetinden aldım aşağıdaki tabloyu.

"Vicdanın ziyası, ulûm-u diniyedir. Aklın nuru, fünun-u medeniyedir. İkisinin imtizacıyla hakikat tecelli eder." (Bediüzzaman Said Nursi)

muhittin_kaplan

datasheet yerine Refmanuel i tararsan olacağı budur.
teşekkür ederim.

fatih6761

Değerler şu şekilde olacak formül de altında: