Page 1 of 1

DS18B20 Long Cables

Posted: 05 Oct 2021, 20:34
by Otti20vt
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 8113 times
Just want share my experience :D

Re: DS18B20 Long Cables

Posted: 05 Oct 2021, 20:45
by pppp33
Thanks for sharing !
Usually they say "NO WAY" and we don't even try to go beyond specs.....

Re: DS18B20 Long Cables

Posted: 05 Oct 2021, 21:04
by TD-er
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.

Re: DS18B20 Long Cables

Posted: 08 Oct 2021, 19:31
by seb82
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).

Re: DS18B20 Long Cables

Posted: 10 Oct 2021, 17:08
by Otti20vt
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 7959 times