Part Number: MSP430FR2676
Goal
I need to achieve a temperature measurement accuracy of +/- 2C using the MSP430FR2676 onboard temperature sensor.
Issue
After applying the equation in user manual section "1.13.3.3 Temperature Sensor Calibration",
I get the following results:
(Fluke 287 DMM with temperature probe in our temperature test chamber - Heraeus Votsch)
| Actual (Fluke) | -10 | 0 | 9 | 20 | 30 | 41 | 50 |
| MSP430 | -6 | 2 | 10 | 20 | 28 | 35 | 43 |
(Fluke decimal places omitted for simplicity sake)
I each case, the hardware is allowed to settle at temperature for 15 minutes. (the hardware is not encapsulated, and is not in an enclosure)
ADC
The ADC is setup as 12bit, using the internal 1.5V reference. S&H time is > 30us as required by datasheet.
The Code
/* TLV calibration for MSP430 temperature sensor at 30C. For prototype, this value = 2229 */
#define CALADC_15V_30C *((uint16_t *)0x1A1A)
/* TLV calibration for MSP430 temperature sensor at 105C. For prototype, this value = 2811 */
#define CALADC_15V_105C *((uint16_t *)0x1A1C)
After an ADC conversion, I apply the following equation:
int32_t tmp_int32 = ADCMEM0;
tmp_int32 -= CALADC_15V_30C;
tmp_int32 *= 105-30;
tmp_int32 /= (uint16_t)(CALADC_15V_105C - CALADC_15V_30C);
tmp_int32 += 30;
Expectations
As the TLV values cover from 30 to 105C, I do not have many expectations regarding negative temperatures.
However I would have expected that temperatures between 30 and 105 would be within 1C ?