DS18B20 setup to ignore Extreme data

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
petarhorvat1982
Normal user
Posts: 1
Joined: 06 Feb 2019, 09:17

DS18B20 setup to ignore Extreme data

#1 Post by petarhorvat1982 » 06 Feb 2019, 13:20

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

User avatar
grovkillen
Normal user
Posts: 2733
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 setup to ignore Extreme data

#2 Post by grovkillen » 06 Feb 2019, 17:19

You could have a average value. You can use internal variables for that.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kimot
Normal user
Posts: 111
Joined: 12 Oct 2017, 20:46

Re: DS18B20 setup to ignore Extreme data

#3 Post by kimot » 06 Feb 2019, 18:37

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.

mrwee
Normal user
Posts: 114
Joined: 31 Aug 2016, 12:52

Re: DS18B20 setup to ignore Extreme data

#4 Post by mrwee » 07 Feb 2019, 08:35

Is your cable twisted pair? That minimizes noise on long 1w cables. 7m should normally not be an issue

User avatar
grovkillen
Normal user
Posts: 2733
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 setup to ignore Extreme data

#5 Post by grovkillen » 07 Feb 2019, 14:08

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

mrwee
Normal user
Posts: 114
Joined: 31 Aug 2016, 12:52

Re: DS18B20 setup to ignore Extreme data

#6 Post by mrwee » 07 Feb 2019, 16:23

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.

Shardan
Normal user
Posts: 1050
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: DS18B20 setup to ignore Extreme data

#7 Post by Shardan » 07 Feb 2019, 16:55

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.
Regards
Shardan

maluko
Normal user
Posts: 112
Joined: 02 Sep 2015, 00:49

Re: DS18B20 setup to ignore Extreme data

#8 Post by maluko » 12 Feb 2019, 10:53

i use paralise power mode, the longest sensor are 20 mts, and its working.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest