DS18B20 wire length problem

Hi all

First excuse me for my poor english, I'm french :grin:

I've some trouble with a waterproof DS18B20 sensor.

I use an arduino uno and I did an application to read temperature values (in fact I used tutorials ;))

Anyway, if I plug my DS18B20 very close of my arduino interface, I can read values. But I put my DS18B20 far of my arduino (about 15 meters), I can't read values because I have an error in this function

    if (!ds.search(addr)) { 
      Serial.println("========= 1-WIRE not found =========");
      ds.reset_search();    
      return false;         
    }

I wired my DS18B20 with a ground shield cable

How can I do ? Is it possible to do that ? 15 meters is not so far for arduino power supply ?

Thanks for your replies

See you

KaloOopS

I am using one of these at 20m and more. I've been using alarm cable as the wire and am not using parasitic power (I use all 3 wires). The arduino onboard power is all I use so that is fine. What resistor value are you using on the 1-wire bus, 4.7k? I find that is a good choice.

Hope this helps,
Geoff

You should be able to read a ds18b20 from a distance up to a few hundred meters, although you've got to take care of length (and... weight). Personally I have no problems reading 3 sensors with cat-5 cable at 15, 20 and 25 meters, each connected with a 4 mtr. cat-5 cable and just using parasitic power.

Maybe this Guidelines for Reliable Long Line 1-Wire® Networks could help you further.

Thanks guys for your fast answers

I should have a look on the link and I'll try to use a 4.7k resistance

Cool 20 meters is possible, I was afraid :wink:

Thanks again :smiley:

Bye

I rechecked and the one most distant from my Arduino is at the end of a 30m roll of 6 core cable. It doesn't miss a beat.

Cheers!
Geoff

I am doing the same... very reliably. I also had to eventually use a lower value pullup resistor to achieve that reliability after extending my length beyond 30m. I dropped down to 3.3K.

Hi Guys !

I followed your advices and it works !!

I bought a Cat5 cable, I put 2 resistance of 10k in parallel (//) to have about 5k, I tried with the parasitic power (Vdd et GND together, source : http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing)

It works with a 20 meters cable, not with 100 !

Next attempt : do not use the parasitic power and I'll see

Thanks a lot

Bye

KaloOopS