Hi,
The equation indicated in LC60 datasheet was misprinted.
It should be:
TempC = 25 - [(Vtemp – Vtemp25) ÷ M]
Vtemp: Measured Internal Temperature Sensor Voltage
Vtemp25: Internal Temperature Sensor Voltage at 25ºC
M: Slope values
TempC: Calculated temperature in ºC
------------------------------------------------------------
The device datasheet also contains typical values for Vtemp25 and M.
Vtemp25: 701.2mV
Mcold: 1.646 mV/°C (used if Vtemp > Vtemp25)
Mhot: 1.769 mV/°C (used if Vtemp < Vtemp25)
------------------------------------------------------------
For the calibration, I'm calculating Vtemp25 value by using typical slope values. For example, when ambient temperature is 19 ºC and the supply voltage is 3.3V, I calculate Vtemp25 with:
19 = 25 - [(Vtemp – Vtemp25) ÷ Mcold]
After that calibration, I'm always using calculated Vtemp25 value for my measurements.
Vtemp25 value is my Vtemp_offset value in my code at the top of the post.
I'm not calculating an Offset like you mentioned. Just calculating Vtemp25.
"+0.5" is for rounding up a double value to the integer value.
You suggested to calculate Tcal value instead of Vtemp25 value at calibration. Am I right?
TempC = 25 - [(Vtemp – Vtemp25) ÷ M] + Tcal
When I'm doing this, should I use typical Vtemp25 value?
The related application notes (AN3031 and AN3570) say Vtemp25 to recalculate for calibration at single point.
Using Tcal instead of Vtemp25 is more suitable?
Thank you,
BP.