LC60: Internal Temperature Sensor(AD26 value decreases when temperature increases)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LC60: Internal Temperature Sensor(AD26 value decreases when temperature increases)

4,683 次查看
BasePointer
Contributor II
Hi,
 
I want to measure working temprature by using internal temperature sensor of LC60 to compensate deviation at external real-time crystal(32.768kHz) over temperature. Accuracy is not so important, +-5 C degree is enough for me.
 
The datasheet indicates an equation at page 268 (15.1.1.5 Temperature Sensor section):
Code:
TempC = (Vtemp – 0.7013) ÷ (0.0017)

I recalculated 0.0017 value and found my calibrated divider instead of this value (only at 25 C degree).
 
The problem is here:
Measured Temperature is 25C at 25Cdegree room. OK
Measured Temperature is 15C at 35Cdegree room. ?
Measured Temperature is 35C at 18Cdegree room. ?

I'm using AD26 channel voltage as Vtemp.  Am I missing something?
 
Thanks.
BP.


Message Edited by BasePointer on 2007-10-25 03:58 PM
标签 (1)
0 项奖励
回复
6 回复数

928 次查看
ballen
Contributor I
There may be a misprint in the data sheet, but your equation is wrong. It should be:
 
T = 25 - (Vtemp - 0.7013) / 0.0017
 
If the temperature is above 25C, the last part will end up negative due to the way the temp sensor works.
 
Also, if it's like the QG8, there will be a different divisor (slope) for temps above and below 25C.
 
ballen
0 项奖励
回复

928 次查看
BasePointer
Contributor II
Hi again,
 
I'm only capable of making single point calibration.
 
adc_temp: AD26 ADC value
adc_ref: AD27 ADC value
 
T(in C) = 25 - [(adc_temp*1.2/adc_ref) - Vtemp25] / m..................(1)
 
Which variable should be recalculated by my calibration process , Vtemp25 or m?
Now, I'm using predefined m_cold(1.646mV/C), m_hot(1.769mV/C) and recalculated Vtemp25 value.
Is this method sufficient?
 
Thanks.
0 项奖励
回复

928 次查看
bigmac
Specialist III

Hello BP,

 

This subject was extensively discussed in your thread of a couple of years ago.  I suggest that you revisit that thread here.  The calculations shown in my posts towards the end of the thread would still be applicable.  These covered single point calibration where the calibration temperature was known, but other than 25C, and also compensation for change of Vdd.

 

The temperature coefficient of the sensor is negative because it is simply the voltage accross a single diode that is measured.

 

Regards,

Mac

 

0 项奖励
回复

928 次查看
Ashkan
Contributor I

Here is a sample code, not the best calibration, but gets your there....I did the calculations in millivolts...

you have to call these functions before hand:

    while ( AD1_Measure(TRUE) !=ERR_OK ){;}
    AD1_GetValue16(&ADC_Values);

    TemperatureFunction (&tempVariable);

 

 

 

#define mhot    1.769
#define mcold     1.646
#define Vtemp25 701.2      //In milliVolts

double Vtemp=0;   //In milliVolts
void TemperatureFunction ( double *temp)
{
    Vtemp  = 120  * (10*(double) ADC_Values [ ADC_TempSensor]) / (double)ADC_Values[ADC_Bandgap];
    

    if ( Vtemp > Vtemp25 )
    {
        (*temp) =  25- ( (Vtemp- Vtemp25  )/mhot );
    }else
    {
        (*temp) =  25- ( (Vtemp - Vtemp25)/mcold );
    }
}

0 项奖励
回复

928 次查看
BasePointer
Contributor II
Hi ballen,
 
Yes, the LC60 datasheet misprinted. QG8 datasheet is good at this subject. I also learned that there is an application note AN3031 from the QG8.
 
Thank you,
BP.
0 项奖励
回复

928 次查看
BasePointer
Contributor II
The range is -40C / +85C
0 项奖励
回复