Easy Arduino 1-Wire Sensor Network

A few months ago a friend of mine asked me if I could help him build a temperature monitoring solution for his home. After several failed attempts with various wireless temperature sensors/strategies I decided a wired solution was a better way to go. I built a solution based on an Arduino utilizing Maxim’s 1-Wire DS18B20 temperature sensors encased in off the shelf telephone jacks. The 1-Wire devices are low cost, require few extra components and can be networked together over a long distance. The telephone jacks provided a quick and easy well finished solution for cabling and networking the sensors together. The jacks also come with screws and double sided tape for quick and easy mounting. If you are interested in building one yourself read on…

Prototype board: StripBoard preffered, perfboard is a little harder to use

4.7K ohm Resistors

Mini USB cable

Sensor assembly instructions: (click photos to enlarge)

Remove the cover from the phone jack.

Unscrew the red, black and green wires then cut away the plastic posts sticking up – highlighted in the photos by the black marks.

Cut a piece of stripboard so that it is about 1/4 of an inch smaller on the sides and end of the jack. Clip the edges of the stripboard along the end of the jack at a 45 degree angle, this will prevent the board from becoming stuck in the jack when you put the cover back on.

Solder the DS18B20 sensor in place as follows. The flat edge of the package should be facing up when soldering to the board. Be sure to keep the leads through the board very short since the leads will need to be long enough to protrude from the jack once the cover is back on.

Solder the 4.K ohm resistor between the data lead (DQ) and the power lead (Vdd) and solder the wires from the jack to the board as shown. Tinning the wires before soldering will make it easier.

Align the finished board as follows and gently bend the leads of the DS18B20 sensor down into the cavity in the jack base. Ensure that no leads from the sensor are touching.

Snap the cover back on and you have a completed 1-Wire temperature sensor node. Repeat the steps above to build additional nodes.

Controller assembly instructions:

Sorry, but I don’t have photos of the splitter before working on it, so the text will have to guide you here. Cut the existing 3 foot phone cable about 3 inches from the splitter then remove the cover. This might take some hard prying, but eventually the top and bottom will separate and the jack board will be visible inside. The phone wire will be soldered to the jack board and you can attempt to connect it directly to the Arduino, but in my case the wires were so small they snapped off while working with them. Remove the jack board to make it easier to work on. Ignore my already connected Nano in the photo:

Solder the splitter to the Arduino. The easiest way to do this is to ignore all the wire colors and connect a single sensor node with the cover removed to the splitter with an off the shelf phone wire (NOTE: Phone wires can either be straight trough or crossed over, it doesn’t matter which type you use, just that you use all the same type.) Once you have a sensor connected use your multimeter in continuity mode one at a time between the red, black and green wires soldered to the sensor and the wires attached to the jack board, this will allow you to identify and map the wires correctly to the Arduino.

Solder the sensor Vdd wire (red in photos) to the 5V pin on the Arduino

Solder the sensor GND wire (black in photos) to the GND pin on the Arduino

Solder the sensor DQ wire (green in photos) to digital pin 10 on the Arduino

3 comments

Jason

Very neat and elegant solution. I’m working on something similar, however using 433Mhz rf links which are turning out to be a pain in the ass! I may have to have another look at what I’m doing as your system seems so much simpler, tbh, looks a whole lot better!
Have you considered removing the USB and replacing it with an rf trasmitter?

Never thought about doing it that way, but I think it should work, you will need an arduino or other micro-controller on both ends. I did start out on a similar path trying to eavesdrop on wireless weather sensors and I seem to recall you could use a 433mhz sender/receiver as a simple serial modem. I think there might be a library for it. My issue was that I could’nt seem to get more than about 20 feet of range out of the radios, so I abandoned it and went wired.

Maybe I should dust off some of my 433mhz radios and try it out.
Willnue

P.Slater (UK)

Hello,
Looks like an interesting piece of work. This just the sort of thing I am getting into particularly with a view to monitoring temperatures inside and outside the house and other parameters like humidity with a view to controlling extract fans to keep condensation in check and also to pull in warm air from outside when available.
Found the Onewire example in Arduino examples din’t work on Arduino 0022, but the Sheepdogsguide code did which as a novice was encouraging