|
|
View previous topic :: View next topic |
Author |
Message |
RRR2 Guest
|
Resistance to Temperature |
Posted: Wed Sep 09, 2009 4:19 am |
|
|
Hi,
I´m trying to make a conversion table, to read a temperature.
I already have the table in paper, but i can´t make in C.
What I´m trying to do is this:
Read the ADC-> Calc the RESIT. -> and them go to a table get the values.
On that table need (based on the previous calculated resistance) the closest lower value, the closest higher value, and the closest lower temperature.
Them with this I can calculate the temperature using interpolation,
(measured value - closest lower value)* resolution in ºC
----------------------------------------------------------------- + closest lower temperature
closest higher value - closest lower value)
Example:
My table on paper:
ºC-------Ohms
... -------....
5 -------101.95
10-------103.9
15-------105.85
20-------107.79
....-------.........
So lets say I have calculated a resistance of 104 Ohms.
I need to get from table the value 103.9 Ohms, 105.85 Ohms and 10ºC.
How can i make this?
Where direction i have to take?
I´m begin to write in C, and i don´t have the necessary skills to do this, or where start.
Thank´s in advance. |
|
|
PICoHolic
Joined: 04 Jan 2005 Posts: 224
|
|
Posted: Wed Sep 09, 2009 6:23 am |
|
|
One solution is to do interpolation.
One way is to get the slope and the offset between the two points where your value belongs and consider it as linear.Apply your value and get the temperature.
Good Luck... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|