I am running a system of 3 sensors(turbidity, water level, temperature) with an Arduino Leonardo. I've got the turbidity and water level sensors working fine, but the temperature sensor is giving me problems.
Set Up: I have set up the DS18B20 waterproof sensor using external power. I have set up the circuit as seen in the following tutorial. The power is coming from the Arduino 5V pin. http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html
The Arduino is on the other side of the room from the sensor. I've used wire nuts to connect the sensor wires to 22 gauge wire to reach the Arduino. The gauge of the sensor wire seems to be only 26.
In addition to trying to read from the sensor, I have tried to get the address using this tutorial. http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
Result: When I try to read the address, nothing comes out of the COM port.
When I try to read the temperature, the only things I am able to get from the sensor are -127 and 0 with an occasional nan.
Some google searching seems to say that the -127 is a bad connection. And getting 0 might also suggest the same thing. However, I have two sensors so I tried plugging the wires from the second sensor directly into the Arduino. The result is the same.
At this point I'm at a loss as to what to do next. Can anyone suggest some troubleshooting steps? Does anyone have any idea what the problem could be?
Thanks for any help.