Posts: 2
Joined: Fri Jun 14, 2019 1:38 am

multiple DS18B20 no longer showing up

Fri Jun 14, 2019 1:49 am

Hello, I've been scratching my head for hours now and decided to post here as I have almost given up all hope..

I'm working on a kitchen automation project for my boss that will log temperatures in our walk-in fridge/freezer. I'm using the waterproof self-contained DS18B20 probes. I got the code working and had it running for a few days while reading temps every 5 minutes successfully. We need to run it some distance, so we decided to use RJ11 phone line, which I just got wired up today..

Now the probes no longer show up in /sys/bus/w1/devices. I've used a multimeter to confirm the correct voltage and resistor values at the end of the cable run. I've tried switching to 5v power/3v3 pullup for the data line which still doesn't work.

For wiring I've tried both 5v and 3.3v for the probe, both of which had a resistor between 3.3v and data (GPIO 4). I've tried both 2kohm and 1kohm configurations, since the wires are running some distance.

The WORKING setup was 3.3v VCC and a 1kohm resistor between 3.3v and gpio pin 4.

I'm completely stumped.. Any information would be helpful.

User avatar
Posts: 140
Joined: Tue Feb 28, 2017 1:13 pm
Location: Sydney, Australia

Re: multiple DS18B20 no longer showing up

Fri Jun 14, 2019 2:03 pm

So your changes broke the circuit.
Go back to your last working design
Then add the changes one by one.
One sensor at a time

Guaranteed its a bad connection/crossed wires
RJ11 crimp connectors are renowned for trouble. Check all your cables and crimps first.

Do not loose sight of the forest for the trees.

ROll back, confirm working, then make small changes, testing each time.

Be methodical and Patient.
..the only thing worse than a stupid question is a question not asked.

Posts: 91
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: multiple DS18B20 no longer showing up

Sat Jun 15, 2019 6:54 pm

My suspicion is that the data line is seeing reflections due to the longer length of wire now connecting the sensors.

Take a look at this post - it may offer assistance in solving the problem:

You didn't state how long the run was, but as a first step, try to minimize the capacitance on the data line. This is usually the culprit when longer runs mysteriously fail with these devices. The 1-wire protocol is sensitive to this.
When you say RJ11 phone line, are you referring to the four conductor "silver satin" type wire? If so, the conductors are probably too thin (I think they are around 28 gauge) and could be a big part of the problem.

You could try adding a small capacitor (say 10uf) between the Vcc and Gnd pins at each sensor to see if that helps. The wires in "silver satin" type cable are not twisted (not the cables I have seen anyway), so the inter-electrode capacitance isn't as great as would be found with Category (Ethernet) type cable. Adding caps may just do it. If not, it could be the length or the gauge of the wire.

When it comes to running short distances, using a GPIO pin is OK, but for any distance, I'd recommend using a driver chip.

Posts: 2
Joined: Fri Jun 14, 2019 1:38 am

Re: multiple DS18B20 no longer showing up

Sun Jun 16, 2019 1:07 am

I have narrowed it down to somewhere during or after the cable run, because it works fine when I use a sensor connected directly to the GPIO pins.

I only need to run a maximum of 25ft. I'll try a different cable, we purchased a bunch of different RJ11 cables in different lengths. Maybe the longer ones have higher quality materials.

That aside though, I won't be getting back to this until next week as I've got an event coming up.

Return to “Automation, sensing and robotics”