Temperature Sensor LM60

MarkT:
We need to see all the code - for instance is Vin declared as "int" or "unsigned int" or "long" or what?

const int analogtemp=6; // This is the analog pin which is measuring the input voltage from the LM60 temperature sensor
double temp=0, Vin=0, samples[50];
double minimum = (-424.0/6.25);

MarkT:
And how is this wired up? long cables? Power source?

It's wired correctly, regular cables and USB powered.

MarkT:
Have you checked the accuracy specification for the sensor?

The accuracy here is irrelevant... If I measure a wrong value but if the ADC says it's 424mV the temperature in the LCD (after formula calculation) should be 0ºC, right? And it's not! It's -4ºC.

MarkT:
Have you calibrated analogRead() with a known voltage?

I used the internal reference without any calibration. My multimeter says that Vref is 1088mV, instead of 1100mV.

Yah, I know the sensor has error but for this issue is irrelevant, I think :slight_smile:

The error in the sensor is for this example: The real temperature is 0ºC, but the ADC is measuring 580mV, then the LCD shows 25ºC.

Regards and thanks