So I have bought 8 temperature sensors (DS18B20), and successfully used them with my Raspberry Pi. These sensors each have three pins, one for voltage, another for data and the last for ground.

For my current project, I would like to be able to easily change these sensors, should they fail down line, and my first thought was using RJ11 (phone cable) to accomplish this. Since each sensor only uses three wires, and RJ11 supports 6, I assume this will work, if I put the wires into 3 different pins in the plug, and then the corresponding GPIO pins going to the socket. However I'm not certain, and I'm also not sure that this is the best way to accomplish the task at hand.

I would like to know if anyone has experience with trying this with the Pi, especially if someone has a super smart solution.

1 Answer 1


The connection method you suggest is not uncommon. I have a digital read out (DRO) kit on a hobby milling machine and all three sensors are connected via RJ-11 and work quite well.

The connectors are slightly fragile and might not handle frequent engagement and disengagement, but are easily clipped off and re-created with a standard telephone crimping tool.

RJ-11 crimping tool enter image description here

You can purchase RJ-11 jacks with leads to engage terminal screws or can be clipped off and soldered or otherwise joined to the board.

RJ-11 jack with wired

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.