I’m using UTP cable between the sensor and the Arduino–but the data is more reliable when it’s connected directly without the long cable (a few dozen feet). I’ll try a different cable. But is there a problem with UTP that length ?
I wouldn’t think that 40 ft would be a problem. What do you have for a pull-up and how are you powering the temp sensor ?
You might find this interesting …
I was running a Weather Station with 100+ feet of Cat 5 cable. If you are using parasitic power for the sensor, you definetely need an active pull up, like the DS2480B generates. Check this app note:
I am using a 4700 Ohm pullup. I also bought a second DS18B20 from another source (Sparkfun) and it worked with the 50 foot cable while the first unit worked only with a short 3-foot run. Double-checked. So, I thought the first unit was defective. Now the new unit is erratic.
Thanks for the replies; I will have to re-check all my connections once more.
My past experience is that the one-wire (Dallas/Maxim) DS1820B’s, when used in the power-from-data-line mode, are too unreliable for more than a few ft. of wire. Sensitive to pull-up value vs. cable capacitance, etc. With power + data + ground, they are much more reliable, esp. with several on the daisy-chain.
Thanks–I’m using it in 3-wire fashion (Vcc, data and gnd) and redid a questionable connection–works well now.
Thanks!