Temperature sketch

I'm a Noob and cannot figure out how to make a sketch that gives me the correct information.

My sensor is an automotive coolant temp sensor that has a range of -67F to 428F. I want to read and display the temp from my engine oil and tranny fluid. My display is 16x2 and I know how to program that.

I know that at 32F with a 10k resistor I get 2.38v. At 203F with a 10K resistor I get .10v. I got those numbers from a voltage divider.

I have the following numbers written down but, can't remember how I got them.

32F = 273.15K
203F= 368.15K

Using the Analog Read Serial example for the Uno I get 490 @ 32F, and 19 @ 203F, both with a 10K resistor.

I have searched everywhere, for the last 8 days to find the correct sketch or how to get the correct data to put into the Uno and now I'm just plain pissed off that I'm to stupid to figure this out.

Any help that any of you kind people could would provide me is greatly appreciated.

thebeerman:
I'm a Noob and cannot figure out how to make a sketch that gives me the correct information.

My sensor is an automotive coolant temp sensor that has a range of -67F to 428F. I want to read and display the temp from my engine oil and tranny fluid. My display is 16x2 and I know how to program that.

I know that at 32F with a 10k resistor I get 2.38v. At 203F with a 10K resistor I get .10v. I got those numbers from a voltage divider.

I have the following numbers written down but, can't remember how I got them.

32F = 273.15K
203F= 368.15K

From converting the temperatures in F to Kelvin - you can even convert by typing "32F to K" in google, I think. Kelvin uses degrees the same size as degrees C, but the zero point is absolute zero, instead of the freezing point of water.

Using the Analog Read Serial example for the Uno I get 490 @ 32F, and 19 @ 203F, both with a 10K resistor.

How do you have it wired? Is anything else connected to the sensor (including electronics built into the car)? If it's connected to other stuff, depending on how it's wired, adding that resistor could throw off the readings, which is why I ask.

Those numbers perfectly match the voltages you mentioned above - The Arduino runs at 5v, and analogRead returns values between 0 and 1023. So 490 is around the 2.38v and 19 is around the 0.10v.

Is there a datasheet that explains what the expected output of the sensor is?

I have searched everywhere, for the last 8 days to find the correct sketch or how to get the correct data to put into the Uno and now I'm just plain pissed off that I'm to stupid to figure this out.

Welcome

The UNO has a raw range of 0-1023
IF you are using the 5 volt supply as a reference you can convert this to voltage range 0-5V

If an analog input gives a reading of 512 (mid range) to your sketch.

(512*5)/1024 = 2.5V

You will never find a sketch to do exactly what you need for your project.
Except in your head :wink:

What part are you having trouble with?

You should probably have several more check points - I would suspect that the output of the automotive temperature sensor is non-linear (not a straight line from 32 degrees F to 212 degrees F) when you plot temp vs resistance.

If the OP gets a graph of the range, they can create a lookup table or use linest in EXCEL to get the formula for the sensor.
.

Thank you to everyone for the rapid response. Especially the pic of the adorable puppy.

Here is the data sheet -> https://phoenixsensors.com/wp-content/uploads/2015/09/PTS40-Temperature-Probe-v2.pdf

I have never seen a datasheet before and I don't understand what all the numbers mean. I took time to try to understand it by experimenting with my DMM. Based on 0c my numbers were no where near the numbers from the datasheet, same with the temp being 95c. So I decided to find my own numbers.

I am currently just trying to get the sketch written at my desk with only the temp sensor hooked up to the Uno through a breadboard, so I am using 5v.

I guess what I need to know is what would be the proper way to convert v to temp? I have tried different equations and formulas in sketches, but it never displays the correct temp. And the temp difference in not by an understandable amount. The thermistor will be in 32F water verified with an extremly accurate thermometer and my Serial Monitor will say the temp is 458f. I change the sketch and the temp will read 215f.

If I was a lot smarter I would have given up on the Audrino last week, but, I really want to learn this because of the capabilities. Maybe I'm to old to learn new tricks. Anyway, thanks for any info.

What is the part number for the one you are using? That datasheet can cover many different units. The key is the bit at the end that tells you the resistance at 25C.

The table that they show in the datasheet only covers the 100K ohm version. You appear to have maybe the 5k one? Something like that...

So, find out what version. Then - you need to figure out how to get the correct RT table for the part you have. Try asking Pheonix Sensors support. I love the "Other RT tables are available" - without mentioning where they're available from!

I suspect you're doing the right thing, or close to it, in general - but you don't have the RT table for the part you actually have, so you don't know the resistance values that correspond to each temperature.

DrAzzy:
What is the part number for the one you are using? That datasheet can cover many different units. The key is the bit at the end that tells you the resistance at 25C. --->The original part number was AC Delco 213-928. I Googled to find out that AC Delco's part number crosses to this exact part number Delphi TS10075.

The table that they show in the datasheet only covers the 100K ohm version. You appear to have maybe the 5k one? Something like that... I made the same conclusion that I must have the 5k version.

So, find out what version. Then - you need to figure out how to get the correct RT table for the part you have. Try asking Pheonix Sensors support. I love the "Other RT tables are available" - without mentioning where they're available from! --->I contacted them last Tuesday and Thursday and have not heard back.

I suspect you're doing the right thing, or close to it, in general - but you don't have the RT table for the part you actually have, so you don't know the resistance values that correspond to each temperature.

So, what would be the correct way to sketch this?