milesburton / Arduino-Temperature-Control-Library

Arduino Temperature Library
https://www.milesburton.com/w/index.php/Dallas_Temperature_Control_Library
967 stars 487 forks source link

DS18S20 does not work on parasitic power. #225

Closed fdobrovolny closed 1 year ago

fdobrovolny commented 2 years ago

When I run the DS18S20 in normal mode, everything works as expected with the 4k7 Ohm. When I try to run it in parasitic mode, the library does not detect the sensor. But when I manually ask for the power mode of the device via sensors.readPowerSupply(sensorAddress) I get True. When I try to read the temperature manually via sensors.getTempC(sensorAddress), it returns -127. I tried to change the resistor to 5k Ohms and even tried the second constructor with a pullup, but nothing worked.

Any idea what to try next?

RobTillaart commented 2 years ago

Did you try a smaller pull up e.g 1K? That would give a higher current ..

isaul32 commented 2 years ago

Is it possible that the sensor is a counterfeit? At least DS18B20 has many. See https://github.com/cpetrich/counterfeit_DS18B20.

fdobrovolny commented 1 year ago

As @isaul32 I found out it's a counterfeit sensor. Thank you for the help.