Drive a 66 Corvair Head Temp Gauge w/ Nano

Background: The thermister that drives the 1966 Corvair factory head temp gauge has been out of production for 50 years and the thermistors that are available today, self heat and burn up. I have an nano programmed to run a x27 stepper that moves a pointer, but it would be neat to drive the factory gauge.

I have a 300c/5k thermistor driving the analog pinin in on a nano connected to x27 stepper. I get good readings and happy with that. I want to drive this air-coil gauge from a nano, but Im sure If I connect it directly, it will burn something up. Cars use a 12V and can be nasty power, so I was going to use a buck converter for the nano to 5v. Is the OP-AMP the way to go as the gauge needs 12V?

Anyone want to send me in the right direction?. What details do I need about the gauge. I know It has a built in resistor (small white tube with wire wrap), but again, there should be a way.

Thanks in advance.

Ted

Hello Corviamut,

Please provide Links to the datasheets of those parts,

300c/5k thermistor

300c/5k thermistor

which air gauge.?

Do you have a DMM to measure the resistor in the gauge? If so, is it (the DMM) capable of measuring microAmps?

I have done a similar thing with a fuel gauge . I used the PWM output to drive a transistor which had the gauge as its load ( couldn't drive it direct) You will need to measure the resistance and full scale current of the gauge to get this right . If you can characterise your temp sensor and connect it with a series resistor, to form a potential divider , to an analog input . You then just need a look up table or array in the Arduino to link the input reading to the output so the gauge reads correctly

OK… went as far as I was going to go on it as I realized how inaccurate these puppies are from gauge to gauge. I have moved to a X27 Stepper and had fairly good results until I got to a lookup table. When you get to the high temp the resistance is so close, I think lookup tables are the only way to go.

The working code below gives me val of pin 0, steps, temps,… its amazing what copy and paste will result… this is actually 2 sketches as the top half is for stepper control and bottom is for temp sensor info. Instead of the Map, I want to use lookup tables. I have also looked at equations, but I have no luck there either.

Now I am stuck… and been working for a few days since I think eventually I will figure it out. HELP!!!

How I thought the table should look: (This first value is the therm resistance, second is steps)
int val = {
0, 385,
80, 340,
90, 320,
100, 300,
120, 280,
140, 260,
160, 240,
200, 220,
240, 200,
280, 180,
320, 160,
360, 140,
400, 120,
480, 100,
506, 80,
550, 75,
};

Code I have working right now:
#include <Stepper.h>
#define STEPS 360 // steps per revolution (limited to 315°)
#define COIL1 8
#define COIL2 9
#define COIL3 10
#define COIL4 11
#define PotIn A0
// which analog pin to connect
#define THERMISTORPIN A0
// resistance at 25 degrees C
#define TEMPERATURENOMINAL 25
// how many samples to take and average, more takes longer
// but is more ‘smooth’
#define NUMSAMPLES 10
// The beta coefficient of the thermistor (usually 3000-4000)
#define BCOEFFICIENT 3419
// the value of the ‘other’ resistor
#define SERIESRESISTOR 10250

// create an instance of the stepper class:
Stepper stepper(STEPS, COIL1, COIL2, COIL3, COIL4);

int analogOutPin = 7; // Analog output pin that the LED is attached to
int outputValue = 0; // value output to the PWM (analog out)
int samples[NUMSAMPLES];
int Temp;

void setup(void) {
stepper.setSpeed(30); // set the motor speed to 30 RPM (360 PPS aprox.).
stepper.step(360); //Reset Position(360 steps counter-clockwise).
Serial.begin(9600);
}

int pos=0; //Position in steps(0-630)= (0°-315°)

void loop(void) {
int val = analogRead(THERMISTORPIN); //get the Thermister value (range 0-1023)
Serial.print ("Therm Val: ");
Serial.println(val);
val= map(val,0,506,385,75); // map pot range in the stepper range.
Serial.print ("Position Val: ");
Serial.println (val);

if(abs(val - pos)> 2){ //if diference is greater than 2 steps.
if((val - pos)> 0){
stepper.step(-1); // move one step to the left.
pos++;
}

if((val - pos)< 0){
stepper.step(1); // move one step to the right.
pos–;
}

}
uint8_t i;
float average;

// take N samples in a row, with a slight delay
for (i=0; i< NUMSAMPLES; i++) {
samples = analogRead(THERMISTORPIN);
_ outputValue = map(samples*, 0, 1023, 0, 630);_
_
// change the analog out value:_
_
analogWrite(analogOutPin, outputValue);_
_
delay(2);_
_
}*_

* // average all the samples out*
* average = 0;*
* for (i=0; i< NUMSAMPLES; i++) {*
_ average += samples*;
}
average /= NUMSAMPLES;*_

* // Serial.print("val ");*
* // Serial.println(val);*
* // Serial.print (“Pos”);*
* // Serial.println(pos);*
*#define THERMISTORNOMINAL 10000 *
// temp. for nominal resistance (almost always 25 C)

* // convert the value to resistance*
* average = 1023 / average - 1;*
* average = SERIESRESISTOR / average;*
* // Serial.print("Thermistor resistance ");*
* // Serial.println(average);*

* float steinhart;*
* steinhart = average / THERMISTORNOMINAL; // (R/Ro)*
* steinhart = log(steinhart); // ln(R/Ro)*
_ steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)
* steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
steinhart = 1.0 / steinhart; // Invert*
* steinhart -= 273.15; // convert to C*_

Temp = (steinhart * 18 + 5)/10 + 32;

* Serial.print("Temperature ");*
* Serial.println(Temp);*
* Serial.println(" ");*
_ // Serial.print(" F ");
// Serial.println(THERMISTORPIN);
// Serial.println(" C");
// Serial.print("Postion Degree ");

* // Serial.print(pos);
// Serial.print(" ^ ");
// Serial.println(val);*_

* delay(100);*
}
Thanks
Ted