# Interface Temperature Sensor

1. ## Interface Temperature Sensor

Hi,
I am having an air conditioner temperature sensor for ambient temperature measurement, which value is not in linearity. How to make out the temperature by using only the ADC Value to get degrees in the C code like any formulas.
For a example this is my temperature sensor chart:

Code:
```Celsius Ohms(K)  Voltage   ADC value
15	7.447	2.968	151.349725
16	7.148	2.918	148.8211329
17	6.863	2.868	146.2916277
18	6.591	2.819	143.762488
19	6.332	2.769	141.2354022
20	6.084	2.720	138.7136521
21	5.847	2.671	136.1970731
22	5.621	2.621	133.6903596
23	5.404	2.572	131.1935588
24	5.198	2.524	128.7084369
25	5.000	2.475	126.2376238
26	4.811	2.427	123.7795133
27	4.630	2.379	121.34396
28	4.457	2.332	118.9245804
29	4.292	2.285	116.5251927
30	4.133	2.238	114.1480651
31	3.981	2.192	111.7936309```
Help me to solve this problem......

•

2. ## Re: Interface Temperature Sensor

You need to know your sensor's voltage(resistance)/temperature relationship. You don't tell us if it's a thermistor, RTD, thermocouple, diode or what. The manufacturer should provide that information.

3. ## Re: Interface Temperature Sensor

I can’t find any datasheet or part number for my temperature sensor. All the air conditioner having a sample type of sensors.
Click this below link for the image
https://encrypted-tbn0.gstatic.com/i...PCpTWZ1fxDH2m0

•

4. ## Re: Interface Temperature Sensor

Originally Posted by nis2311
How to make out the temperature by using only the ADC Value to get degrees in the C code like any formulas
There are numerous regression calculator websites on the web on which you can insert the above input/output table, obviously selecting just one pair of parameter ( e.g : Celsius / ADC value ). These tools give you the formula that estimates with a reasonable accuracy the output value depending on the function chosen for this, usually polynomial of order 2 or 3. You can try this one, seems promising: https://planetcalc.com/5992/

•

5. ## Re: Interface Temperature Sensor

Hi,

There are numerous regression calculator
Even EXCEL can do.

Klaus

6. ## Re: Interface Temperature Sensor

I recomend to use curve expert sw. Very easy to use.

7. ## Re: Interface Temperature Sensor

This site help me to solved the problem "https://planetcalc.com/5992/"

8. ## Re: Interface Temperature Sensor

The resistance curve seems to show a 5k NTC. To calculate the translation to voltage and ADC value, you need to know the circuit, apparently a voltage divider. The transfer function can be calculated using the formulas given in NTC application literature.

For the apparently very small temperature interval, it can be easily fitted by polynomial, as discussed above.

•

9. ## Re: Interface Temperature Sensor

Realy ? not linear ?
what is the problem ?

on a very short range of temperature , even a CTN could be considered as linear

Originally Posted by nis2311
...which value is not in linearity.

10. ## Re: Interface Temperature Sensor

Strictly speaking, every natural phenomenon is non-linear in some extent, and unless a detailed inspection is made - such as the one you did - it is not possible to know beforehand whether it is feasible to optimize it for the specific case of the 1-order polynomial (linear). In the above range, by visual inspection it is clearly the case. BTW, depending on the region that the PTC is biased, it may exhibit greater non-linearity

--[[ ]]--