Saw the stuff on DS18B20 sensors. I have had quite a few fail for various reasons and know quite a bit about the failure modes.
First ones were hand soldered by me to CAT5 cable with heat shrink over each pin and then heat shrink over the assembly. They started failing in less than a few months after being buried. Was worse when it was wet. The ones that were not directly buried failed after a couple of years. Solid core CAT5 is not a good idea for this application.
Next I purchased the ones that are pre-made with stainless steel covers and claim to be waterproof. They worked well for about a year in my compost pile that gets to 60C for an extended period of time. Turns out they don’t put an epoxy or sealant in many of these.
Next I encased the stainless steel encased ones in epoxy. That seems to have done the trick and I now get more than a year out of a sensor pole for my aerated static compost pile.
So, the errors I saw varied. Sometimes the device doesn’t respond at all. Sometimes it gives bad readings, obviously wrong. Sometimes the readings are not obviously wrong, but are changing too quickly to be real.
Here is how I handle it:
- Add a questionable field and valid field to the data.
- Check the CRC every time
- Exactly 0 degrees C is questionable, since a short of data to ground at the right time will cause this and the CRC will NOT catch it.
- Exactly 85 degrees C is questionable if not not valid, since that is the default value and can occur if power is not sufficient (though they don’t need a lot)
- Always know and compare to the valid range of values for a location, ie when used for freeze protection in a normal location more than 40-50C is likely an incorrect reading.
- Always make sure you know what the valid range is. For a compost pile 60-80C is likely possible, though really warm and should probably trigger a cooling sequence.
Sorry for the interrupt, you can move this somewhere more appropriate.