Two 18B20 sensors less than 10 mm apart temperature difference of 3.81 Celsius

Hi!

I just connected two 18B20 sensors to my Wemos D1. Works perfect, just one big problem is that the temperature difference from these two sensors is around 3.81 degrees at room temperature (both in 12 bit resolution). The sensors are on a breadboard, sitting next to each other.

If I understand the documentation correctly, the accuracy of the 18B20 is +- .5 Celsius, so the difference should be +- 1.0 Celsius?

Hans

Check only one DS18B20 sensor and record its reading. Remove the sensor from the breadboard; insert the second sensor in the same place of the first sensor and record its reading. Now, record the difference of the readings of the two sensors. One/two degree differences in the readings among the sensors are common. +/-0.5 0C is the resolution/precision of the sensor; it is not the accuracy of the sensor.

Edit: The word resolution is not be here.

GolamMostafa:
. . . +/-0.5 0C is the resolution/precision of the sensor; it is not the accuracy of the sensor.

From the datasheet:
“It has an operating temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C.”

Further on in the datasheet, in table 2, the datasheet deals with resolution, which is related to how many bits of data are saved and used.

Don

Middelbh: Hi!

I just connected two 18B20 sensors to my Wemos D1. Works perfect, just one big problem is that the temperature difference from these two sensors is around 3.81 degrees at room temperature (both in 12 bit resolution). The sensors are on a breadboard, sitting next to each other.

If I understand the documentation correctly, the accuracy of the 18B20 is +- .5 Celsius, so the difference should be +- 1.0 Celsius?

Hans

"A man with a clock will always know what the time is it. A man with two clocks will never be sure" (Alberto Puente. Engineer. La Felguera 1952 - Madrid 2014).

Accuracy, precision and resolution are not, by no means, synonymous; have a look on this link.

Those sensors have a "sentient" element (usually a temperature sensitive resistor) plus some electronics that convert this electrical magnitude into voltage and, in this case, (converts) the latter into a series of bits. Being the two last processes digital, we can't expect that they deceive us (even if, as is it the case, one uses one of those awful breadboards).

Although 3 ºC are too much, may be that one (or both) of the sensors are (quite) wrong: you can't ask for much accuracy from so cheap sensors.

Regards.

floresta:
Further on in the datasheet, in table 2, the datasheet deals with resolution, which is related to how many bits of data are saved and used.

We have a sensor resolution precision of +/-0.5 degC, which means that the sensor can reliably detect a change of 0.5 degC in the environment. The ADC resolution is different from the precision of the sensor. Every sensor/measuring instrument is characterized by two factors : precision and accuracy; a user wants a wrist watch which he expects to be both accurate and precise?

BTW: The data sheets are very helpful. They contain both message and information. However, some of the contents of the data sheets, particularity physics/theory part, are subjected to interpretation.

vffgaston:
Accuracy, precision and resolution are not, by no means, synonymous; have a look on this link.

Precision: Assume that there are two stopwatches: stopwatch-1 and stopwatch-2 (swatch2). The swatch1 always counts 1/200th of a second and the swatch2 always counts 1/100th of a second. In this case, we say that the both watches are precise; but, swatch1 is more precise than swatch2. Precision is characterized by a high degree of exactness such as ‘precision grinding’. Say, after two years of operation, the swatch1 counts 1/175th of a second; but, the swatch2 still counts 1/100th of a second. We say hat the swatch1 has lost its precision though it is still more precise than swatch2.

Accuracy: Assume that swatch1 operates with its precision of 1/200th of a second; but, it measures 1005 seconds of time in place of 1000 seconds. On the other hand, swatch2 is less precise than swatch1; but, it measures 1002 seconds in place of 1000 second. In this case, we say that the swatch2 is more accurate than swatch1. Say, after many years of operation, the swatch1 is still counting 1/200th of a second and still measure 1005, in place of 1000. We say that swatch1 has retained its both Precision and Accuracy.

BTW: Someone else may kindly explain the concept of resolution.

vffgaston: . . . Although 3 ºC are too much, may be that one (or both) of the sensors are (quite) wrong: you can't ask for much accuracy from so cheap sensors.

Regards.

I agree, especially if the sensors came via a questionable supply chain.

Don

vffgaston: you can't ask for much accuracy from so cheap sensors.

Bloody nonsense. DS18B20s are extraordinarily accurate, consistent, and reliable. The fact that they are cheap is just another reason for using them. OP has some other problem - maybe even a faulty one, but price is little defense against that.

Bloody nonsense.

Agreed. They are cheap and in my hands, always work properly and usually, accuracy is better than specified. But a defective example remains a possibility.

OP: check each sensor individually and test in ice water (0 C) and warm water (50 C or so). Report back.

Nick_Pyner: Bloody nonsense. DS18B20s are extraordinarily accurate, consistent, and reliable. The fact that they are cheap is just another reason for using them. OP has some other problem - maybe even a faulty one, but price is little defense against that.

Agreed. They are cheap and in my hands, always work properly and usually, accuracy is better than specified. But a defective example remains a possibility.

OP: check each sensor individually and test in ice water (0 C) and warm water (50 C or so). Report back.

Hi, This is not rethorical: have you any figure about accuracy for those sensors? (I mean, mean value for their readings, standard deviation an so on ...). Regards.

have you any figure about accuracy for those sensors?

I compared readings from several of mine, over a range of temperatures, to those produced by a high quality thermocouple thermometer from Omega (+/- 0.1 C accuracy).

I found that all performed well within the specs. You can trust the data sheet.

Middelbh: Hi!

I just connected two 18B20 sensors to my Wemos D1. Works perfect, just one big problem is that the temperature difference from these two sensors is around 3.81 degrees at room temperature (both in 12 bit resolution). The sensors are on a breadboard, sitting next to each other.

If I understand the documentation correctly, the accuracy of the 18B20 is +- .5 Celsius, so the difference should be +- 1.0 Celsius?

Hans

When I tested a dozen devices on the same breadboard, with forced airflow (black epoxy sensors are strongly affected by heat radiation in still air), the standard deviation was 0.1 degree C, so they typically perform better than the specification (the ID numbers showed my devices were from many different manufacturing batches).

A difference of 3 degrees means one or both of your sensors are counterfeit I'm pretty sure, but try pointing a fan at them anyway.

I have about twenty now, I have tested them in the obvious way in water, see reply #8, and check them against laboratory-grade Brannan 0-50 thermometers as well as the Engelmann commercial heat meter they are intended to supplant. There has never been reason to suspect them, even after abuse by me, and exceeding the specification appears to be the norm. A good real world test of reliability - somewhat more useful than standard deviations - might be to trawl this forum to make a collection of disparaging comments. This turns out to be an extraordinarily difficult test. I have only ever seen one - yours.

About the only time there is grief with the DS18B20 is when people think they have a dud but it isn't, it's a transistor. Unfortunately, this is not OP's problem, and I don't know what is, but I imagine it is operator error of some sort.

Nick_Pyner:
I have about twenty now, I have tested them in the obvious way in water, see reply #8, and check them against laboratory-grade Brannan 0-50 thermometers as well as the Engelmann commercial heat meter they are intended to supplant. There has never been reason to suspect them, even after abuse by me, and exceeding the specification appears to be the norm. A good real world test of reliability - somewhat more useful than standard deviations - might be to trawl this forum to make a collection of disparaging comments. This turns out to be an extraordinarily difficult test. I have only ever seen one - yours.

About the only time there is grief with the DS18B20 is when people think they have a dud but it isn’t, it’s a transistor. Unfortunately, this is not OP’s problem, and I don’t know what is, but I imagine it is operator error of some sort.

Hi,

Do you keep register on your “obvious” tests?. What do you mean by “it’s a transistor”?. What data have you to support your conclusions?. Do you know what a standard deviation is?. And a Gauss distribution?. Twenty pieces?. What is your background on large batchs quality control?
Have you any interest on commercial issues in this particular part?. Do you sell them?.
Best regards.

@vffgaston: Back off, and accept the fact that these sensors work as advertised.

Otherwise, publish your own carefully documented methodology and data showing that they do not.

MarkT:
When I tested a dozen devices on the same breadboard, with forced airflow (black epoxy sensors
are strongly affected by heat radiation in still air), the standard deviation was 0.1 degree C, so they typicallyperform better than the specification (the ID numbers showed my devices were from many different manufacturing batches).

jremington:
these sensors work as advertised.

The above quoted advertisement is from the data sheets of the DS18B20 sensor:

1. Assume that the DS18B20 sensor is reading 24.000C when the actual temperature recorded by a Reference Thermometer is 24.000C. When the Reference Thermometer will read the temperature as 50.000C, the DS18B20 sensor’s reading will remain confined within 49.500C and 50.500C. Thus, the DS18B20 sensor is maintaining its accuracy within +/- 0.50C.

2. As the response of the DS18B20 can go upto 4-digit after the decimal point, the precision of the sensor is 0.06250C which means that the sensor can reliable detect a change of 0.06250C in the environment.

Comments: The DS18B20 sensor is precise and accurate not only from the message of the data sheets; but, it also has been supported by the experimental result of a poster. The sensor is cheap due to huge sales volume. The beauty of the sensor lies in its circuital-engineering/technology.

jremington: Otherwise, publish your own carefully documented methodology and data showing that they do not.

Hi, I am afraid O.P. has made it for me ... Regards

Hi all,

Thanks for your replies, I was not expecting so much discussion would follow.
The difference between accuracy, precision, resolution have been discussed in detail, so I will not go into that.

What I did, based on some of your remarks,

  1. I changed the position of the two sensors relative to each other: no other behaviour, difference remains.
  2. I tested at different temperatures in the range I am interested (20-30 Celsius): first indication is the same difference between sensors.

My first impression is that I have a faulty one… So will buy another one from a trusted source :wink:

Hans