0
\$\begingroup\$

I have a Pyrometer datasheet showing signal percentage (0 to 100%) with the corresponding respective temperatures (from 0 to 200 °C) and current values (from 0 to 20 mA) in the whole measuring range.

pyrometer_datasheet

Practically, I get the Pyrometer signal output as a voltage which I want to convert into temperature by using the above data. What is the procedure to do this?

\$\endgroup\$
5
  • \$\begingroup\$ What is the burden resistor value and is the response linear or quadratic in nature? \$\endgroup\$ – Andy aka Aug 15 '19 at 9:51
  • 1
    \$\begingroup\$ share the datasheet and what does the datasheet say? \$\endgroup\$ – User323693 Aug 15 '19 at 9:53
  • \$\begingroup\$ I am unable to post all the info of datasheet, but I have shared singal and temp values through an image. Please check it. The other details from the datasheet says that the output of the signal is in volts (output ranges from 0 to 1 V) and the maximum impedance is 500 Ohms \$\endgroup\$ – Aaron Winter Aug 15 '19 at 12:45
  • \$\begingroup\$ can you use the table itself as LOOK UP TABLE in your code (MCU or Arduino or PC)? when the signal voltage is not exactly between the two points, you can interpolate linearly \$\endgroup\$ – User323693 Aug 15 '19 at 12:49
  • \$\begingroup\$ yes, I can use it as look up table in PC. But, what exactly means 'the signal voltage is not exact between two points'? Please clarify it. \$\endgroup\$ – Aaron Winter Aug 15 '19 at 12:54
2
\$\begingroup\$

You have a table with 100 values in terms of temperature. It's clearly nonlinear to some degree (not insanely so over that range).

So you have a few ways of proceeding. Generally what you want to do is to fit the data to a function f so you can find T = f(a) where a is a variable that goes from 0 to 1 for 0 to 100%.

There are many ways to go about that. One is to find a polynomial of some degree that minimizes the least-squares error for each point. If the power is less than 100 you'll have some error, and generally the whole thing will get more numerically unstable the higher the degree. You could try fitting a polynomial of reasonable degree (say up to about 8) and see how well it fits with the points and how it behaves between the points.

One method that uses more storage but is typically very numerically stable is to use cubic splines where the result is a smooth (differentiable) curve that passes exactly through each of the given points and behaves reasonably between them.

The numbskull simple method is to store the points and do linear interpolation rather than a cubic spline. That's like drawing a straight line between the points, so it's ugly but it hits all the points exactly and isn't too crazy between the points if there are enough and the curve isn't too nonlinear.

The optimum method will depend on the computing resources available and the required bandwidth and the required accuracy. Since the variable is temperature, the bandwidth is likely rather low, and since the numbers are only given to 4 digits probably the accuracy isn't all that demanding either.

MATLAB (curve fitting toolbox, ideally) which is very much not free, or one of the free programs with similar capabilities (Octave or Scilab) is an easy way to proceed and you can easily find how to do it with the search terms provided. You can even use Microsoft Excel in some cases.

Note that numerically poorly conditioned algorithms can have unexpected results since you end up coming with a result that subtracts almost-equal large numbers from each other, and truncation or rounding can affect the results cosmetically or even materially, so be sure to check the algorithm carefully before deploying it.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ thank you so much for the answer.... i will try the method you have explained \$\endgroup\$ – Aaron Winter Aug 15 '19 at 15:46
  • \$\begingroup\$ Excel has a decently good polynomial fitter, which is considerably less expensive than MATLAB. Depending on your platform it may make more sense to do interpolation than all the floating point math, however. \$\endgroup\$ – BB ON Aug 15 '19 at 19:07
  • \$\begingroup\$ @BB ON You can do polynomial evaluation with fixed point math on an 8-bit micro if you really want to. Back 20 years ago I did it a lot. \$\endgroup\$ – Spehro Pefhany Aug 15 '19 at 19:09
0
\$\begingroup\$

I'm assuming you're using a microprocessor.

The output pin of the pyrometer will have to go through a resistor to ground to turn current into a voltage, and your processor will then measure this voltage over the resistor. Let's assume your processor works of 3.3V. Then the maximum output of the pyro should result in 3.3V, which means your resistor should be

3.3V/20mA = 165Ohm

Then, you use your processor's ADC to measure this voltage. The ADC's output will come in digital format, let's call this digits. Let's also assume your ADC is set to 10bit. Then the voltage measured by your processor will be:

voltage = digits * 3.3 / 2^10

To turn this into a temperature you will have to work it back:

temperature = voltage * 200 / 3.3
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.