Thermistor giving very low readings

I got the ultimate microcontroller pack a while ago, and attempted to build a temperature reader. However, I keep getting really low readings. I've built and used multiple codes, but they all give ratings around 170~

I am using the arduino uno, and the thermistor is rated at 50mw. I'm using a 10k resistor. One of the programs I have been using is http://playground.arduino.cc/ComponentLib/Thermistor2, and another one modified from the basic arduino projects, project 20:

int analogInput=2;
//int led=13;
int value =0;
void setup() {
pinMode(analogInput, INPUT);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
value = analogRead(analogInput);
Serial.println(value);
delay(200);
}

I've been reading about calibration, but I have a feeling that maybe the thermistor needs a different resistor, or both that come in the kit are broken? What am I doing wrong where it's telling me it's 18 degrees in here? That's kinda cold XD

Most of the other sensors I have seem to work fine. I'm new, so I apologize if anything I'm doing here is a little wonky. Thanks in advance for any help!

pinMode(analogInput, INPUT);

This makes it a digital pin. Remove this line. Leo..

Interesting. I took that piece of code out, but nothing changed.

I decided to do some experimentation on the board, and found when a pin is not connected to a slot, I will get 250-+ in that slot as a reading. Whenever I place the pin that leads to the thermister circuit in one of the analogs, I will get 165-+. Here's a data list I compiled:

value A0: 387 value A1: 351 value A2: 170 value A3: 212
value A0: 285 value A1: 284 value A2: 169 value A3: 214
value A0: 279 value A1: 278 value A2: 170 value A3: 214
value A0: 279 value A1: 278 value A2: 167 value A3: 212
value A0: 283 value A1: 283 value A2: 168 value A3: 214
value A0: 284 value A1: 284 value A2: 168 value A3: 213
value A0: 282 value A1: 280 value A2: 165 value A3: 213
value A0: 280 value A1: 280 value A2: 169 value A3: 212
value A0: 285 value A1: 284 value A2: 166 value A3: 214
value A0: 208 value A1: 244 value A2: 256 value A3: 163
value A0: 209 value A1: 219 value A2: 262 value A3: 168
value A0: 204 value A1: 227 value A2: 254 value A3: 166
value A0: 203 value A1: 230 value A2: 254 value A3: 165
value A0: 204 value A1: 228 value A2: 253 value A3: 165
value A0: 202 value A1: 227 value A2: 268 value A3: 167
value A0: 312 value A1: 165 value A2: 247 value A3: 257
value A0: 285 value A1: 169 value A2: 220 value A3: 242
value A0: 285 value A1: 166 value A2: 220 value A3: 241
value A0: 281 value A1: 169 value A2: 217 value A3: 237
value A0: 280 value A1: 165 value A2: 216 value A3: 237
value A0: 285 value A1: 164 value A2: 219 value A3: 241
value A0: 355 value A1: 342 value A2: 382 value A3: 336
value A0: 167 value A1: 206 value A2: 239 value A3: 251
value A0: 167 value A1: 207 value A2: 241 value A3: 256
value A0: 165 value A1: 209 value A2: 243 value A3: 258
value A0: 164 value A1: 206 value A2: 240 value A3: 252
value A0: 165 value A1: 205 value A2: 238 value A3: 251
value A0: 166 value A1: 205 value A2: 237 value A3: 251

Not sure what this means. Seems to happen on both of my boards, though on the other board, it reads 5~ higher. Is this thermister just wacky and I need a higher resistor? If so, what do you suggest? If not, what am I doing wrong?

Also, here's the code I'm using to test: (yes, a0 is using the pinmode, I was testing what effect it has.)

int analogInput=0;
int analogInput1=1;
int analogInput2=2;
int analogInput3=3;
//int led=13;
int value =0;
int value1 =0;
int value2 =0;
int value3 =0;
void setup() {
pinMode(analogInput, INPUT);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
value = analogRead(analogInput);
value1 = analogRead(analogInput1);
value2 = analogRead(analogInput2);
value3 = analogRead(analogInput3);
Serial.print("value A0: ");
Serial.print(value);
Serial.print(" value A1: ");
Serial.print(value1);
Serial.print(" value A2: ");
Serial.print(value2);
Serial.print(" value A3: ");
Serial.println(value3);
delay(3000);
}

So you have connected the 10k resistor between 5volt and the analogue input. And the thermistor between analogue input and ground.

10k thermistors are common. You should get a value of ~512 @25C. Did you measure the resistance of the thermistor with a DMM.

Post a picture of your setup. Leo..

There MIGHT be nothing wrong... Different thermistors will give you different readings, and they are not known for having tight tolerances. If you are going to measure temperature with a thermistor, you'll have to calibrate it.

The important thing is, do the readings CHANGE when you heat-up the thermistor with a hair dryer, or cool it down with ice? (Insulate/isolate your ice in a zip-lock bag or something so you don't get the electronics wet.)

If you are reading multiple analog inputs, you may need a short delay between reads, or take each reading twice and ignore the 1st reading. The ATmega chip only has one shared/switched analog-to-digital converter and it requires a little settling time between reads.

Wawa: pinMode(analogInput, INPUT);

This makes it a digital pin. Remove this line. Leo..

All the pins are INPUTs by default at reset whether they can be used as analog or not, this doesn't mean they are in any sort of digital-only mode. You could call analogRead() on a pin selected as output to see how much the output voltage was sagging I think.

Hi, if you read an analog pin that is not connected to anything, you are reading what is called a floating input, it can be any value from 0 to 1023, and vary as you monitor it.

The input pin you have the thermistor connected to, can you replace the thermistor with another 10k resistor.

So what you will have is a 10k from +5V to analog input pin and a 10k from analog input pin to gnd.

With a DMM you should measure half of the 5V supply, ie, 2.5V.

The analog reading should be 1024/2= 512 or there abouts.

Thanks .. Tom... :) PS measure the resistance of your thermistor at about room temperature, that will give us an indication of its type. A picture of your project would also help.