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.

MSP430BT5190 ADC12_A Internal Temperature Sensor Repeatability

Other Parts Discussed in Thread: MSP430BT5190

Hi,

I am currently working with an MSP430BT5190 and I would like to use the internal temperature sensor from the ADC12 channel 10 for my product.

I am using the calibration values from the TLV table, waiting more than specified for REF supply to setup. The sample & hold time is superior to what is specified in the datasheet.

Everything is set correctly and most of the time I measure a consistent value. The problem is that when I do several consecutive conversions, some values are more than 5°C above the previous read values.

For example, I get the following sequence:

23.2, 23.4, 23.1, 23.2, 29.1, 23.2, 23.4, 32.1, 23.4, 25.7, 23.1

I thus have a problem of repeatability. Is there a known issue about the repeatability of this sensor or a known noise issue ? If yes, is there a known workaround, a dedicated application note?

The product I am working on is a medical device, and this value is used as a double check to know the correct operation of an external sensor, therefore the repeatability is a key issue.

  • Hi Matthieu,

    No idea. But you can take average of several samples to get a more stable value.
  • >known noise issue ?

    Yes. - When you use wrong (too short) ADC sampling time while measuring high impedance sources as internal temperature sensor. You shall read User's Guide, ADC chapter "sampling time considerations".

    >The product I am working on is a medical device, and this value is used as a double check to know the correct operation of an external sensor, therefore the repeatability is a key issue.

    Well you are advised to not expect high performance out of internal temperature sensor which measures die temperature. Check datasheet, try to find absolute error accuracy of it, only then think of repeatability of such sensor :) You shall measure temperature using proper purpose-built temperature sensor

  • Well, a median filter would be an option but it is quite strange that a software workaround would be needed...

  • The sample and hold time complies with the datasheet considerations, we tried to increase it but it did not give any better result.
    We do have an external temperature sensor which is much more reliable. The idea was to check that the external was functional by comparing its output value to the internal sensor's one and see if it is consistent within a certain range.

    This should work even we measure the die temperature as it is not supposed to change of more than 5°C in less than 10ms.
    We know that the calibrated values are +/-3°C according to the datasheet and we don't expect a great accuracy in the measurement. However, we do expect a good precision/repeatability of this sensor. Do you know what could be the cause of such results?
  • Yes, but there are too many factors will increase ADC noise. So, I usually use a simple filter to increase the stability of sampled data.
  • >The sample and hold time complies with the datasheet considerations, we tried to increase it but it did not give any better result.
    How many sample time clock cycles do you use? What's ADC clock freq? Other possible cause of unexpected ADC result spread is - measuring while reference is not yet stabilized - immediately after it's power-on. Try to measure temperature while ADC and reference is continuously on. Also check AVCC decoupling caps and AVCC pulsations
  • >I usually use a simple filter to increase the stability of sampled data.
    It is always better to find source of noise in your hardware rather than implement workaround by digitally filtering noisy data.
  • The ADC clock is ADC12OSC=MODCLK=4.8MHz (typical) according to datasheet. The user manual says "When using the temperature sensor, the sample period must be greater than 30 μs.". However, the datasheet says "tSENSOR(sample) Sample time required if ADC12ON = 1, INCH = 0Ah, 2.2 V -> 100µs". Therefore, we tried with 512 clock cycles, which represent 106.67µs of sample & hold time. We also tried higher values, giving no difference.
    Concerning the reference settings time, the datasheet says 75µs typical, we put a wait of 100µs after reference power-on. I have just tried to let it on all the time but the result is similar.
    I will check the decoupling caps in details although it seems good at first look. What do you mean by AVCC pulsations?
  • You are right. But I have the same experience that some periodical pulse values occur during sampling. I have observed this situation by collecting a long period of sampled data. I also adjusted different S&H time, but nothing help. Then, I guess it might be caused by some noise form CPU internal logic.

    Anyway, it is great if you can find a root cause.
  • >What do you mean by AVCC pulsations?
    When it is about power supply noise, I suggest to not only check that filter (capacitors/beads) is there but also that they do their work as expected. By saying "check AVCC pulsations" I did mean - just look at analog power supply rail using scope and see how noisy it is.

    >We also tried higher values, giving no difference.
    Do you sample other inputs too? - Try to test w/o switching ADC input between conversions, see how it goes then.

    BTW your problem can be software - related too. For example sometimes engineers miss to properly handle end of conversion and read ADC data register before conversion is finished :)
  • Ok, I will check the first point concerning the power supply noise & decoupling.
    For you second point, ADC input is not switched during conversion in this case.
    The ADC conversion result is read on interrupt when conversion has been done so I guess the data in the MEM register is correct.
  • Then I am out of ideas. Maybe you shall compile ADC & temperature sensor source code example and compare results.
  • Hi Matthew!

    Could you at least give this a try?

    Divide your ADC12CLK by 2 to get 2.4MHz by setting

    ADC12CTL1 |= ADC12DIV_1;

    and set

    REFCTL0 |= (REFMSTR | REFON | REFOUT);

    Dennis

  • Hi,


    Thank you for your answer, I tried it and I had to divide by 4 to see a little improvement (peaks less high and less frequent). Indeed, dividing the frequency increases the sample & hold time, acting thus as a first HW filter.

    However, it is quite strange that such time is needed. Is there another root cause I have been missing?

  • Hi Matthieu!

    My suggestion came from the known errata ADC27. Dividing the ADC clock is not to increase the S&H time (it does, of course) - it was meant to lower the clock to a value smaller than 2.7MHz. Do you have silicon revision D, E or G? Otherwise you wouldn't even been affected by it.

    Dennis

**Attention** This is a public forum