Skip to content

1wire Sensors

ianmacs edited this page Nov 6, 2019 · 1 revision

Using Ethernet Cable

RJ45 Ethernet sockets are available in every room of the house. Cables run in the walls to a central patch panel. A single MCU installed near the central patch panel is enough to read temperature sensors all over the house without running new cables.

Ethernet Cable Basics

Ethernet cables connect same pins to same pins. A patch cable with two RJ45 plugs connects pin1↔pin1, pin2↔pin2, ..., pin8↔pin8. Installed Ethernet cable connecting a patch panel RJ45 socket with an RJ45 wall socket also connects pin1↔pin1, pin2↔pin2, ..., pin8↔pin8. It is therefore not important to recall the exact pin numbering scheme when misusing an Ethernet installation for other purposes like 1wire, it is only important to use the same pins on both ends. For ease of use, the same RJ45 pins should be used for all sensors in the house. As a precaution, connection of standard networking devices to 1wire sensors or MCUs should be avoided by labelling cables and sockets.

Cross-link Ethernet cables have to be avoided for 1wire usage because they connect different pins on both ends.

I use the following pins:

  • pin6: VCC
  • pin5: Data
  • pin4: GND

Temperature Sensor Directly in RJ45 Plug

If the RJ45 wall socket in a room is installed at a suitable height and location for measuring the room's air temperature, then a Dallas 18x20 sensor can be installed directly in a new RJ45 plug. I use Hirose RJ45 plugs for this purpose, cover the legs of the sensor with insulation stripped from telephone wires and insert the sensor directly into the plug. The end of the plug needs to be widened with a 5mm drill, approximately 3mm deep, to be able to insert the temperature sensor deep enough into the plug to connect to the pins during crimping. The plug's strain releaf closes around thin air during crimping. I let it attached to the plug and use it as a handle when removing a temperature sensor plug from a RJ45 socket.

Temperature Sensor in Wall Box

If no RJ45 wall socket is installed in a suitable height and location for measuring room air temperature directly, a wall box like this RJ45 wall box can be installed at a suitable location and attached to the Ethernet installation with a patch cable.