I have 4 DS18B20 sensors connected to a Raspberry Pi 4, with a resistor of 10kOhm.

All of the sensors randomly disappears from the w1/devices.

In config.txt the dtoverlay=w1-gpio as well as the gpiopin=4 is present.

The sensors are connected to 3.3V (physical pin 1), and GPIO 4 (physical pin 7), ground is connected to the physical pin 30. It was previously connected to 5V.

Maybe this will also help, if the devices goes missing if I take out the power pin and plug it back it will reappeare. The cables cannot be a problem, because after it appeared for the first time I resoldered everything with new resistor and new cables.

Any ideas why that can happen?

1 Answer 1


Welcome, You have what appears to be an easy fix. Replace the 10K resistor with something in the 3.3K range that should solve the problem. I have seen this many times. It worked better on the 5V because you had more current to drive the capacitance of the cables. Yes cables can be a problem, depends on how long they are and the capacitance they are presenting to the circuit. I believe changing the resistor should solve the problem. Also be cautious placing 5V on a GPIO pin can damage it and your Pi. I think in this case the 10K limited the current to a safe level. Let us know how you do.

  • Hey thank you for the response. I fogot to mention that previously I used a 5kOhm resistor when it as connected 5V (physical pin 2), The cables are just the normal jumper with a length of 10cm. Also this issue was not present untill I used a breadboard but since I had to switch to a terminal block this just randomly appeared. Tomorrow I'll try to solder on a smaller resistor, I'll let you know if it worked.
    – Galterius
    Nov 2, 2022 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.