Internal temperature sensor for the MSP430 - energia

I'm trying to use the internal temperature sensor for the MSP430G2553 with energia (a branch of arduino for the TI MSP430 microcontrollers) but to I'm having trouble calibrating it. The solution I've found was to make multiple measures at different temperatures with another temperature sensor and from the relation between the two make a linear equation that performs the convention. The problem is that this seems like an hack and doesn't look practical if (for example) I had to mass produce a circuit that used the internal temperature sensor (I would probably have to calibrate each sensor individually). So my question is: Is there a formal way or a good energia library to get an accurate/calibrated temperature (preferably in Celsius) from the internal MSP430 sensor?

• What accuracy or precision do you require? – Turbo J Mar 24 '14 at 17:26
• Is this a question about calibrating? (Most of your post.) Or a question about reading the temperature sensor and converting it to temperature? (Last sentence.) Two-point calibration is not a hack, unless you "hack" your calibration points. You get one really cheap, fairly decent freeze point using ice water. The other one will probably cost you more. If it goes into production, you will need decent, calibrated sensors (another MSP430?) and a decent chamber. A library won't "fix" this. And the MSP430 sensor will probably drift over time and supply voltage, anyway. – jonk Mar 24 '14 at 18:54
• AFAIK, the msp430 internal sensor is more of a gimmick than an actual, useful feature. It's not very accurate. If you want accuracy for commercial purposes, you want an external sensor, analog like a thermistor, or a digital one. – Passerby Mar 25 '14 at 23:50
• Also see this: forum.43oh.com/topic/… The G series is bare bones compared to the other msp430 lines, so not always fully calibrated. Sometimes only some of the speed calibrations are there too. – Passerby Mar 25 '14 at 23:55
• The speed calibrations are not useful over temperature anyway, see electronics.stackexchange.com/questions/8199 – markrages Mar 26 '14 at 17:27

The datasheet, only gives a typical slope of 3.55 mV/C on the sensor.

It doesn't give high or low limits on the slope.

It doesn't give any offset, neither typical or limits.

The equation in the notes implies that the relationship is linear, however.

So a two-point calibration should be sufficient, which means taking a reading at two different temperatures and deriving the actual offset and slope through algebra.

If you trust the slope value of 3.55 mV/C you can do a single point calibration. If your device is only used over a relatively narrow temperature range this can be OK, because you can calibrate your single point in the working range, then the temperature error will be zero at that temperature and increase as you move away at the rate of $(TC_{actual} - TC_{typical}) * T$.

In my experience the slope value is pretty close to 3.55 mV/C, but unfortunately I don't have data that I can share about that. Offset varies, especially across different production batches.