This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Internal temp sensor of MSP430F2619

Other Parts Discussed in Thread: MSP430F2619

Hi All,

 I am chasing this problem of wrong temperature reading. I am using MSP430F2619 which has inbuilt temp sensor connected to ADC12 CH10. I am configuring it right and it gives decent readings but they are off by 3-4 degree C.

I am averaging 16 readings taken consecutively. I have tried everything including ADC reading calibration (Family datasheet TLV structure notes), without calibrating ADC and using direct digital data to calculate the temp but nothing seems to give correct reading. When room temp is 20 degC, it shows around 24-25degC. And in test oven where it is 85degC, it shows 62.5degC.

Vref=2.5V internal and I am referring to formula on page 630 of family datasheet which is

degC=((( ADCreading/2^12)*2.5V)-0.986)/0.00355

I also used data from TLV structure to calculate slope and do respective calculations, but had no luck.

Referred to http://e2e.ti.com/cfs-filesystemfile.ashx/__key/CommunityServer.Components.PostAttachments/00.00.11.00.90/msp430x54xA_5F00_adc12_5F00_10.txt but this does not seem to be applicable to the processor I am using.

If anyone has worked on the same, please help me out. I appreciate your time and help :D.

-Thanks

  • Hi,

    well, if you want to use the ADC12 temperature sensor you should do at least a one-point calibration. When you do a worst case calculation you will see that at least a one-point calibration is needed.

    If you do some calculations you will also find out that the ADC12 using the 1.5V reference may simplify the calculation. If you accept a small calculation error you just need a subtraction!

    Temperature = ADCresult - CalibrationValue

    The CalibrationValue is the ADCresult at 0degC...

  • Hi Voyager,

     

    Thank you for responding back. Yeah, that sounds to be a good idea. I will definitely try that.

    I did little oven test on MSP430 and found out my formula for degC calculation.

    ADCresult=degC*5.85+1623;

    However I find your trick pretty good and I am going to try it :D

     

    Thank you again.

  • Hi,

    because I have currently some spare time I will write down the tricky solution of calculation the temperature.
    Take care, the trick with the temperature calculation depends on the parameters of the temp sensor! E.g.
    for the MSP430F2619 it works, for the ADC12 within the MSP430x5xx family the parameters were changed
    and it will not work anymore!

    The calculation of the measured temperature is done with the following formula:

    Vsense=TCsensor * (temperature, degC) + Vsensor     (that's the formula that is mentioned in the datasheet)

     

    Let's bring it into the form that we can calculate the tempature:

    (temperature, degC)  = ( Vsense -  Vsensor ) / TCsensor

     

    Let's put the ADC conversion results in this formula:

    Vsense = Vref * ADCvalue / 4095

    (temperature, degC)  = ( Vref * ADCvalue / 4095 -  Vsensor ) / TCsensor

     

    or you can also write this formula in the following way:

    (temperature, degC)  = ( ADCvalue -  Vsensor * 4095 / Vref ) * Vref / (TCsensor * 4095)

     

    Let's put in the parameters from the MSP430F2619 data sheet (I have choosen 1.5V as Vref):

    (temperature, degC)  = ( ADCvalue -  0.986V * 4095 / 1.5V) * 1.5V / (2.25mV/degC * 4095)

    (temperature, degC)  = ( ADCvalue -  2691.78) / (9.6915)  degC

     

    Let's simplify it. Dividing by 9.6915... hm, that's nearly 10.. ok, forget this one and think of that the
    calculated temperature is given in tenth deg C ;o)

    So on the MSP430 I would calculate the temperature as follow:

    (temperature, tenth degC)  = ( ADCvalue -  2692) degC

     

    For sure, it depends if the additional error cause by the simplified calculation formula can be accepted.

     

    Best regards.

  • Ohhh, yes... I forgot to mention...

    (temperature, tenth degC)  = ( ADCvalue -  2692) degC

    .... the 2692 in the formula is the nominal value. If you are doing the calibration you will adjust this value...

  • Hi Voyager,

     I really appreciate your help. I have got 2 things to try now :D.

    In the mean time, I am testing my formula as well. It shows temp very near to the actual one (4 degree less all the time) :D . Now, solution seems simple.

     

    Thanks  a bunch. 

  • Keep in mind that the temp sensor is measuring the internal temperature of the MSP, which is, depending on current power consumption, usually a bit higher than the externally taken reference.
    There's no way to compensate for this, so the temp sensor is really only suited for either measuring the internal temperature or give a rough estimation of the external one.

    Having 4 degrees LESS all the time seems to indicate an offset error. If the scaling error is compensated well enough, a one-point calibration should do the trick.

**Attention** This is a public forum