# 1M Ohm Thermistor

Hi,

I think I’m starting to lose my mind trying to work this out as I have no idea why it’s not working.

I have a 1M Ohm Thermistor that I’m trying to read the value of.
I have put a 1M Ohm Pull-Up resistor on the ground as recommended by many many tutorials (below), however, It just wont work.

(Ground) ---- (1M-Resistor) -------|------- (Thermistor) ---- (+5v)
|
Analog Pin 0

I’m at the stage now where even just doing an analogRead(0) on the correct pin is returning 0.
I found last night though, if I put it on a 100K resistor but had the pullup value set to 1M still, it appeared to read more than 0.

Is there something I’m not looking at or doing right?

The code I’m using (from http://playground.arduino.cc/ComponentLib/Thermistor2) is:

``````#include <math.h>

double Temp;
//         =log(1000000.0/(1024.0/RawADC-1)) // for pull-up configuration
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15;            // Convert Kelvin to Celcius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}

void setup() {
Serial.begin(115200);
}

void loop() {
delay(100);
}
``````

The adc expects to see a source impedance of about 50 k OHM i think, its in the datasheet somewhere.

You need to buffer the input with a high impedance op amp or similar.

You may get a usable reading if you put a small cap on the input pin, but only for occasional reads every 10 s or so.Will not be very accurate.

EDIT i checked out your link, their circuit uses 10K resistor and thermistor.

The ADC expects to see 10K ohms or less, whereas your combination of resistor and thermistor are around 500K. Add a 100 nF capacitor from the ADC input to ground.

The various constants used to calculate the temperature are probably not correct for your thermistor.

Boardburner2: The adc expects to see a source impedance of about 50 k OHM i think, its in the datasheet somewhere.

You need to buffer the input with a high impedance op amp or similar.

You may get a usable reading if you put a small cap on the input pin, but only for occasional reads every 10 s or so.Will not be very accurate.

EDIT i checked out your link, their circuit uses 10K resistor and thermistor.

Thanks for the prompt reply. I'm a little lost still though. Sorry! :(

The Thermistor I'm using is a Maverick food probe which is 1M Ohm at room temperature. I investigated some other code that uses the same probe that a guy was using (https://github.com/kazmiekr/GrillLog) and replicated the exact same circuit (1M Resistor and all) but was still having issues.

jremington: The various constants used to calculate the temperature are probably not correct for your thermistor.

I've got the Coefficients sorted for the thermistor, I used a steinhart-hart formula for 3 known temperatures and got the ABC Coefficients based on the resistance on the probe.

My only concern with using low value cap is, the readings are going to be taken every 5 or so seconds, so reliability and consistency of the temperature is going to be critical.

I've spent around 6 hours (no joke) trying to get this to work and banging my head against my keyboard and I have no clue what else to do so I'm open to try anything!

egadgetjnr: The Thermistor I'm using is a Maverick food probe which is 1M Ohm at room temperature. I investigated some other code that uses the same probe that a guy was using (https://github.com/kazmiekr/GrillLog) and replicated the exact same circuit (1M Resistor and all) but was still having issues.

I find it difficult from that link to find the probe spec, also i would prefer a schematic not fritzing diagram.

egadgetjnr: My only concern with using low value cap is, the readings are going to be taken every 5 or so seconds, so reliability and consistency of the temperature is going to be critical.

With the suggestion of 100 nF cap and 500k resistance i make the time constant to be 0.05 sec so reading a value every 5 sec so should be accurate provided that 100nF is enough (i have not tested or done the sums).

egadgetjnr: I've spent around 6 hours (no joke) trying to get this to work and banging my head against my keyboard and I have no clue what else to do so I'm open to try anything!

HE HE HE

Welcome to the world of arduino. There are lots of instructibles out ther that vary from the ridiculous to the sublime. This board is good for asking questions as a wrong answer will get you shot down quickly. FX dons flame proof undies in case i got my sums wrong.

Boardburner2: I find it difficult from that link to find the probe spec, also i would prefer a schematic not fritzing diagram.

I couldn't get any probe spec unfortunately for this probe, which was quite annoying. All I knew was at 25C it was sitting at 1M Ohm. To get the coefficient, I used this calculator (http://www.thinksrs.com/downloads/programs/Therm%20Calc/NTCCalibrator/NTCcalculator.htm) to get the ABC Coefficients (and also the Beta Coefficient) based on known temperatures and the resistance and factor it into all of the different formula and code that I have found. Alot of what I have found online had the same layout of schematic. Similar to http://playground.arduino.cc/uploads/ComponentLib/simple10ktherm_schem_new.png but with 1M resistors instead of 10K.

Boardburner2: Welcome to the world of arduino. There are lots of instructibles out ther that vary from the ridiculous to the sublime.

Yep, I know this all too well now... A recent instructable resulted in the permanent bricking of one of my Genuine Mega 2560's due to three ! marks in a serial print..... That was a painful and costly mistake...

egadgetjnr: Yep, I know this all too well now... A recent instructable resulted in the permanent bricking of one of my Genuine Mega 2560's due to three ! marks in a serial print..... That was a painful and costly mistake...

That may be recoverable, ask in the programming conf.

Any resistor can be used with a thermistor.

But you get the biggest resolution (A/D variation) if the resistor is the same value as the thermistor [u]at the temp you're interested in[/u].

This being a food measurement device, you might want the best resolution at ~100C. So it's best to use a resistor value that is the same as the thermistor is at that temp. A 1Meg thermistor might be ~125kohm@80C and ~40kohm@120C. A 100k resistor seems to be right for this range. Leo..