I have an issue with Dallas 18b20: randomly I loose connection (serial number of sensors disappear). I have two sensors that have been connected to Raspberry, with 4k7 resistor. I didn’t have problems till two month ago. Now I loose the sensors, most of times at same hour (19:00 but nothing happens that could be a cause). I tried: change both the Dallas with Maxim original, change power supply to Raspberry with 3A, verify cable (cat 5e) that has no shorts, change connectors and resistor. When I get the connection lost I check with multimeter that I have roughly 1.1 volt between GND and Vin (GPIO 7), instead of 3.3 v; and 2.2 volt between Vin and Vcc (3.3 volt) instead of 0 volt. The cable for Dallas is roughly 5m. Now I’m trying with last chance and I changed the Raspberry and the resistor replacing 4k7 with 1k5. I don’t know what will happen next hours but I would ask if someone could tell me what could be the problem? Thanks
It sounds like something has failed and or was on the edge. If your voltage measurements were made with the system running they are invalid as it is an approximate square wave on the pin. Rob Tillaart wrote a scanner for the Arduino, I do not know of one for the Pi. If you can find one it will help a lot. Without a schematic I will take a guess and say the 4.7K which you ran from the GPIO to +3V3 is to large, try something in the 1.2K range (1.5K should work). Connect only one sensor with a piece of wire no longer then 1 meter (~yard) and try it, then do it again with the second sensor. If both work try two. If one does not replace it with a known good unit. If neither work get another known good sensor. If this does not get you there which I think it will post your schematic, not a frizzy picture and the code. Before you do all of that try switching the port high for a few seconds then low for a few seconds with only your volt meter and see what your meters tells you. If you are more than about 0.5 volt from the either rail depending if high or low you possibly fried the Pi.