DS18B20 Long Cables

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Otti20vt
Normal user
Posts: 10
Joined: 14 Jan 2021, 00:05

DS18B20 Long Cables

#1 Post by Otti20vt » 05 Oct 2021, 20:34

Hello
A few months ago I made a couple of ESP8266 boards (Looky Wifi), many times I had problems with the DS18B20 Sensors. :evil:
Now i have a Project where a DS18B20 Sensor is 20 Meters Deep in the Ground, the Reading of this sensor was not possible, i got only Read errors. :oops:
At home I connected a DS18B20 sensor to the ESP8266 Board, first with a 2m cable that worked and then with a 70m cable what didn't work. :roll:
Then I measured with the osciloscope the signal at the end of the line, as you can see on the Pictures the pullup is way too weak @70m Cable!
Lesson learned :lol:


ESP8266 DS18B20 Resistor.jpg
ESP8266 DS18B20 Resistor.jpg (2.07 MiB) Viewed 7393 times
Just want share my experience :D

pppp33
Normal user
Posts: 71
Joined: 25 Oct 2015, 17:53

Re: DS18B20 Long Cables

#2 Post by pppp33 » 05 Oct 2021, 20:45

Thanks for sharing !
Usually they say "NO WAY" and we don't even try to go beyond specs.....

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: DS18B20 Long Cables

#3 Post by TD-er » 05 Oct 2021, 21:04

Ah good to see it is working with a lower value resistor.
I can imagine the Dallas sensor is now running slightly out of specs, with higher current.

Also test it with the cable unrolled, to see if it may also pick up a lot of noise.
Having it rolled up like this may also act as a filter.

seb82
Normal user
Posts: 62
Joined: 05 Sep 2018, 10:56

Re: DS18B20 Long Cables

#4 Post by seb82 » 08 Oct 2021, 19:31

Thanks for feedback.

In addition, in bsb_lan documentation, there is a chapter about DS18B20 with some advices (mainly adding 100nF and 10µF capacitor). To go further, they also refer to a tutorial from manufacturer for very long lines (>100m).
Sébastien - espRFLinkMQTT gateway RFLink MQTT on esp

User avatar
Otti20vt
Normal user
Posts: 10
Joined: 14 Jan 2021, 00:05

Re: DS18B20 Long Cables

#5 Post by Otti20vt » 10 Oct 2021, 17:08

hey guys :)
for me this 1kOhm pullup definitive work, I connected the ESP8266 today and it worked straight away!
I have an 10m line on the controller then a Stub of 2m with 1x sensor, then 20m line down in the ground.

@seb82
I also tested with a 100nf capacitor and a 100uf, but that didn't work for me.
DS18B20 30m.png
DS18B20 30m.png (11.5 KiB) Viewed 7239 times

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests