Non linear ect sensor data

Hi again, i am finished my water temp gauge for Renault Twingo.

It is look like this. It show temp data with horizontal bar. Also shows ambient temp on bottom right corner.

i want to make another, but my ect sensor is not linear. I read ect sensor voltage on a0 pin of arduino nano.

Here is my readings.

215 @ 60c
165 @ 65c
160 @ 70c
135 @ 75c
130 @ 80c
120 @ 85c
100 @ 90c
92 @ 95c

How can i convert this readings to the temp data in celcius.

Use a table (an array) to convert from read values to centigrade. Use interpolation for values between the array indexes.

Try this

Capture

The best linear fit I could come up with is
Temperature = analogRead(pin) * -0.28 + 116;

thanks but i dont know how to use this.

From this graph we can see that data in the table is probably not really accurate...
Also the curve of the graph is determined by only one point (the one most right) that is pretty far off a straight line. All the others are on a straight line...
I would measure the whole lot again...

float temp_in_C = 157.2 - 0.837*x + 0.00178*x*x;

Where "x" is the sensor reading.

my car dont have obd but i have a lpg system on my car. read temp values from my lpg kit software and also read serial data from my nano. i record my screen while driving and this was result.

this was almost perfect but i definitely sure analog read 92 is 95 degree celcius because my cars fan will going work at this moment.

1 Like

Linear fit for comparison:

Capture

this was very close but when my readings getting higher, temperature rising instead of decreasing. but after 60 degree celcius this is really good

I don't understand what you are trying to say.

The data you posted are obviously noisy and unreliable. For better results, please repeat your measurements, 2 or 3 times, and average the results.

sorry for my english, for example my reading from a0 is 360 at aprrox 25-30 degrees, but when i use this formula it shows almost 60 degree celcius. But after 60 degree celcius this formula really worked well. Almost no mistake.

What formula?

Using the formula in post #10

118 - 0.296*360 = 11.4

Here is my screen record.

Please post the data as text. No one wants to watch a fuzzy video of your screen.

Did you use the quadratic fit?
You cannot use it outside the area where you collected your data....
And 360 is pretty far out that range...

Thx guys i will took another records later for more detailed conversion.

Don't forget to measure before you start the engine!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.