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.

TMP007 Calibration guide's questions

Other Parts Discussed in Thread: TMP007, TMP006

Hi,

I have downloaded SBOU142. It is very helpful to me. I have 2 questions.

1) How to derive parameters such as A1, A2 and so on, from calibration? Do you have spreadsheets, scripts  or hyperlink to software tool?

2) I section 1.2.3, "Note this introduces a time constant of approximately 5 times the sample rate as set in the Configuration Conversion Rate bits", how to understand this statement? What do 5 times mean?

Thanks,

Luo Sheng

  • Hi,

    Thanks for using TI E2E forums. We have received your questions. We will review them and get back to you.

    Mayrim

  • Hi,

    I am happy to hear the TMP007 Calibration Guide SBOU142 was useful to you.

    1) How to derive parameters such as A1, A2 and so on, from calibration? Do you have spreadsheets, scripts  or hyperlink to software tool? We will have a tool, EasyCal, released in near future. It will accept data and generate the co-efficients for you. Until it is available, the calibration guide provides the specfic equations used in the TMP007 math engine. There are many routines availabe in commercial packages such as MATLAB, etc that perform curve fitting to a given function.

    2) I section 1.2.3, "Note this introduces a time constant of approximately 5 times the sample rate as set in the Configuration Conversion Rate bits", how to understand this statement? What do 5 times mean? The weighting co-efficients shown in section 1.2.3, equation 6 are 0.2 for the first term and 0.6 for the second term. This means in presence of a step change in temperature, it will take about five conversions to reflect the new value of the step change. For a default one second conversion rate, this means about 5 seconds to stabilize at the new value.

    Hote these weighting co-efficients are programmable, so the time constant can be tuned to the specfic application.. The effective time constant will be roughly the ratio of the two weighting co-efficients.

    Hope this clears up any ambiguity for you,

    Regards,

    Werner Metz

    Thermal IR Systems Engr

     

     

  • Hello Werner,

    Thanks for your clarification.

    Regarding curve fitting, I have tried to use Matlab lsqcurvefit and nlinfit functions to generate reasonable co-efficients. But I did not succeed because of multiple variables. Could you please give some hints to program Matlab scripts or give me Matlab example codes? Thanks.

    Best Regards,

    Luo Sheng

  • Hi Lou,

    My version of MATLAB is older and does not support lsqcurvfit and nlinfit functions so can't comment on those. Maybe someone out there can advise.

    Simplest strategy is brute force - set a while or for loop for each co-eff with an upper and lower limit and step size (or number of steps). Nest the loops to cover all possibilites in the search space. Then calculate the predicted value versus the measured value of Vsensor for each Tdie/Tobj combination. Store the error metric for each combination of co-efficients in an array and at the end, search for the 'best' value of your error criterion and the co-eff values asociated with it.

    Common criteria for best fit are either the minimum max error or the average rms error across a data set. Once an initial candidate set of co-effificents is found, a subsequent search with smaller bounds and finer steps can determine if there is opportunity for significant improvement. It is often helpful to use MATLABs graphing capabilties to determine where in the Tdie/Tobj space the errors are occurring and  the magnitude of the errors.

    The MATLAB function fminsearch 7028.MATLAB fminsearch.pdf may also be useful. It allows you to specify a function and a data set, then adjust the co-efficients of the function to map the data set. The function should be the one used by the TMP007 as specified in the calibration guide.

    Finally, in mid-October we should release EasyCal which will have co-eff generation routines built in.

    Regards,

    Werner

     

  • Has EasyCal been released yet? I'm at this same stage in the process. Also, what is the difference between the TMP006 and TMP007? The TMP007 has a 'math engine' but it's hard for me to tell what that's actually doing and how much 'better' it is over the TMP006. 

  • Hi,

    The TMP007EasyCal release is anticipated for mid - fourth quarter, 2014. Please check the TI web site periodically for the exact release date (it will appear in the TMP007 product folder).

    The TMP006 provides the sensor voltage. Using the sensor voltage and local temperature values, an external processor must caluculate the object temperature. The calculation involves fourth roots and fourth powers among other operations, which requires either a floating point processor or a capable fised point processor and careful attention to range issues in the calculation. The TMP007 math engine uses the sensor voltage and local temperature value to calculate the temperature and place the result in a register. The temperature value can then be read directly from the register by the host processor with no further processing required.

    In addition, with the TMP007 because the temperature is calculated onchip it is possible to set an ALERT function. If the temperature goes out of preset bounds, the TMP007 will Alert the host processor via an ALERT pin. This is useful to reduce load on the host processor and also to allow the host processor to power down and activate the system only when a temperature excursion requires action. See section 7.4.2 of the TMP007 data sheet for further description of the Alert function.

    Regards,

    Werner

  • Werner, thanks for the response. That was a great description of the difference between TMP006 and TMP007. In regards to EasyCal, I'm in the same spot as Sheng where I don't really have a good way to calculate the coefficients without it, rendering the part practically useless. Is there someone I can talk to about this? We're on a bit of a schedule.

    Thanks,

    Mike

  • Hi Mike,

    There are two options in the near term. THe first is a brute force search. To begin, leave teh a co-effs at the default values. An initial esstimate for the S0 co-eff can be calculated as the material emissivity times the default value. For the b-values, these are system dependnet so try a range arround the default values.

    Next step is to write a program of nested do loops, calculating the prediccted temp - measured object temp using the calibration equaton in the calibration guide for each combination of Tobjand Tlocal used in the data set. Concept code looks someting like

    For Tobj(meas)

    For Tlocal(meas)

    For S0 (Smin, Smax, Sstep)

         For bo(b0min, b0max, b0step)

              For b1(b1min, b1max,b1step)

                   For b2(b2min, b2max, b2step)

                       SUM  [ Tobj(calc)-Tobj(meas)]^2

    End

    Add the error terms together for each set of co-effs and select the set of co-effs with the smallest average error. After finding an initial set of co-effs, yu can repeat the process with smaller steps/bounds centerd on the new values to improve the fit. A three-d plot is often useful to (Tobj on axis, Tlocal on y axis and erro on z axis) to determine where in the temp range the errors are dominant.

    If you want to discuss your specific application in more detail, mail me at wmetz@ti.com .

    Regards,

    Werner Metz

     

  • Hi

    I see only S0,B0,B1,B2 used,A1,A2 and C2 don't need?
  • Hi Bing,

    Let's me take a look, and get back to you.

    Aaron
  • Hi Aaron,

    OK,Thanks!

    Bing
  • Hi Aaron

    I have another question,i don't know what the relationship emissivity whit S0,i see "S0 is the material emissivity × the Stefan-Boltzman constant, εσ" in the datasheet,is right?But i used the default value 4.430E-14 of S0 to calculate by the formula "S0 = εσ",σ = 5.7 x 10e-12,and got the ε is not 0.95.So i want to know why?

    Bing
  • Hi Bing,

    I am so sorry for the late response. Once you have your temperature calibrated, and find your calculated coefficient then these coefficients will load into the registers.

    Hope this helps!

    Aaron