Page 1 of 1

DS18B20 setup to ignore Extreme data

Posted: 06 Feb 2019, 13:20
by petarhorvat1982
Hello,

i have a DS18B20 and it is working fine.. except every now and then it jumps extremly..
Image

the cable is about 7 meters and it is not thin

i use the standard resistor.. should i use something else? it is 5V supply.

It doesnt bother me except the problem with the graph then. can i say to ESP EASY to ignore unusuall values?

Thanks

Petar

Re: DS18B20 setup to ignore Extreme data

Posted: 06 Feb 2019, 17:19
by grovkillen
You could have a average value. You can use internal variables for that.

Re: DS18B20 setup to ignore Extreme data

Posted: 06 Feb 2019, 18:37
by kimot
The bad value is most likely as 85, exceptionally 0.
So send with rules and ignore the value of 85.
Even in the room or outdoors, such temperature does not often occur.

Re: DS18B20 setup to ignore Extreme data

Posted: 07 Feb 2019, 08:35
by mrwee
Is your cable twisted pair? That minimizes noise on long 1w cables. 7m should normally not be an issue

Re: DS18B20 setup to ignore Extreme data

Posted: 07 Feb 2019, 14:08
by grovkillen
mrwee wrote: 07 Feb 2019, 08:35 Is your cable twisted pair? That minimizes noise on long 1w cables. 7m should normally not be an issue
Good suggestion. I try to use twisted pair (network cat cable) for that reason.

Re: DS18B20 setup to ignore Extreme data

Posted: 07 Feb 2019, 16:23
by mrwee
Having had a huge 1-wire network, I learned the hard way, that 1-wire is not designed for long cable-runs, thus one should use twisted-pair cables, minimize number of connectors and avoid running 1w cables in parallel with mains cables.

Re: DS18B20 setup to ignore Extreme data

Posted: 07 Feb 2019, 16:55
by Shardan
These readings look like dropouts from data reading.
Usually this occurs due to hardware reasons.

Theoretically OneWire should be able to run on cablings up to 50 or 100 meters.
My practical experience shows that this length is difficult to reach.

One important point is the cable.
Why does TP-cable work better? This has two reasons.

First and simple, the wire in a CAT-5 or CAT-6 is somewhat thick.
Voltage dropping is lower with this cable then with ordinary phone cable.

The second reason isn't that obviously: The TP-Pairs are highly twisted, much more then usual phone cable.
With high twisting interferences from outside have significantly lower effect.
Watch out with shielding! Use wires for grounding, and connect shielding only on one side, usually the ESP's side to GND.

Another point I never tested when i was working on DS18B20:
The ESP uses 3.3V. Minimum voltage of the original DS18B20 (Manufacturer_ Maxim) is 3.0 V
This might lead to problems with longer cabling.
It's possible that this works better if 5V is used for the DS18B20 and pullup, connection to the ESP via level shifter.

Some things that might help in general:
Don't use Phantom Voltage. Yes it is possible. With really long cables it will run into problems anyways.
Use a capacitor of 22...100µF from Vcc to GND on any DS18B20 in a long bus cable.
Never use more then one pullup resistor on the same bus cable.

Re: DS18B20 setup to ignore Extreme data

Posted: 12 Feb 2019, 10:53
by maluko
i use paralise power mode, the longest sensor are 20 mts, and its working.