# Which one of these DS18B20 temperature sensors is fake?

A while back I bought two DS18B20 for half price, and today I bought another one for double the price. The part number on the cheaper one is printed while on the expensive one it's laser etched:

On the left is the expensive one.

Even though the price was double, the readings that I'm getting using Arduino are the same:

Sensor1 is the expensive one. While the temperature on mercury thermometer was 23.9-ish degrees.

So what's the difference? Why is the build quality and price different but the temperature readings are the same?

• What makes you think one is fake? You paid whatever they asked, it doesn't make it a fair price. – Finbarr Sep 4 at 10:24
• They look pretty similar to me. A better photo might help though. Manufacturers do change their assembly and printing machinery from time to time. – Finbarr Sep 4 at 10:26
• Strange that they are marked "Dallas", since Dallas Semiconductor was acquired by Maxim Integrated in 2001. maximintegrated.com/DS18B20 -- I'll never understand why people insist on buying from shady grey market vendors when Maxim sells factory direct and even gives free samples upon request! (Full disclosure: I work at Maxim) – MarkU Sep 4 at 10:55
• @MarkU but all images of DS18B20 in google search is marked with "DALLAS"! do you have/seen any of this sensors without DALLAS mark? – Hamed Sep 4 at 11:11
• No, the original ones were made by Dallas while Dallas Semiconductor was a separate company. I see no reason to believe that either of these devices is a fake, nor do I see any evidence that either of them is genuine. You have to use a trusted supply chain. – Elliot Alderson Sep 4 at 13:04

## 2 Answers

There isn't any good way to know. As Elliot Alderson rightly points out, both could be legitimate, or both could be fake.

• If the packaging and marking are different between the two parts, that could simply be because the manufacturer changed their packaging process. You'd have to check product change notices to confirm.
• The price difference could simply be because "each vendor charged the highest amount they could get away with". (The fact that you bought the parts indicates that this strategy worked.)
• Again from Elliot Alderson, the only way you can really trust a part is if you trust the supply chain. Otherwise the part could be counterfeit, or even if it's not counterfeit it could have been subjected to poor handling practices or similar. It sounds like the supply chain wasn't trusted in either of these cases, so each part should only be trusted to the degree that you have tested it.

Here is a nice presentation from Xtreme Semiconductor, a company that specializes in detecting counterfeit parts. Slides 20-31 show some examples of the tricks people pull when making counterfeit parts. Some are easy to detect with the unaided eye, others require advanced tricks like X-ray or opening up the part, as shown in the same slide set. Probably not something you're looking to do here.

tl;dr Just because the parts look different and were priced differently doesn't necessarily mean that one is good and/or one is fake. Put the part through rigorous testing, or just buy a new part from a trusted source.

After purchasing many DS18B20 sensors and probes on ebay I can assure you that price is a useless indicator for quality.

Let me address the question in the title of this thread: Which one of these DS18B20 temperature sensors is fake?

Fortunately, you can find out for yourself: you cannot proof that a part is authentic but if it behaves differently from an authentic, Maxim-produced DS18B20 then it is certainly a fake.

After looking at some hundreds of DS18B20 and comparing them to chips that are known to be produced by Maxim Integrated I concluded that the manufacturers of counterfeit DS18B20 do not bother to conceal the fact that they're counterfeit. They just try to make them look and act authentic enough to be able to sell them.

Based on that conjecture, try this:

1. Does the part have a ROM code that matches the pattern 28-xx-xx-xx-xx-00-00-xx? If not, then it is not Maxim-produced. (Manufacturers of counterfeit parts seem to go to some length to make sure the ROM codes of their chips do not collide with the ROM codes of Maxim's or other producers' chips.)
2. In the scratchpad register, look at byte 6 (reserved and value not specified in current datasheets. It reads 0x0c right after power-up and before the first temperature conversion -- if it doesn't even read 0x0c right after power-up then your part is definitely a fake). If this byte does not change following 44h temperature conversion commands even though the temperature reading changes then your DS18B20 is not produced by Maxim. (Background: Byte 6 is used in the DS18S20 to get 12-bit temperature resolution, and the DS18B20 and DS18S20 share the same circuit to the maximum extent possible, see detailed description in Maxim Application Note 4377.)
3. There are many other ways to tell, e.g. you can look for implementation bugs, implementation detail (e.g. the amount of time it takes to actually perform a temperature conversion), or response to undocumented function codes. I've summarized a bunch of differences I came across here: https://github.com/cpetrich/counterfeit_DS18B20

Alternatively,

• Ask Maxim tech support if the combination of date code and batch code printed on the chip exists in their database.