I have a breadboard prototype working with a cabled (waterproof and regular temp) DS18B20 sensor and a AM2302 sensor on a 3B+. All is well with it recording at a set interval from each sensor. I'd like to run this from a Zero W and thought that would be straightforward. I moved the breadboard to the Zero and booted it with the same SD card that I used with the 3B+. It breaks with no 28-* folder being created in /sys/bus/w1/devices/. I know there are multiple threads here on how to get a Pi to recognize a DS18B20, but I'm successful on the one Pi already. Is there some obvious reason why a Zero is different when running the same OS install? I have 4.7K pullup resistor on the DS18B20. I've tried a 2.2K and a 10K with no effect.

If I swap the breadboard/OS back to the 3B+, it works.

I also set up a new card running Stretch (as the other one is). I added the dtoverlay line to /boot/config.txt and executed the 2 modprobe commands (as my script does in the first test):

sudo modprobe w1-gpio

sudo modprobe w1-therm

The results are the same. Any suggestions? Thanks.

  • The post below says yours is a common question. DS18B20 not listed in /sys/bus/w1/devices raspberrypi.stackexchange.com/questions/26623/… sudo nano /boot/config.txt add : dtoverlay=w1-gpio this has to do with kernel update, find more info in this link raspberrypi.org/forums/viewtopic.php?f=37&t=98407 – tlfong01 Apr 17 at 6:44
  • You only need the one-wire overlay in config.txt. Don't use modprobe; it will most likely cause problems. – Dirk Apr 17 at 13:10
  • Thanks for your suggestions on this. I have it working now on a zero with both sensors, but the solution was less than confidence-inspiring. As with other people, I redid some of the wiring and wiggled others. Why the same setup would work on a 3B+ with no fiddling (again, I tested it by going back and forth between the 3B and the zero), I have no idea. I now have it wired up permanently to a mini-hat and it's working fine. Note that I ended up leaving modprobe in, because it seemed to be working in this case. – bgollands Apr 23 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.