1-wire is a electronic bus protocol invented by Dallas Semiconductor (now owned by Maxim). One of the most popular uses of 1-wire is for temperature sensors. The DS18B20 temperature sensor is most commonly available in a TO-92 package that makes it look like a transistor.

To make this project, you will need:


  • Soldering Iron
  • Solder
  • Wire cutters


Step 1: Solder the RJ45 Socket to the PCB

The first step is to solder the RJ45 socket to the PCB. This isn't too difficult, thanks to the socket being quite chunky and sitting flat on a table.

Place the PCB on top of the socket and then solder the opposite corners to hold it in place. Finally solder all the other pins. Check that there are no short circuits between any of the pins.

Step 2: Solder the Sensor to the PCB

Next insert the 1-wire temperature sensor into the PCB, with the markings facing outwards, away from the RJ45 socket.

1-wire Pin 1 → GND → RJ45 Socket Pin 5
1-wire Pin 2 → DATA → RJ45 Socket Pin 4
1-wire Pin 3 → 5v → RJ45 Socket Pin 2

Pins 1 and 2 of the DS18B20 1-wire sensor are right next to each other in the middle. Pin 3 has to be bent slightly to reach over slightly. I made the legs of the DS18B20 long enough that the top of the package is level with the top of the RJ45 socket.

Solder the three legs and then trim them off close to the PCB.

Step 3: Connecting It Up

The Maxim USB to 1-wire adaptor (DS9490R) has a RJ11 socket on it (6 positions, 6 pins).

You can either connect it up using a proper RJ11 to RJ45 cable or a RJ11 cable will actually fit in a RJ45 socket - albeit slightly wobbly. The advantage of using an RJ45 socket is that you can than connect it to a remote location using standard RJ45 / Cat5 wiring.

As simple as that, you are done!

The software is out of scope of this tutorial, but I personally use OWFS on Linux.

<p>I count 3 wires.</p>
Heh, yes. It is possible to provide data and 5v power over the same pin, but I prefer to use seperate pins. And for some reason Gnd isn't counted, when counting the number of wires on a bus.<br><br>* I2C is sometimes referred to a 2-wire (Data, Clock and Ground)<br>* SPI is sometimes referred to a 3-wire (Send, Receive, Clock and Ground)<br>
<p>Nice adapter. This looks like a good way to connect sensors.</p>
<p>Thanks! Let me know if there is anything I can do to add or improve the clarity of this Instructable.</p>

About This Instructable




More by nhumfrey:1-wire temperature sensor RJ45 adaptor 
Add instructable to: