LM35 accuracy


I just started playing around with Arduino and try to get things together for a kind of home automation project. I connected three LM35 to my Arduino and got it all working - fine.

Now: The three sensors all read different values - I'm not surprised ;) But: For example they read: 26.2, 26.5 and 27.2

The "guaranteed" accuracy of the LM35 is +-0.5°. Does this mean, that I can get a quite GOOD value (depending on ref. voltage, circuit quality etc) if I can find 2 LM35 which deliver results that are far apart? Would a "very" accurate value be the average of the two sensors in THIS case? Or ist this just plain nonsense, and +-1 is the best I could get anyway with such cheap setup?

I do not really care for the current project, because I only have to distinguish between very cold, cold, medium, hot and very hot - more or less ;)

Also, it is in the nature of the beast… “things” other than the temperature will be having an effect, e.g. the resistance in the wire between the Arduino and the sensor, and induced voltages.

The Dallas 1-Wire chips are fancier, need a LITTLE more work to master, but well worth it…

They measure the temperature in the chip, and then send that as a digital signal to the Arduino… little wobbles in the circuitry between sensor and Arduino have no effect.

There are fancy answers to reading the Dallas chips… the DS18B20 is a popular choice… and simpler answers. For one of the latter…


(That is written in the context of a Nuelectronics shield… which you do not need AT ALL to use the code on the tutorial page. The shield just (slightly) simplifies the connection of the sensor to the Arduino, on a physical level.)

ok, say I'm using DS18S20 instead ... the "problem" remains ;)

Say, I have ONE that measures 20.5° when then true temp is 20 - the DS18S20 is inaccurate at the same level as the LM35. Means, that I have to live with the inaccuracy. Say, I get a second one and that one measures 20.4°. Doesn't help me much, does it?

But if I, out of pure luck, get two and one measures 19.5 and the other 20.5, how sure could I be that the true temp is something like 20 +- less than 0.5 ?

BTW: can somebody tell me why DS18S22 is more expensive that DS18S20, though the 20 is MORE accurate? 22 offers 12 bit conversion, but what does this help if the inaccuracy is larger anyway?

If accuracy is that important to you,

As said: ACTUALLY I’m not in need for such high accuracy. The question just occured, when I noticed that 2 out of 3 LM35 I purchased seemed to offer a cheap way to increase accuracy (if I should ever need it, that means).

temp reference: That’s the problem. Do you know about any “cheap” (say < 20 US$/€) reference thermometer (accuracy better than ±0.2)? Which leads back to my initial question: Would 2 (groups) LM35 (os DS18S20) which deliver results that are 1° (or more) apart be a more or less reliable reference?

Always keep in mind the old story:

"Man with one watch always knows the time, man with two watches never quite sure."


Yeah and the guy with the broken watch knows the right time twice a day ;)

Nice sayings. Don't help much, but nice anyway.

Having a reading of 20.5 actually/usually means that the temperature is somewhere between 20 and 21. I am not expecting to have an accurate reading of 20.4532°, but getting 20.5 and knowing it's somewhere between 20.4 and 20.7 would be nice sometimes. At least when it can be done more or less cheap.

KE7GKP: Don't confuse resolution with accuracy. Just because you can resolve something to 4 decimal places doesn't mean they are useful.

Or even accurate.

Keep in mind that absolute accuracy depends on a lot of things. Not only are you dependent of the accuracy variation of the sensor, your sketch calculations assumes that the range of readings possible is equal to 0-5.000 volts, But the truth is that the top of range voltage is whatever the exact value of the USB voltage or the on-board +5vdc regulator happens to be at any one point in time. Both those voltage sources have a nominal voltage accuracy (variation) and unless you measure them with a lab quality voltmeter and then compensate for it in your calculation there will always be some amount of offset error. Accuracy and calibration can be very time consuming, complex, and expensive depending on what your expectations and needs are. The arduino A/D hardware is not lab quality instrumentation. The overall accuracy specification for the A/D hardware is +/- 2 bits of the 10 bit raw value.


retrolefty: Always keep in mind the old story:

"Man with one watch always knows the time, man with two watches never quite sure."


ha ha - that made me laugh


retrolefty: Always keep in mind the old story:

"Man with one watch always knows the time, man with two watches never quite sure."


ha ha - that made me laugh

And after a first laugh, it's suppose to make you think a little. ;)

Don't confuse resolution with accuracy.

Be assured: I don't! It was just an example bc some seem to think, that I'm looking for some kind of ultra-accuracy solution for 10 ct. No I don't. I simply want to know: If I have two sensors (which sense whatever) and the manufacturer of these sensors "guarantees" an accuracy of +-0.5 (at a certain range of whatever) and I get a readig of 20 resp 21, can I then assume that the "true" value is around 20.5 - maybe +-0.1 (0.2, more?)?

For cheap calibration, consider a medical thermometer for the 35-40deg Centigrade range. Actually getting all your sensors to the same temperature within a fraction of a degree can be a challenge due to convection currents and self heating effects. Put your sensors close together in dry plastic bags in a water filled plastic container with a lid. Wait 10 minutes and then take lots of readings and average the results for each sensor.

Assuming that the original question was answered ... or not ... Does anybody know, where I could purchase a TSiC 506 TO92 in Germany/Europe? Seems to be some kind of white elephant, because 206 and 306 I can get from an electronics shop nearby, but 506 (at least TO92) seems to be on shelf almost nowhere, though (afaik) it shouldn't be a TOO expensive chip (10-15€?). And with an accuracy of +-0.1 and digital output that would probably the easiest way to calibrate cheaper sensors.

I thought about a medical thermometer, but the problem is the range. How to get a stable temp of 35-40 degrees (except in my ... ;) )? I ASSume that I wouldn't like that kid of calibration procedure ...

picoflop: I thought about a medical thermometer, but the problem is the range. How to get a stable temp of 35-40 degrees

PCM inside a vacuum flask. See http://en.wikipedia.org/wiki/Phase_change_material http://pcmenergy.com/products.htm

For precise measurements you will need to consider the thermal environment of your measurement electronics. Temperature gradients across electrical connectors with dissimilar metals will generate unwanted voltages due to thermocouple effects. The Arduino isn't designed for precision.

The ice point is a good callibration point, boiling point is very poor without measuring the atmospheric pressure at the same time and correcting for it. You need distilled water ideally, impurities vary freezing and boiling points. Digital sensors are less likely to read wrong if some moisture gets in during callibration. Anyone know a good callibration method for around 50C? Some safe stable cheap chemical that has a sharp melting point around there? How do they callibrate medical thermometers?