Hi, I'm using Arduino R3 nano to read tempratures from 2 sensors.
A LM35 and a MCP9700.
There is quite a difference between the readings. Which sensor should I believe?
I also have a digital sensor in the room that is reading 22,6.
Calibration is difficult for a hobbyist, but you can perform a pair of steps:
-Put some ice on a bucket, and let it slowly melt. When you have about 50/50 ice and water, that will be your 0-C point
-If you live at sea level or close to it, you can get water to start boiling, and that will be your 100-C point.
Are you sure that subtracting 500 is the correct value. I'm not familiar with the Arduino Nano but the final measured voltage should have around 400mV subtracted. The exact amount has to be determined as detailed above.
The other option to "calibrate" either of the parts is to use a reference like the digital sensor in the room as the "golden" reference and adjust the reading accordingly with an offset. This only has a chance of working correctly if the calculation of the reading from the sensor to a temperature is correctly done and if the sensor you use (LM or MCP) gives linear readings across its temperature range.
I will try the ice.
I live at about 5700 feet above see level so boiling water would be around 96-98 degrees.
I though of using a medical thermometer around 35 degrees. It has a scale marked off at 0.1 degree intervals.
Assuming the ADC is 10-bits, with 1.097 vREF the ADC would read 373 with 400mV input.
Where does the 500 come from in your calculation?
For reference, I use MCP9701 devices extensively, they are the same temperature sensor but with an internal amplifier to align their output with typical ADC steps. I find them very accurate although I do calibrate them by adding long wires to a bundle at a time and placing them together inside a fridge at 2C for 30 minutes.