DS18B20 temp sensor read 85 C

Hi, I have DS18B20 connect to arduino UNO. it read out temperature right when temp is not changing. the problem is when temperature rises, the temp value change to 85C, then back to right value. I wonder if anybody else has same case as mine. note: when change to 85C, the CRC is right. this means no read error happened when read from 1 wire bus.

thanks Xianwu

correct myself. when temp not changing, there is still glitch of 85C. but it does not happens often.

This may be just a case of bad timing. You could be going round the loop too quickly to get a proper read. If this is is indeed the case and happened by accident, you can fix it for sure by inserting a delay in the loop to ensure a reading at one second intervals.

In the unlikely event that you really need a faster loop, you can do the above just prove it's OK and then get more serious about it. You can ensure a faster read by selecting a lower resolution and by not using parasitic power.

The problem might also be caused by bad cables, particularly if they are very long, but this only merits examination if the above comments are irrelevant!.

thank you Nick. I'll try long delay between each read.

my bad. I let DS18B20 power supply floating, it should be connect either to GND or VCC. after that the is no glitch of 85C.

IIRC, 85C is what you get before the chip has read anything, so unless you are using it in a very hot environment, it's generally a sign that something is wrong - for me, that's usually been wiring too.

seems 58C is a special value, to indicate something. but it's not documented.

There is a footnote on page 4 which says "The power-on reset value of the temperature register is +85°C." so if you read 85 degrees it means it hasn't done a conversion since the last power on. You hadn't wired it up properly so the sensor was being powered off and on periodically, which resets the register to 85 and that is why you got a valid CRC from it.


thank you Pete