Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:41 27 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: DS18B20 Temp sensor problem

     Page 6 of 6    
Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2287
Posted: 11:42am 09 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  According to https://github.com/cpetrich/counterfeit_DS18B20
Your rom code is wrong due to the "20 02" last two numbers which should be zeros.


from the above link:
"If the ROM does not follow the pattern 28-xx-xx-xx-xx-00-00-xx then the DS18B20 sensor is a clone [5]."
and
"References
5. Own investigations 2019, unpublished."

the only statement about the content of the ROM made by the DS18B20 datasheet is:
"The least significant 8 bits of the ROM code contain the DS18B20’s 1-Wire family code: 28h. The next  48  bits  contain  a  unique  serial  number.  The  most  significant 8 bits contain a cyclic redundancy check (CRC) byte  that  is  calculated  from  the  first  56  bits  of  the  ROM  code."

based upon the DS18B20 datasheet, and without further input directly from Maxim, i'd find it hard to accept as gospel the "00 00" assertion; Maxim and/or DS could have in the past released any (large or small) number of DS18B20 with non-zero values in the 6th and 7th byte of the ROM.

i also have doubts about the forensic usefulness of the default contents of EEPROM - these values could innocently be changed by Maxim during manufacture and testing, during sample testing post-manufacturing, or by anyone in the supply chain who may have wished to test devices they handled. Maxim may have a number of plants capable of manufacturing DS18B20, and different plants could use their own individual testing and calibration routines that leave the EEPROM contents in set to a pattern identified as 'fake' .

apart from abnormal behaviour (including inaccuracy), the only sure way to identify a non-maxim part is to split the case open and examine the silicon die.


cheers,
rob   :-)
Edited 2020-08-09 21:47 by robert.rozee
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 12:13pm 09 Aug 2020
Copy link to clipboard 
Print this post

Hi Rob, All,

I have been wondering about the ROM as surely if you go to the effort to create a ‘clone’ could you not just clone the ROM code.

IF the one I bought from Jaycar is a fake it seems to have an almost identical temperature report to the genuine one.. (see my previous post with the two chips tied together.)

What is the zero degrees issue?  I can test them in a fridge/freezer/ice if you like.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 12:22pm 09 Aug 2020
Copy link to clipboard 
Print this post

  bigmik said  What is the zero degrees issue?

Paul_L once suggested to me that a very good way of testing/comparing perhaps dodgy waterproof DS18B20s was to put crushed ice in a glass, pour in a modest amount of chilled water, wait a few minutes for the ice to bring the water to very close to freezing, and insert the probes. That should be very close to 0C if you have the mix right, and a well-established universal calibration point.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5903
Posted: 09:49pm 09 Aug 2020
Copy link to clipboard 
Print this post

  robert.rozee said  
  TassyJim said  According to https://github.com/cpetrich/counterfeit_DS18B20
Your rom code is wrong due to the "20 02" last two numbers which should be zeros.


Rob, you left out the bit about conversion times
  Quote  Based on the timing for 12 bit conversion, your device is group A2.


While I agree that the rom code 'could' be valid, it is unlikely in the extreme that Maxim will have produced a batch of chips that do the conversions in half the time, and then gone back to the normal time in subsequent batches.

I suspect that the clone manufacturers chose rom codes well outside the expected range to prevent the chance of duplicate codes being discovered in the immediate future.

The chips that Mick and I purchased from the Jaycar supply chain, all have slower timing than the usual times seen with known good chips, but the timing is still within published specs so 'could' be valid, but suspicious.

I buy through Ebay.
I expect clones, recycled chips, out-of-spec rejects...

Jim
VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:42am 10 Aug 2020
Copy link to clipboard 
Print this post

Hi Jim, All,


I did the ice water trick and both sensors reported the same readings within 0.25C all the way down from the ambient of 19.5C down to where they stopped updating at 0.5C

Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5
Mouser =  0.5   Jaycar =  0.5



The Jaycar unit seems to respond quicker to the change but only by the 0.25C then the Mouser unit caught up and they were together again until the Jaycar once again responded to drop before the Mouser one

As far as I can tell the 2 sensors as are accurate as each other.

It took a good 10 minutes for both units to settle at 0.5C

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 02:40am 14 Aug 2020
Copy link to clipboard 
Print this post

  lizby said  
  bigmik said  What is the zero degrees issue?

Paul_L once suggested to me that a very good way of testing/comparing perhaps dodgy waterproof DS18B20s was to put crushed ice in a glass, pour in a modest amount of chilled water, wait a few minutes for the ice to bring the water to very close to freezing, and insert the probes. That should be very close to 0C if you have the mix right, and a well-established universal calibration point.

Funny thing about standards -- most of them aren't standardized -- except for the ice point of water.

It works best if you use distilled water (filtered rain water?), use an insulated coffee mug, ice chips not big ice cubes, stir the ice water for 30 seconds before inserting the probe, and insert the probe in the center of the mug without touching the sides or bottom. You should be able to achieve within 0.2°C of a true 0°C easily.

Paul in NY
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 03:04am 14 Aug 2020
Copy link to clipboard 
Print this post

Hi Paul,

I used filtered ice water from our fridge and ice dispenser...  After about 15min neither sensor dropped below 0.5c

I actually did another test that I didn’t report, I used a can of freeze spray and they once again followed each other within 0.5 and 0.25C (dropping was a bit more inconsistent (no more than 1.5C but I put that down to me spraying one more than the other chip, it is hard to equally spray each DS18B20 even though I bound them together)...

At about -27.5C (a bit like a Polak summer??) I stopped and let them both recover and the spread between the known good Mouser and the suspect Jaycar chip was no more than 0.25 99% of the time with the odd one 0.5 difference  between chips and quite often reading Exactly the same.

My conclusion is that the Jaycar chip IF it is a fake is an extremely good fake and is most definitely suitable to be used as a DS18B20.

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 05:23pm 14 Aug 2020
Copy link to clipboard 
Print this post

I don't understand why you guys go chasing the cheapest questionable source for these sensors. You're probably buying sensors that didn't pass final inspection. I suspect that the production yield after final inspection is less than 30%!

Bandgap sensors are difficult to make, requiring the calibration of the current density in two p-n diode junctions and measuring the difference between them. Why would you deliberately buy seconds when Mouser has over 3,000 of the real thing in stock at a price of < $4.00 each.

The only difficult part is finding an appropriately sized closed end stainless steel or copper tube to insert the TO92 case into, or just mounting them by their wires on a little terminal board.

Paul in NY
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 03:44am 15 Aug 2020
Copy link to clipboard 
Print this post

Hi Paul,

The object is NOT to buy cheap it is to determine exactly what you will get for your money.

It is very confusing, for instance this listing from Mouser.

Mouser DS18B20

Includes 2 pages of offerings for DS18B20,

'Manufacturers' include many different sources.

For example

Seeed Studio
Maxim
Adafruit
Sparkfun
DFRobot
ANAVI Technology
DLP Design..

Then Mouser has a fairly expensive freight cost To AUS unless you spend $60 which I do when I buy from them.
Mind you I really like Mouser I get my parts usually 3-4 days after I order which is fantastic coming from the `REAL' antipodes.

Here in Aus we really are stuck with RS Components (great to deal with and free freight no matter order QTY), but often have to buy in bags of 5, 10 or more.
Element14 which offers free freight over I think $50.
Both the above are generally (not always) expensive prices and I have found recently that even though they say a qty is in stock, often they are placed on back order which could be 2-3 months away.

Then there are Jaycar and Altronics who whilst cheaper have a very limited repertoire of stock but they are generally in range of almost everywhere, if you are in the cities.

Then there is really only a smattering of other suppliers with the stuff we tinker around with and mostly do not stock much at all.

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
     Page 6 of 6    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024