I'm trying to implement an electronic temperature sensor that gives a resistance value. The sensor is a Honeywell TD4.
In the datasheet, they give a table of values :
- -40ºC => 1584Ω ±12Ω
- -30ºC => 1649Ω ±11Ω
- -20ºC => 1715Ω ±10Ω
- -10ºC => 1784Ω ±9Ω
- 0ºC => 1854Ω ±8Ω
- +10ºC => 1926Ω ±6Ω
- +20ºC => 2000Ω ±5Ω
- +30ºC => 2076Ω ±6Ω
- +40ºC => 2153Ω ±6Ω
- +50ºC => 2233Ω ±7Ω
- ... (up to 150ºC)
They give a quadratic equation for computing resistance given the temperature:
$R_T = R_0 + (3.84×10^{-3}×R_0×T) + (4.94×10^{-6}×R_0×T^2)$
- where $R_T$ is the resistance at temperature R,
- $R_0$, resistance at 0ºC and
- T the temperature in ºC.
we now want to get this equation the other way around, i.e. having the temperature given the resistance: $T = f(R_T)$
As we wanted to reduce the equation to get only one $T$, we calculated the discriminant, so we get :
$∆ = b^2-4ac = (3.84×10^{-3}×R_0)^2 -4×4.94×10^{-6}×R_0×R_0$ $∆ = (3.84×0.001×1854)×(3.84×0.001×1854)-(4×4.94×0.000001×1854×1854)$ $∆ = -17.236077350399988$
It is negative, thus there is no real roots, only the complex ones...
But our problem is that we want to come with a formula up we can implement in a microcontroller to get the value with the best precision... But my mathematics skills from highschool are far behind (if I knew at that time that I would actually have to solve such an equation in the real world ;-)). I may be wrong in the way to extract $T$ from $R_T$'s formula. But then what could be the good way ?
While I don't have a solution, I'm implementing in the microcontroller a linear formula for each segment of the given table...