Live data from Hacker News

Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

github.com

61–70 of 239 posts

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#61

Trust in hardware supply chains when manufactring a PCB for a product can be quite fragile: when one component operates outside of spec, the entire device could be rendered useless. In the case of the DS18B20, the author states in the 'Warning' section that the primary way of determining counterfeit sensors is to check the ROM output compared to a known format. When counterfeit parts like this are added, it creates v…

> This anti-consumer behavior on behalf of companies I strongly disagree with this. I see no way to rationalize that a company should be responsible for ensuring that counterfeit devices work correctly by releasing drivers that are tolerant of them or do not stop them from functioning. FTDI's products are the combination of their hardware with their drivers. Both are required in order to delivery functionality and re…

> I strongly disagree with this. I see no way to rationalize that a company should be responsible for ensuring that counterfeit devices work correctly by releasing drivers that are tolerant of them or do not stop them from functioning.

There's a difference between not taking steps to ensure counterfeit devices function, and purposefully causing hardware to fail on a remote system. For example, I'm pretty sure purposefully causing the problem is illegal, if the user didn't request it, as it seems the same as hacking to me.

> Imagine counterfeit processor make it into the supply chain. Should the avionics OS do its best to work with every possible fake or should it brick it on power-up before that potentially dangerous aircraft gets off the ground?

Refusing to function is acceptable. Bricking the hardware is not.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#62

Earlier quoted context omitted.

If this was used in a BMS with a lithium battery, a counterfeit sensor's behavior could result in the total loss of a device. Let's say the device's PCB is designed such that the sensor is connected to a rail that requires parasitic power, and you were unexpectedly shipped the D1 variant that outputs garbage data back to the onboard firmwre instead the proper temperature. Your company would have to recall every devic…

This particular sensor isn't used in mass produced devices AFAIK. NTC thermistors are cheaper and easier to design for using cheap analog components. Reading DS18B20 is quite an exercise when it comes to $0.05 microcontrollers used in e.g. household appliances.

That's true in an analog design, I recently took apart a generic computer power supply that failed and noticed it used NTC thermistors. In a hobbyist kit I purchased that came with with various cheap sensors, the temperature one has a Dallas 18B20 on a board to be interfaced with an Arduino. It's probable that some people would just duplicate exactly what they used on a quick-and-dirty design to be deployed on a small scale.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#63
I've got one genuine one that I bought from Sparkfun near the end of 2015 and 10 more I got from Amazon in the middle of last year.

I haven't gotten around to doing anything with the 10, but the genuine one has been hooked up to an RPi for a while, which is controlling a space heater.

That was still using a solderless breadboard, so it was an easy matter to swap in the 10 one by one and check if they were genuine. As was probably to be expected, they are all counterfeit.

They all seemed to be fairly consistent with each other and with the genuine one, although it turns out that these things are really sensitive to body heat--just holding one pinched between two fingers while slightly spreading the leads to fit the breadboard would heat it up 2-3 C. This made comparing different ones a bit confusing.

The genuine one seems to cool back down to room temperature noticeably faster than the counterfeits. I wonder if the genuine ones take more care to ensure that the die is not too insulated from the outside world so it will be more responsive?

Anyway, since I'm still using a solderless breadboard, and then things are designed to chain, it was not hard to rig it up so all 11 are hooked up at once [1]. (And yes, the resister is hooked up correctly. It is just a really bad angle in the photo that makes it look like it is off by one).

I've got a program running now that checks them all periodically and logs all the readings. Here are results after it has been running about 20 minutes:

  22.437 [22.375, 22.25, 22.187, 22.312, 22.375, 22.187, 22.25, 22.25, 22.375, 22.25]
The first one is the genuine one, and the array are the counterfeits.

[1] https://imgur.com/a/jPBTrvJ

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#64

Earlier quoted context omitted.

Lots of hobbiests will buy things off ebay, Amazon, or Alibaba. It is extremely common and if you go into forums it is even encouraged. I'm not saying you should go to those places, but that lots of people do.

We've spoiled ourselves with CCP subsidy. It wasn't like that about 20 years ago. You'd pay a pretty penny for things and support local/national businesses. Now, you're funneling fuel into the dragon's mouth. For what? A hobby project? Just spend the $7 shipping and get it from Digikey.

Shipping fee is not supported by CCP subsidy but by Universal Postal Convention.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#66

I buy from AliExpress and eBay not because of the shipping fee but because most of the time digikey/mouser doesn't sell hobbyist friendly form factors (like breakout boards) and some of this ic come in really tiny package (like tssop) which for an amateur are difficult to solder. Sometimes they need a resistor or a capacitor or a transistor easier to buy a board with everything on it that you stick to another board a…

That, or they slap huge markups for these otherwise unpopular products.

Try to find a popular 16-bit ADS1115 ADC on digikey. They offer SMD 10X2QFN chip for $8, 10VSSOP for $10, assembled adafruit board for $22 (!!!) or DFRobot board for $15 (exact same board is half the price on ebay).

In comparison, ADS1115 boards from aliexpress are $2.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#68
post #6

This affects temperature sensors/parts bought from un-official distributors like ebay or AliExpress, not digikey, farnel, etc. Perhaps I've been too lucky in my career and practiced EE for work, but who would you ever go to ebay instead of digikey?? Digikey certainly has a premium, but their speciality is small numbers/cut tape/etc and they have a small order size which makes them ok for hobby work, and I've used the…

How else can you get anything from Maxim besides samples? (joke may be a decade out of date)

I understood that joke to mean, "Maxim components are so expensive that the grey market is about the only place the layman can afford them in more than 1-off prototype quantities."

At least that was my experience 8 or so years ago when I made the mistake of purchasing a lot of 100 MAX7219 off eBay for $100 shipped from China...$1/ea was such a tempting deal to a younger, more naive self when these chips were selling for upwards of $7/ea from ECIA-authorized distributors at the time.

Never fell for that trap again.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#69
post #63

I've got one genuine one that I bought from Sparkfun near the end of 2015 and 10 more I got from Amazon in the middle of last year. I haven't gotten around to doing anything with the 10, but the genuine one has been hooked up to an RPi for a while, which is controlling a space heater. That was still using a solderless breadboard, so it was an easy matter to swap in the 10 one by one and check if they were genuine. As…

I remember reading somewhere that genuine ones have a sensing element anchored to the ground pin, so it might explain why it cools down faster when inserted into a breadboard

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#70

Trust in hardware supply chains when manufactring a PCB for a product can be quite fragile: when one component operates outside of spec, the entire device could be rendered useless. In the case of the DS18B20, the author states in the 'Warning' section that the primary way of determining counterfeit sensors is to check the ROM output compared to a known format. When counterfeit parts like this are added, it creates v…

> This anti-consumer behavior on behalf of companies I strongly disagree with this. I see no way to rationalize that a company should be responsible for ensuring that counterfeit devices work correctly by releasing drivers that are tolerant of them or do not stop them from functioning. FTDI's products are the combination of their hardware with their drivers. Both are required in order to delivery functionality and re…

Let's work through this example. You're a manufacturer of devices using FTDI chips. You make an emergency system for airplanes which e.g. releases breathing equipment, or life rafts, or similar. Or a backup avionics system. Due to a supply chain slip-up, a small number of counterfeit devices slipped in.

An emergency comes up, and the instant the emergency system comes up, it turns out to have been bricked. People die. Is this a good outcome?

If I were a manufacturer, I'd want to know about this ASAP. Would I want devices to stop working? Especially the examples you gave where people's lives are on the line? Absolutely not. I'd want them to work as well as possible until a replacement can go out.

Pro-consumer would be a pop-up letting the user know they received a counterfeit devices. I can then contact whoever sold me the device, and ask for a replacement. During cross-shipping, I can keep working. Anti-consumer is having my business trip and fall on its face when all the pen tablets which allow people to work from home are bricked during a pandemic.

Of course the counterfeit manufacturers are the bad guys. But FTDI is a company I'd never do business with either. If I'm an FTDI partner, and I got the wrong product, we were both cheated. I'm no more at fault than FTDI.

Should FTDI smack me and my customers upside the head for it? Well, that means we're not really partners.

Post reply on HN