NTC sensor reading ok on Arduino Nano but not on Arduino Uno

Hi , everyone!

Today i wanted to implent an NTC Temperature Sensor in one of my projects so i followed the example at this site : http://garagelab.com/profiles/blogs/tutorial-using-ntc-thermistors-with-arduino

I did the first kind of circuit showed on the page.

My sketch is looking as this :

#include <Thermistor.h>
Thermistor temp(0);
void setup() {
Serial.begin(9600);
}
void loop() {
int temperature = temp.getTemp();
Serial.print("The sensor temperature is: ");
Serial.print(temperature);
Serial.println("*C");
delay(1000);
}

I then ran the sketch on my Arduino Nano and everything went fine, it showed correct temperature.
I so decided to implent it in my other Arduino, Arduino Uno rev.3

The temperature readings were all wrong not so much , just 21 °C more than it should have been!
Now, my question is : how can that be? I made the same connections (even did it over and over again for three times) but the readings on the Arduino Uno are always wrong.

I also tried changing the AnalogInput from 0 to 1 but the readings were always wrong.

I just can’t come up on how can this happen! I then tried it over on the Nano again, and on the Nano it works like a charm!

My Arduino Uno has other connections and resistors for other purposes, may they affect in some way?

How could i check out what’s going wrong?

I also tried to use different GND connection but nothing changes.

Please help!

marcomaroso: My Arduino Uno has other connections and resistors for other purposes, may they affect in some way? How could i check out what's going wrong?

Unplug them.

marcomaroso: Thermistor temp(0);

Never rely on side effects which may work in some cases, with some board settings or some IDE versions!

I don't know your thermistor library, but as I can see nowhere an analog pin reference, I think you reference A0 as 0.

So perhaps better use the correct pin number constant A0 if you want the NTC value reading from the A0 pin:

Thermistor temp(A0);

jurs: Never rely on side effects which may work in some cases, with some board settings or some IDE versions!

I don't know your thermistor library, but as I can see nowhere an analog pin reference, I think you reference A0 as 0.

So perhaps better use the correct pin number constant A0 if you want the NTC value reading from the A0 pin:

Thermistor temp(A0);

Thanks bud,

i will try that too even if i seem to recall i had already tried that too but i'll double check it.

Martin-X: Unplug them.

I tried to unplug them but result didn't change.

marcomaroso: I tried to unplug them but result didn't change.

Do you have a multimeter to measure voltage?

Measure the 5V to GND voltage with your Nano: Result? Measure the 5V to GND voltage with your UNO: Result?

Hi,

Measure the A0 to GND voltage with your Nano: Result? Measure the A0 to GND voltage with your UNO: Result?

Have you go a bypass capacitor on the A0 to gnd? 0.1uF will do.

Tom..... :)