Using a Multi Meter:
Resistance Across 100k Thermistor - 101k
Resistance Across 100k Resistor - 100k
Resistance Across 100k Resistor While Sketch is Running - 115k
Voltage From Galileo - 5.08V
The problem seems to pop up when the Galileo reads in the Analog Value. I am using the follow formula to convert my Raw ADC Value to Resistance of the Thermistor.
Where
5 - 5 Volts
1023 - Analog Resolution
average - The mean of 5 analog values
100,000 - Resistance of 100k Resistor
With an average Raw ADC Value of about 337, I receive a resistance of 64809.384164.
The calculated resistance of the thermistor relies on the Raw ADC value and yet, even with a multimeter reading of 115k across the 100k resistor, the analog input is recording 332. Could anyone by chance offer some guidance?
To state the obvious: 1) This is an Arduino Forum, you probably wont find much help for the Galileo board. 2) I see a picture of a resistor, of two motor drivers (maybe?), and of the blurry Galileo dev. board- none of which illustrates how you have connected this up. Please draw out a schematic and take a clear, appropriately-scaled picture of it. ASCII art doesn't count.
At room Temperature, your thermistor should be about 100k or so and you should read roughly half your full scale range (512 ish on your analog input). However, your readings suggest about 35degrees C, which depending on ambient temperature, nearby heat sources, and how you actually wired it up- could be plausible. What kind of readings were you expecting?
The maximum figure that the analog input can provide is 1023. Whether it's 5v 1v or whatever doesn't matter because the analog reading you get is a direct measure of the 100Ks resistance in relation to the total resistance.
So 1023 - average gives you the relationship of the thermistors resistance to the whole range.
therefore
long thermistorResistance = 1023-average;
//now convert that to ohms
thermistorResistance *= 100000/average;
Although I'd be inclined to leave out a few of those zeros and add a K when displaying it.
This is the code that I use to read my thermistors. They are however 10k NTC thermistors. This code does work for me so it might work for you if you change the "pad" value to your resistance of 100k
// Thermistor Setup Calculations //
float pad = 10000; // balance/pad resistor value, set this to
// the measured resistance of your pad resistor
float Thermistor(int RawADC) {
long Resistance;
float Temp; // Dual-Purpose variable to save space.
Resistance=pad*((1024.0 / RawADC) - 1);
Temp = log(Resistance); // Saving the Log(resistance) so not to calculate it 4 times later
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp - 273.15; // Convert Kelvin to Celsius
return Temp; // Return the Temperature
}
Then i basically read it as follows;
// Supply Temperature //
float Supply;
Supply=Thermistor(analogRead(ThermistorPIN0)); // read ADC and convert it to Celsius <-- Supply Water Temperature
delay (10);
Supply=Thermistor(analogRead(ThermistorPIN0)); // Read ADC second time for more accurate reading <-- Supply Water Temperature
delay (10);
Supply = (((Supply + 40)*1.8) - 40); // temp1 = (temp1 * 9.0)/ 5.0 + 32.0;
TempArray[1] = Supply;
Serial.print(TempArray[1]);
Serial.println(" F Supply Temperature \n");