Reading Dallas DS18B20s from the Jeenode

I want to monitor my solar thermal system with the Jeenode. I have a solar controller, but I want to see another view of the data as well as see how it correlates to data that I collect.

First up, I need to connect a bunch of DS18B20s. I found a source online for them embedded into a stainless steel tip and waterproofed. They have a 1m cable.

The look like this:

The basic connections are:

  • VDD 3.3V
  • GND
  • DQ

You also need a 4.7k resistor between DQ and VDD

I put together two little boards, one with 5 sensors and one with 3.

The cable pinout is:

 

Jeenode Code

I prefer to hard-code the ROM addresses for each sensor into the code so that I which sensor goes with which reading. It is an annoying part of the OneWire protocol that you cannot easily find out which sensor is first on the bus.