I'm fairly new to arduino and i'm trying to build a OEM-look oil-temperature gauge for my car.
The sensor i'd like to use is 2-pin with the following data given:
What i've already learned is, that a termistor is only accurate within a given range.
Since an accuracy of 1°C would be nice i think i need to use more than one resistor for the whole thing.
But is this realistic to setup?
Also, a secondary goal would be to not have a gauge that is jumping numbers multiple times a second. Someone mentioned "hysteresis".
Some tips for starters would be great, even if i think this might be not the best project to start with, but "think big".
Oh, and arduino (nano) with a 128x32 OLED is already connected to a breadboard and is up and running!
You would not be able to get 1 degree accuracy over that entire range using a voltage divider, unless you switch out both the resistors and the calibration parameters (one set of calibration parameters for each resistor).
Consider a thermocouple gauge. They are much more linear, have a far wider range and don't rely on voltage dividers.
With a 220ohm pull up resistor I calculated 23 A/D values between 0 and 10 degrees, and 35 values between 140 and 150C. That should be enough for a one degree C display over the whole range.
Calibrate the sensor at the normal running temp of the engine (about 100C ?).
Leo..
If it makes things easier, a Range from 50-150°C would be okay, too.
Oiltemp of sub-50 is irrelevant and could be displayed as "--" or similar. So that leaves a resistor range of 660-40 ohm. Would that be easier?
The reason why i'd like to use this sensor is, that is has the right thread to be fitted on the car. Other solutions require glueing sensors into adapters which i don't like because of possible failures which would be a deasaster.
Highest resolution (most A/D values per degree) is when the thermistor value is about the same as the fixed resistor.
A 220ohm resistor covers the whole 0-150C range with a resolution better than one degree,
with a peak resolution at about 80-90C.
Leo..
Wawa:
With a 220ohm pull up resistor I calculated 23 A/D values between 0 and 10 degrees, and 35 values between 140 and 150C. That should be enough for a one degree C display over the whole range.
Calibrate the sensor at the normal running temp of the engine (about 100C ?).
Leo..
Only if you're very lucky and have little analog noise.
Why not use a temperature sensor with linear output over the whole temperature range if you want
good accuracy?
MarkT:
Why not use a temperature sensor with linear output over the whole temperature range if you want
good accuracy?
Because i'd like to use a sensor that has a 1/8" NPT thread on it. And there seems to be not so many available options. Thats why i linked to the one i'd like to use. But i'm open for alternatives.
A 220ohm resistor covers the whole 0-150C range with a resolution better than one degree,
But not accurate to one degree (using the Steinhart-Hart approximation), even if the table posted in the OP is exactly correct and could be exactly measured.
joshude:
Will this make things easier with the MAX31865 and the sensor linked above?
I am using this MAX31865 and a PT-100 sensors and pleased with a stability of results using 3-wire connection. 4-wire should be even better. Be aware that PT-100 probes have a different grades (accuracy)
Class AA ± (0,1+0,0017 * t), ±0,1 °C (0 °C), ±0,27 °C (100 °C)
Class A ± (0,15+0,002 * t), ±0,15 °C (0 °C), ±0,35 °C (100 °C)
Class B ± (0,3+0,005 * t), ±0,3 °C (0 °C), ±0,8 °C (100 °C),
Class C ± (0,6+0,01 * t), not commonly used for industrial measuring circuits.
wvmarle:
At such low resistance and resulting high currents (approx. 1-20 mA over the full range) self-heating of the sensor may become a serious problem.
p=IIR. 0.020.02100=0.04 Watt. Can't see any problem with self heating excluding extreme cases.
Except that this heat is generated inside the device itself (so higher than what you feel on the outside), and just a few degrees of self heating (which is generally too little to even feel) will throw off your measurements.
Self heating is why you normally try to keep the total resistance >10k so current <0.5 mA. That's 2-3 orders of magnitude less.
Self heating is a problem for bare sensor gas temperature measurement. If it's in a thermowell and measuring oil temperature - all self heating will be carried away.