I have been using DS18B20 sensors connected to IoT devices for monitoring real time temperature.
I notice that at times, the sensor returns a temperature value of +127C .
So it will send a series of normal values say beyween +30 to +31C, and then erratically it will just send a couple of values of +127C.
Has anyone else also faced this? What could be the cause?
Thank you for your reply. Much appreciated.
Yes, we can add the value of 127 to the list of events to filter out.
We would also like to understand how to reduce the incidence of such errors to begin with.
We are currently connecting the DS18B20 encapsulated in a stainless steel capsule, in parasitic mode with a telematics device that has a Dallas 1-wire input. I am not sure if they are using any pull up resistors on the circuit of the device. But should I try to add any pull up resistors etc? If yes, could you PLEASE guide me. I am not an embedded engineer so I don't have a very deep understanding of this.
Thank you.
Parasitic power is less reliable than normal power with three wires.
Using them with 5V is more reliable than with 3.3V.
The cable influences the reliability.
The encapsulation in stainless steel is no problem.
I don't know the best value for the pullup resistor of a parasitic powered DS18B20
If you bought the sensors from AliExpress/Ebay/Amazon, then you have counterfeit sensors. They are not as reliable as the genuine sensors. They will cause trouble in one way or the other, and probably in many ways. If you bought the complete thing with the steel capsule from AliExpress/Ebay/Amazon, then the steel capsule will soon start to leak
Hello
Thank you for the warm welcome. I am finding this forum very helpful indeed.
You are right. We do face issues of the steel capsules leaking. We will explore the sensors on the link provided by you.
In your post you mentioned that the wires have a role to play in the reliability. Would you be able to provide some pointers from your experience on what wire is best suited for connecting DS18B20 sensors in a noisy EM environment (engines / induction motors / compressors turning on and off in close proximity).
Any normal supplier (mouser, digikey) sell genuine sensors.
If you have a noisy environment, then you will have some communication failures over the 1-Wire bus anyway. So you have to filter out the bad ones (-127°C) in software.
Lowering the value of the pullup resistors helps. A shielded cable helps. Normal power with three wires helps. Sometimes a capacitor is added at the DS18B20.
Which Arduino board do you use ? How long is the distance ? How many sensors are on the 1-Wire bus ?
We are not using it with Arduino. We are using it with a telematics devices, which has a 1-wire input along with 5V 1-wire power,. We usually connect it in parasitic mode. We have tried normal power (3-wire connection) as well. There was no perceptible improvement in data quality between parasitic vs normal power. In fact, at times we data to be better when connected through parasitic power. Issue with shielding is that we can not guarantee that shield layer will remain grounded. Unless shield is grounded, the shield will end up causing even more interference. So we are avoiding that. We are using straight wire cable to connect. Wire length varies between 10-20 mtrs.