Hi ETO
I am using an automotive coolant temperature sensor on a 16F1827.
The sensor is wired to +5 volts and AN0 with a 4K7 ohm pull down resistor.
At 32 Degrees F the sensor is 6000 ohms.
At 77 Degrees F the sensor is 1700 ohms.
At 212 Degrees F the sensor is 176 ohms.
I would like to display degrees Fahrenheit on the LCD but the ADC readings seem to change exponentially.
What kind of formula do I need to convert the output?
I am using Hi-Tech C so there are plenty of functions to work with.
Or could I hook it up differently to get a more linear output?
These are my readings and a graph.
Give me a table of resistance vs temperature (at least every 10 degF) and I will suggest a resistor network to put around the sender to better linearize it.
What type of sensor are you using? Since you talk about resistance, I'm thinking thermistor or RTD. Thermistor usually follow a non-linear (log) curve.
I think it is probably a thermistor. It came out of a sending unit for an analog temperature gage on a Nissan, circa 1980. It is in a little glass bead, 3/16" diameter. It does look like a non-linear (log) curve on the graph. I just chose the 4.7K resistor because it gave me a wide spread between freezing and boiling.
What is the best way to hook up a two wire variable resistor to an ADC?
How would you make a log curve linear mathematically?
It is wired +5v---- thermistor----AN0----4.7K----ground.
Would this be better? +5v----4.7K----thermistor----AN0----4.7K----ground.
I have run into this problem before. The time between pulses on a tachometer is also a log curve. It would be nice if we could sort it out.
I like that LM34 Precision Fahrenheit Temperature Sensor.
This sounds kinky.
I think it is probably a thermistor. It came out of a sending unit for an analog temperature gage on a Nissan, circa 1980. It is in a little glass bead, 3/16" diameter. It does look like a non-linear (log) curve on the graph. I just chose the 4.7K resistor because it gave me a wide spread between freezing and boiling.
What is the best way to hook up a two wire variable resistor to an ADC?
How would you make a log curve linear mathematically?
Shows the thermal response of the TO92 package for a step change in temperature. (dunking the sensor in the oil bath). Stirred oil conducts heat well, so they are measuring how long it takes the internal die to heat up through the plastic walls...
Give me a table of resistance vs temperature (at least every 10 degF) and I will suggest a resistor network to put around the sender to better linearize it.
A good example of logarithms is the stock market. It has typically grown 10% per annum. Plot this on a linear scale and you get an exponential graph. Plot on a logarithmic scale and it's a straight line. When it varies from the logarithmic line you should worry.
Mike.
If all you need is from 50 to 100 degF, it may be easier to split the readings in two. One linear equation for anything between 50 and 70, and one linear equation for anything between 70 and 100.