Fake DS18B20 waterproof: what to do?

Good day! This article addresses the issue of fake sensors, the limitations of existing devices using these sensors, and a solution to this issue.

Fake DS18B20 waterproof: what to do?
Source: ali-trends.ru

Before me, fake sensors were also written about here. Characteristic differences between fake sensors and the original:

  1. The sensor, even connected in close proximity, responds uncertainly in parasitic power mode, every other time.
  2. In parasitic power mode, the high level recovers for too long (you can measure it with a microcontroller or watch the oscillogram)
  3. current consumption is significantly higher than a few microamperes (GND and VCC to minus, DQ through a microammeter to +5 volts)
  4. After the enumeration procedure (0xF0), the sensors do not respond to the scratchpad read command (0xBE)
  5. The temperature read from the scratchpad after power-on without a measurement command differs from 85,0 degrees.
  6. Scratchpad values ​​at positions 5 and 7 do not correspond to 0xFF and 0x10
  7. Temperature values ​​(at the first two scratchpad positions) read after the first power-on of a de-energized sensor without a previously given command for measurement, return the previous value, and not 50 05 (85.0 degrees).


Unfortunately, I do not have an oscilloscope, and the Galileosky BaseBlock Lite GPS tracker was used as a test bench.

The sensors were purchased from various vendors, and only one batch was powered by parasitic power. Only 5 batches of 50 were purchased.
The rest did not work on parasitic power at all. The terminal does not provide external power for the sensor, and the installation of the system on the vehicle should be simplified as much as possible.

The solution

So, the sensors were purchased, but only one batch worked correctly, and the proceedings and ordering a new batch would have taken a decent amount of time, and would have entailed cost overruns. Therefore, the problem had to be solved on our own.

Since only a two-wire circuit is used, it is necessary to organize the power supply of the sensor from the signal wire, that is, to organize parasitic power. I organized parasitic feeding according to the following scheme:

Fake DS18B20 waterproof: what to do?

In this scheme, the operation of the parasitic power supply is improved, but, at the same time, the ability to connect external power is left. At the same time, the connection diagram changes slightly: when connecting via parasitic power, the Vcc wire not used.

After assembling the circuit by surface mounting, the sensor was detected by the terminal with a capacitor of 1 μF. For mass implementation, panelized boards with parasitic power boards were designed and ordered:

Fake DS18B20 waterproof: what to do?

An interesting point: Manufacturers can use hot melt glue or silicone to seal the sensor. In the first case, you can heat the sleeve, remove the sensor, insert the board, return it to the sleeve and pour more hot melt glue. In the second case, this will no longer work, and I had to solder the board close to the sensor, fill it with hot melt glue and put on heat shrinkage, as a result it looks like this:

Fake DS18B20 waterproof: what to do?

Conclusion

Here I would like to urge device manufacturers to take this moment into account in their products, and sellers to check sensors before selling or not to deal with the supplier at all if he supplies counterfeit sensors, and users to cover this topic in comments, letters or appeals.

Source: habr.com

Add a comment