Thermopile Interfacing convert to object temperature

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ViTa_297566
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

I am reading an app note written by Cypress which is attached. Actually we are interfacing thermopile attached its datasheet also.

We are able to measure the Vtp of thermopile and convert Rth to NTC_temperature.

Now we have trouble converting these two readings to Object temperature.

image.png

Can anyyou tell in a bit more detail how to do it further?

Our area of it interest of object temperature is 35 to 42C and Ambient goes from 0 to 50C.

0 Likes
1 Solution

ViTa,

I believe that Excel has minimization function, which can optimize K and n over the dataset.  Something like equation solver. I am not an expert on that.

/odissey1

View solution in original post

0 Likes
9 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

ViTa,

You may consider using another thermopile sensor from the Melexis (MLX90614 or MLX90616).

Digital Non-Contact Infrared Thermometer (MLX90614) #Melexis

Unlike OTP-638, it has internal brains to measure voltage and sensor temperature with simple I2C digital output for both.

There are several projects posted on Cypress forums with code for it, e.g.

Re: Smbus with the PSoc4

/odissey1

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

ViTa,

According to the OTA-638D2 datasheet, the object temperature Tobj can be obtained using a lookup table from measured V_thermopile and T_themistor. Lets say T_thermistor=20C and V_thermopile = 1.50 V.

1. select a column (1-25), corresponding to T_thermistor . Column = 20.

2. In the column 20, find voltage, closest to V_thermopile =1.50V. Found 1.530V, which gives T_object  = 37C.

Remember, that using this lookup table assumes that no other filters or additional optics is attached to the sensor. This method will require to put entire table into uC flash memory, which will take 50*25*2*4 = 10000 bytes if float precision is used. The size can be reduced twice (5000 bytes) if V_thermopile is converted to int precision by multiplying values from the table by 1000. Advantage of this method is speed. The disadvantage is that creating a large lookup table is time-consuming, and the accuracy is rather low (1degC).

/odissey1

pastedImage_3.png

0 Likes

ViTa,

The accuracy can be improved to approx. 0.1degC by using direct calculation according to the master equation:

V_thermopile = K (T_object^4 - T_thermistor^4),

(here all temperature values in Kelvins, not Celsius!)

where:

T_object       = T_object + 273.15

T_thermistor = T_thermistor + 273.15

Therefore:

T_object = sqrt( sqrt( V_thermopile/K + T_thermistor^4 ) ).

T_object = T_object - 273.15

In this equation, constant K is unknown, and you would have to calculate it yourself using either a table from the datasheet or to measure it directly using some known body temperature:

(1/K) = (T_object^4 - T_thermistor^4) / V_thermopile.

Example of (1/K) calculation using lookup table from the datasheet:

T_obj = 50C = 323.15 K

T_thr = 0C  = 273.15 K

V_thp = 4.397 mV

T_obj^4 - T_thr^4 =  10904773289.97 - 5566789756.3 = 5337983533.675

Z = (1/K) = 5337983533.675 / 4.397 = 1.2140E+9 [K^4/mV]

Note that to get 0.1degC accuracy, T_thermistor must be also measured with 0.1C or better accuracy! You can use Fast Thermsitor Calculator to speed-up calculation and to get better accuracy:

Fast Thermistor Calculator

The advantage of this technique is that no lookup table needed, and better accuracy is possible. Also assembled device can be re-calibrated, and improved value of the constant K can be obtained. But performing all that calculations will take some time.

/odissey1

0 Likes

Hi I had tried finding value of K , but it keeps on varying. Those falling to zero are actually divide by zero error, where Tobj & Tamb equals each other. here is excel file where values of K are calculated : https://www.avrfreaks.net/sites/default/files/forum_attachments/values_thermopile.xlsx

Somehow we are stuck with analog sensor only, so have to use only this. Thats why I searched this cypress app note and trying to understand how it works?

So this forumula dont work.

0 Likes

ViTa,

The Excel table and the chart above represent calibration data in very wide range from -50C to +700C. No surprise, that there is some deviation of the K value. It is, actually, quite remarkable, that despite highly non-linear relation, the value of K deviates only by a factor of 3 in the entire range. Moreover, it can be linearized with good accuracy, if necessary. On the positive side, the values for T_object from 0C to 50C occupy on the chart X a narrow space from ~2500 to ~5000. And the value of K in that range

is pretty much constant, ~0.8E-12 [V/K^4], which coincides with value (1/K)=1.21E+12 [K^4/V] calculated in my previous post.

I would give it a try and fine-tune the constant if necessary. Note that tabulated values are only for unpakaged device, any additional optics or reflective pipe will affect this value.

The analog sensor must be cheaper, compared to $10 Melexis part. But it needs Delta Sigma ADC, for example PSoC5, which is more expensive than e.g PSoC4.

Note that equations (1) and (10) in the above App Note are incorrect.

/odissey1

0 Likes

Hi,

In range of Tobj=30 to 47C & Tntc = 0 to 50C, value of K varies from 0.000000000000835174699521675000(max) to 0.000000000000772644023249283000(min)

I took average of all values of K, and in final calculations, when Tobj is calculated from known Vtp,K & Ta , it gives error of 1C to -0.2C,

This is too large of error even for small range.

BTW

I had detailed discussion with manufacturer. They have given this equation. Need to find two unknowns in below equation:

Vtp = K( Tobj^(4-n) - Ta^(4-n) )

Company says K & n are empirically determined value & this they wont tell.

Vtp is in volts

Tobj & Ta are in kelvins

Here is 38301 dataset: https://drive.google.com/file/d/1Kzok_MVeLRNiUz59HZl6xHrpkh5dg3mg/view?usp=sharing

From these 38301 dataset values, we need to find best fit values of K & n, so that in final calculations when Tobj is to be calculated from known values of Vtp,Ta,K & n, Tobj has minimum error.

0 Likes

ViTa,

Too bad, this equation invokes fractional power calculations, which is very slow

Vtp = K( Tobj^(4-n) - Ta^(4-n) )

/odissey1

0 Likes

Have enough memory and power, so not an issue, will call math library pow().

Thing is how to find values of K & n

0 Likes

ViTa,

I believe that Excel has minimization function, which can optimize K and n over the dataset.  Something like equation solver. I am not an expert on that.

/odissey1

0 Likes