Page 1 of 1

ds1820 +5degrees

Posted: 07 Mar 2018, 21:37
by goblin
hello all,
question i have seen before on the forum but no satisfying answer.
the ds1820 gives a 5 degrees higher temperature then it should.
i have tried differed esp8266 (build 120) and different ds18b20 sensors and different pull ups at different Gpio's. but the result stays the same.
The 1-wire signal looking perfect on the oscilloscope.
it detects the family code and unique number (28-ff-6c-7-c3-16-3-ed).

my question and hope somebody can answer it.
how is it possible to get the wrong temperature reading if the (digital) signal is within spec (no noise) it can read the 8 bits fam code and 48 bits serial number with CRC.
This looks like a software issue.
the only strange thing i see is (28-ff-6c-7-c3-16-3-ed). instead of (28-ff-6c-7c-31-63-ed).

any one ???

Re: ds1820 +5degrees

Posted: 07 Mar 2018, 23:36
by TD-er
Have you also tried more recent builds (backup your settings, these are not compatible) ?

Re: ds1820 +5degrees

Posted: 08 Mar 2018, 13:29
by Shardan
There are several possible reasons for such a deviation.

it might be a software bug as TD-er already mentioned.

On a completely other note:
The original DS18B20 made by Maxxim has a tolerance of +/- 0.5 degrees centigrade.
If you got an original Maxxim or a DS18B20 from another brand manufacturer, it should technically work.

If you bought a "100pcs for 3,43 $" package from AiExpress or similar you possibly got production waste parts or fakes.

Another possible point:
Any "hot" parts, voltage regulators or CPU for example, neat to the sensor?
Don't underestimate how much thermal energy goes over a PCB track or copper wire
from a voltage regulator to a thermal sensor. A copper wire or PCB track conducts thermal energy as good as electric current.

It would help if you give more details as firmware version, a picture of your circuit etc.

Regards
Shardan

Re: ds1820 +5degrees

Posted: 08 Mar 2018, 19:23
by goblin
thanks Shardan but i have measured all ds18b20 with a original maxim 1-wire evaluation board and all are within 0.5%
also it is not possible to heat it up by means of applied power. the whole circuit draws less then 2mA @3v3. and the sensor is glued into a 5mm thick housing.

@ TD-er where can i find a more recent build ?

regards

Re: ds1820 +5degrees

Posted: 08 Mar 2018, 20:00
by budman1758
What are you using to make the comparison to? If they are all within .5% it sounds like they are all working correctly. What is your reference that says they are 5 degrees off?

Re: ds1820 +5degrees

Posted: 08 Mar 2018, 20:22
by TD-er

Re: ds1820 +5degrees

Posted: 09 Mar 2018, 15:51
by goblin
@ budman,
ds18b20 works within 0,5 % on a 1-wire maxim dev kit compared to a digital precision temp meter.
ds18b20 has an 5 degrees diff with the above on a esp8266.

@ td
thanks will try

Re: ds1820 +5degrees

Posted: 10 Mar 2018, 04:13
by budman1758
For what its worth.
SI7021 temp and humidity sensor reads 76.6 degrees F
Dallas DS18B20 reads 75.2 degrees F
These 2 sensors are 1 foot away from each other on my bench right now.
My 29 dollar (cheap) digital hand held thermometer reads 79 degrees F at each sensor.
.5 celsius is approx 1.6 degree F so a range of 3.2 degree tolerance.
The 2 temp sensors are on different esp modules.
Using the latest MEGA version of the firmware. I doubt there is a software bug in ESPEasy.
Methinks the "problem" may be elsewhere.....

Re: ds1820 +5degrees

Posted: 10 Mar 2018, 07:32
by whatsupskip
Great care must be taken when using temperature sensors of any kind with the ESP8266.
  • The most common issue is direct heating from the ESP8266 module. This is particularly the case with boards like the Wemos D1 mini and its shields. Mounting these shields in a vertical stack, even two boards apart will heat the sensor.
    The ESP8266 seems to heat temperature sensors when in close physical proximity, even though the sensor is thermally isolated from the ESP8266. I have yet to confirm the root cause of this issue.
The only solution I have found is place the temperature sensor 8cm or more away from the ESP8266 module. However, if the sensor is in an enclosure, then care must be taken to thermally isolate the temperature sensor.

Re: ds1820 +5degrees

Posted: 10 Mar 2018, 07:45
by whatsupskip
Shardan wrote: 08 Mar 2018, 13:29 If you bought a "100pcs for 3,43 $" package from AiExpress or similar you possibly got production waste parts or fakes.
I have purchased more than 12 DS18b20 modules from several sellers on AliExpress. Admittedly these were all with a cable and in a stainless steel jacket, so they weren't as cheap as what you have suggested. I have not tested these modules at extreme temperatures, but at 25C they are surprisingly accurate. I have one that is out by 0.3C, but most are within 0.2C and many within 0.1C. Indeed it becomes quite complicated to ensure that the sensors are in fact placed in the same environment such that the temperature around each module really is that close.

Of particular note, that these modules are on at least 1m cable, so won't suffer problems with heat conduction from any parts on the ESP modules.

Re: ds1820 +5degrees

Posted: 10 Mar 2018, 17:09
by Shardan
Then you're a lucky one.

I've tested super cheap "bags" and found that not a single one was within the limits of +/- 0.5°C.
Well, I expected it as these "bags" of 10...20 pieces were sold around 1 USD which is far too
low for precalibrated sensors.

Re: ds1820 +5degrees

Posted: 10 Mar 2018, 22:08
by whatsupskip
Shardan wrote: 10 Mar 2018, 17:09 Then you're a lucky one.

I've tested super cheap "bags" and found that not a single one was within the limits of +/- 0.5°C.
Well, I expected it as these "bags" of 10...20 pieces were sold around 1 USD which is far too
low for precalibrated sensors.
I bought a few of these loose ones, but I haven't tested them for accuracy. Here is the link to the listing of the last five I bought: https://www.aliexpress.com/item/MK00241 ... 11153.html