metallica21156
Posts: 10
Joined: Sat Nov 24, 2018 6:34 pm

ds18b20 issues

Sat Nov 24, 2018 6:43 pm

so im having issues seeing 6 soon to be 7 sensors. My issue is when i try to read them all i get is w1_bus_master1 respoonse. If i connect all the sensors to a bread board everything works fine and i can see all 6 but once i put them into the system i have then i can't see any. I have some a few feet from the pi and some 3 20 feet away. When i try to read them i get no response. I had ran it in cat5 and then i tried thermostat wire and still no change. If i try reading the 3 close sensors i can see them. If i disconnect the close and try to read only the far set it wont read anything. What am i missing here?

PhatFil
Posts: 1680
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: ds18b20 issues

Sat Nov 24, 2018 7:01 pm

check the gauge of the wire your using and the expected voltage drop you can expect over the length of wire you are using to connect,

a multimeter to double check the vcc voltage recieved by the distant probes could confirm/dismiss this theory,

but iirc if the vcc voltage drops below 3v it will be insufficient to power the sensors.

check page 6 for a non parasitic power solution circuit..
https://cdn-shop.adafruit.com/datasheets/DS18B20.pdf

metallica21156
Posts: 10
Joined: Sat Nov 24, 2018 6:34 pm

Re: ds18b20 issues

Sat Nov 24, 2018 7:17 pm

i have checked the voltage and im reading 3.3 at the sensors of the long run. I even tried the 5 volt setup and no change. The thermostat wire is 20ga.

PhatFil
Posts: 1680
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: ds18b20 issues

Sat Nov 24, 2018 11:02 pm

Its 'always' the cable, unless you rule it out #1 that is .. can you do a continuity check on every wire junction.. :) . any dry/weak solder joints??

i assume when on the breadboard within jumper cable reach of the pi all sensors registered and read consistently??

with longer cables there are reflection and ringing issues with the data transmission but i dont fully understand that tbh, if you google ds18b20 and max wire length you will find some have had success with longer cables using different resistors to the 4k7 recommended.

If you can supply 5v 250ma dc power to the more remote location AND its within wifi range of your AP?? then you could hook the furthest 3 sensors upto something like a $3 wemos D1 esp8266 dev board and broadcast their readings via wifi and mqtt perhaps, using comunity firmware from github on the esp would require only configuration once flashed via usb

metallica21156
Posts: 10
Joined: Sat Nov 24, 2018 6:34 pm

Re: ds18b20 issues

Sun Nov 25, 2018 1:40 am

I changed the pull up to a 2200k and for now it seems to be working.

Return to “Troubleshooting”