I'm trying to setup a network of temperature sensors for my house connected to a Raspberry PI. I'm using Cat6 unshielded cable (data + ground running on one pair, 5v/ground running on another). To test. the lines (5v, GPIO4, Ground) from the RPI are connected to a breadboard, which has a pair of punchdown blocks pushed into it; ~60m of unshielded CAT6 UTP is run between the two blocks. If I connect my DS18B20 direct to the RPI without the CAT6, it works fine - the RPI detects it and it shows up under "/sys/bus/w1/devices"; if I connect it to the punchdown block at the far end of the CAT6, I either get nothing at all, or an unstable collection of "ghost" devices with incorrect IDs under there. Interestingly, if I connect the sensor direct to the RPI, but also connect the CAT6 after it (with nothing on the end), it doesn't work any more.
Things I've tried:
- Using RPI internal pull-up on 1-wire bus, or using external 4.7k resistor between the RPI 5v line and the data line
- Putting a schottky diode between the ground and the signal line next to the sensor (Using a Vishay 1N5817 - should I be using a different diode?)
- Powering the sensor with a 5v line from the RPI GPIO, or letting it use parasite power from the data line
- Putting a 100 ohm resistor in series with the data pin of the sensor (this shouldn't really be necessary with only one sensor - it seems mainly relevant for reducing signal reflections in networks with longer stubs - but I tried it anyway)
I've also measured the resistance and capacitance of the cable, which come to about 6ohms each way for resistance, and 2.8nF of capacitance between the data line and ground. AFAICT the resistance should be fine (these devices draw very little power). I'm not sure if the capacitance is an issue but I would assume not since this is pretty much bang on for CAT6 cable (14pF/foot) and a 60m run is well within what should be possible for a 1 wire bus over CAT6 from everything I've read.
What else can I try? Ideally things that don't require an oscilloscope since I I don't currently have one...
