DS18B20 jumpy readings


#1

Thank you for taking the time to submit your bug/issue! Please use the points below as a guide when submitting.

  • Device & model you are using (Ex: Pi 2 Model B or Arduino Uno with W5100 Ethernet shield)
    Arduino uno with Ethernet W5100 shield
  • What dashboard are you using? (Web, iOS, Android)
    Web and android
  • Please describe the bug / issue as detailed as possible. Attaching the code and any relevant screenshots would be very helpful!
    I have an outside temperature sensor DS18B20 hanging on the arduino. It reads the most of the time ok but sometimes the read makes an impossible jump. See the added picture. I will add another sensor to the uno to see if is remains.
    Perhaps anyone an idea how this happens?
    On my PI i got several DS18B20’s without fault readings and same cable and cable length.

In the picture the first jump is from -4 to -0.1 and the secon -5.3 to -8 .


#2

I have experienced similar problems, then can be impossible to find. For me most of the time it was the termination resistor 4.7K I changed to about 3.3K and that resolved the problem. The fault was repeating at approximately the same time every day, making it very hard to debug. I put a scope on the line and saw random noise all the time so lowering the impedance reduced the noise below the threshold. Another big one I have seen several times is the power supply. Replacing the power supply resolved the problem. In checking the “bad” supply it tested OK until I lowered the input voltage, it had no headroom. Further investigation showed the main filter was loosing capacity. There may not be enough time to allow the data to be received properly, add that Honorable delay() and see if that helps. I do not have a data sheet but I believe the unit you are using does not need the +5 connected, it steals power from the data line. If you are doing that add the +5.


#3

I think it wil be a power problem. I have a ldr also attached to the arduino and at exactly the same time the ldr and the ds show a reading that is not possible.


#4

i have the same sensor working prefectly im agree whit Gil


#5

I have since the last post changed the resistor for both ds18B20 tot 3.3k but no result. I also added an extra capacitor to the power circuit as a buffer. I have not yet replaced the power supply.

It is very weird that the wrong reading or " data jumps " only happen on exact time points. See the pictures of a reading at 1:00 h. The error can be seen on 2 temperature sensors and an LDR.

I wil note down wich time points the data jumps occur in the future and post them.
I’m open to suggestions :grin: @rsiegel @bestes