I'm using a DS18B20 with the one-wire library on an Arudino Uno to measure temperature. Works great.

I used a pull-up resistor between data and +5v as advised, however, while I understand the need for a pull-up (or down) resistor when dealing with inputs that a chip is monitoring, I don't really know why, when the chip is providing a data 'output' in this case, I need the pull-up.

Can anyone advise? It's working fine but I'd like to know more about the need for it.

By the way, I'm using the DS18B20 to measure water temperature and after MUCH searching and reading-up on how to waterproof an LM35 device for temperature sensing, I found a waterproof ready-potted DS18B20 in a stainless steel casing for about £3.50 on eBay. I don't think I could buy the LM35 and assorted waterproofing parts for that amount, let alone pre-assembled - so for anyone considering waterproofing an LM35 - it's worth trying this route.

Input pins are high impedance and essentially open circuit as far as loading goes. Without some load at the end of the line all of your interconnecting wire will act as an antenna and that "hum" will be added to the dc voltage you want to read giving you very inaccurate readings. ?In the industiral setting we don't read many analog sensors as voltages but as closed loop currents using the 4-20 format where the monitoring point converts it to a voltage and corrects for the 4mA representing a 0 reading.

Some devices create an output signal simply pulling the output line down to ground, then "let go" and allow them to float. The pullup brings the output back up to Vcc.

In addition, some of the Dallas One-Wire devices (some 1820 variants among them) can operate on parasitic power - you don't have to run power to the device, it simply steals enough power from the output to operate.

I'd read about parasitic power but haven't tested it yet. Once complete, the sensor will be at the end of a good few metres of cable so whether I use that, or use 3 cores, depends on whether parasitic power is more or less useful over longer runs.

I have good luck with parasitic power, so try it first. I have runs of about 10-20 meters with no issues at all. Worst case, you might need to have a stronger pullup (2.2K ohms) before having to resort to adding the extra power source. When using parasitic power on the DS18x20 connect the Vcc pin to GND pin. (meaning: Connect pin 1 to pin 3 on the DS18x20)

The only problem with paristic power is that it takes a little longer to make the reading conversion and that no other transmission can happen at the same time on the one wire busSo having multiple devices means it will take some time to collect all the reading, which normally is no big deal, just wanted to let you know about that