News:

Let's find out together what makes a PIC Tick!

Main Menu

DS18B20 (Fake?)

Started by dr-zin, Sep 15, 2025, 10:52 PM

Previous topic - Next topic

dr-zin

Hello friends,

I have purchased and hooked up a DS18B20 (from an online order batch of 5).  The code for reading the temp was mostly lifted from Top204's 7/22 post, and verified with code segments from other posters as well, so I assume I am reading it properly.  I am using a PIC16F627 with internal 4 MHz clock.  The program basically powers up the sensor, reads in the code stream, processes it into temp (in deg. C), and displays it to an LCD (20-04) display that updates once/sec.

It appears to work exactly as needed, but the temp displayed drifts radically, starting at about 30 deg. (which is higher than ambient) and, if I lightly place my finger on the TO-92 case, it rapidly zooms up to 60-65 degrees over about 20 seconds.  I know I'm hot, but nobody is THAT hot!  Similarly, the temp. plummets when I place an ice cube in a zip lock bag against the case, but that is more or less expected.

I have tried 2 from the batch of five (purchased from a US eBay reseller, but who knows the actual source?) and gotten the exact same behavior.  Should I try the rest?  Has anyone seen this behavior from this sensor?  Should I spring for a few sensors from reputable US suppliers?  Are these fake???  Any insights or experiences you would like to share would be appreciated.  Thanks, Paul

RGV250

Hi,
Are you sure it is a "B" as from memory there is a difference with 1820 and 18S20. If i get time I will have a look at the datasheets to confirm this.

Bob

RGV250

Hi,
Perhaps you could post your code, I have looked and the "B" version has programmable resolution (9-12bits) which might be the issue?

Bob