I lost four DS18B20s before I worked out what was happening, and the failure pattern was what made it hard.
A sensor would work perfectly. Two sessions, five, sometimes a dozen. Then it would return garbage forever — not noise, not drift, just nonsense from a part that had been fine an hour earlier. I replaced the sensor and the new one worked. So I blamed the sensors, ordered a different batch, and lost those too.
Then I blamed the water. The thermowell was dry inside and the cable gland was sealed, but I checked anyway. Nothing. I blamed the wiring, reflowed every joint, shortened the lead. Nothing.
What finally gave it away was cooking at a friend’s house on a gas hob for a week with no failures at all. The variable was not the sensor, the water or the wiring. It was the cooktop.
An induction hob is a large coil throwing a serious alternating magnetic field around, and I had placed a bare semiconductor inside a metal tube directly above it. The stainless thermowell I had fitted to protect the sensor was acting as an antenna, collecting that field and delivering it to the one component I was trying to shield.
Two changes, and no failures since. First: bed the sensor in thermal paste before it goes into the well. Second: bond the steel tube itself to GND with a wire.
The ground bond is almost certainly doing the real work — it turns the sleeve from an antenna into a shield wrapped around the sensor. The paste went in for thermal coupling, and it does help there; the probe responds noticeably faster with the air gap gone. But it also holds the sensor still inside a grounded enclosure, which cannot hurt.
Several months of induction use since, no dead sensors. That is months, not years, so I will say “this fixed it for me” rather than “this is solved”. If you build one and still lose a sensor, please tell me.
The general lesson is worth more than the specific fix: a metal enclosure is only a shield if it is connected to something. Floating, it is an antenna, and it will deliver whatever it collects straight into the most sensitive thing you put inside it.
Ilia Kuzmin
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.