oil/coolant temp sender

I have the resistance curve of the sender.

Temp.
°C        R      ±Tol    ±Tol
        (Ohm)    (%)     (Ohm)
-40.0  17162.35  16.93  2906.00
-35.0  12439.50  16.32  2029.83
-30.0  9134.53  15.72  1435.77
-25.0  6764.48  15.13  1023.58
-20.0  5067.60  14.56  737.59
-15.0  3833.89  14.14  542.02
-10.0  2929.90  13.75  402.82
 -5.0  2249.44  13.37  300.80
   .0  1743.15  13.00  226.69
  5.0  1364.07  12.65  172.56
 10.0  1075.63  12.34  132.75
 15.0  850.09  12.18  103.51
 20.0  676.95  12.02  81.36
 25.0  543.54  11.74  63.83
 30.0  439.29  11.50  50.52
 35.0  356.64  11.38  40.59
 40.0  291.46  11.25  32.79
 45.0  239.56  11.11  26.62
 50.0  197.29  11.20  22.10
 55.0  161.46  10.86  17.54
 60.0  134.03  10.04  13.46
 65.0  113.96  9.86   11.23
 70.0  97.05   9.87   9.58
 75.0  82.36   9.49   7.82
 80.0  70.12   9.21   6.46
 85.0  59.73   8.91   5.32
 90.0  51.21   8.48   4.34
 95.0  44.32   8.07   3.58
100.0  38.47   7.74   2.98
105.0  33.40   8.18   2.73
110.0  29.12   8.59   2.50
115.0  25.53   9.22   2.35
120.0  22.44   9.89   2.22
125.0  19.75   10.53  2.08
130.0  17.44   11.16  1.95
135.0  15.46   11.82  1.83
140.0  13.75   12.49  1.72
145.0  12.26   13.17  1.61
150.0  10.96   13.86  1.52

I need help with witch code to run with this data.
If anyone has a sketch to send me to that would be awesome thanks!

Not sure what you really want since you said nothing. You posted a bunch of numbers, instead of the product ID number and a vendor name. I'm sure my google search will come up empty if I just copy/paste your numbers to google search bar. What do you want? A mapping from resistance to temperature?

Sorry new to arduino/coding/this forum bare with me please:(

Its for a VDO temperature sensor 1 wire, 6-24vdc 0-150*C max
I just want to be able take the measurement and display the temp in *F, and also need to know the resistor I need for the voltage divider.
Please and thank you!

So this sensor is resistive and can be used with 6-24VDC range? I checked online but can't be too sure I found what you mentioned:

http://www.vdo-gauges.com/sensors/temperature-sensors-switch.html

If your sensor is purely resistive, then you just need a voltage divider to read its output.

I have a tutorial on temperature sensors:

You can find resistance with this formula if you used a 10K ohm known resistor so replace with your value:
R=V/(5-V)*10KOhm

What is the typical temperature you expect to read? Use a resistor that has the value matching your sensor's typical resistor will improve accuracy.

Once you get the resistance with arduino, you need to search your table and interpolate to find the temperature.

VDO temp sensor is what I will be using

Data table 1 on page 10
is where i got my data.

the operating temp will be between 170 - 185 *f

so the resistance would be 59.73 Ohm?

still so confused.

awww! this is way over my head.

I used the code on the link you sent me and it seemed to work reasonably well considering the poor test environment I had. only problem was slow response time and didn't want to read under 83*f.
could this be caused by a old sensor (sensor is almost 40 years old) , poor connections I had, or is there anything I could change to the code with the data I supplied to get better accuracy?

The sensor is a thermistor. That means you can fit the data with a simple function on that tutorial with the following values I just calculated:

R1 B T1
294.95(ohm) 3876.548(Kelvin) 313(Kelvin)

This way you don't need a table, just the formula. The result is in Kelvin temperature scale.

I made the fit less accurate at low temperature to make it better fit at high temperature, which is where you need. I am not too sure why your reading only gives 83F or higher. Maybe the fixed resistor you are using is relatively small, around 65ohm. That makes lower temperature readings less accurate due to less distinguishable voltages from different resistance values (all of which are large, making the voltage readings all pretty small). Arduino is not the best device to measure this sensor. If I had more money, I would go with a thermistor sensor circuit/meter. It usually provides a constant current and measures the voltage drop across the thermistor.

Ok I think I have it.

Getting a temp thats < 10*f off

Just to double check though

If the sensor range is 0-150c

(0c=3240.19)

(75c=138.38)

(150c=18.59ohms)

R=138
T=75c
B=3947

And the fixed resistor could be 130ohms?

And the code would look like this.

float resistance, voltage, r_fixed, T0, T, R0,B;
T0 = 348.15;//initial temperature for calibration
R0 = 138;//initial resistance for calibration
r_fixed = 130;//known resistance
B = 3947;//B for normalization
Serial.println(“Temperature”);

Thank you very much for your help and patients!

That's about it. Give it a try.