Helli guys,
I am making a project to read coolant temp in my car,
I am using a 2.2k thermistor, i tested in the engine bay with short wires and it worked fine, but when i test it inside the car with a little bit over meter long wire(the input wire) and whenever the radiator fan works or i turn on the AC, readings go crazy, spikes to 150+...
What is the solution for that?
You need line drivers and receivers for transmission of information over long wires.
Common solutions are 4-20mA current loop for analog values, or e.g. a CAN bus for digital values obtained by a microcontroller near the sensor. Also use twisted pair cable to reduce noise pick-up. And avoid ground loops...
Is that 2.2K under "normal conditions"? That's low enough that it should be fairly immune to noise. What's the other fixed-resistor value?
You can probably filter the noise by adding a capacitor between the Arduino's analog input and ground. You may have to go as high as 100uF or so. You can also use some [u]software smoothing[/u], but I'd recommend at leaving at-least a "small" capacitor (0.1uF minimum).
And, I'd slow the whole thing down to maybe one reading per second, or maybe even slower (before smoothing). And, you could add some "fuzzy logic" to throw away any "unreasonable" spikes that are out-of-line with the average.
P.S.
You may also have a ground loop... If the thermistor has one end grounded (there's more than e way to wire it) you should have a separate ground wire running back to the Arduino circuit. Don't ground it at the radiator unless it's an "automotive sensor" that's automatically grounded when you mount/install it and you don't have a choice.
The other resistor is also 2.2k and yes thermistor has to be grounded to the engine, i will try to seperate it by insulating it.
And i will try the capacitor and get back with the results
Thanks