Hi everyone,
What I want to do is to use a DS18B20 through 1-Wire to read temperature on an OPi Zero.
The sensor seems to be detected by the board (I see the file under /sys/bus/w1/devices/28-something), and then it disappears randomly after a reboot or a power cycle. (file goes away and obviously I can't get any readings). Then it starts working randomly again after an indefinite amount of reboots.
I'm having this problem for a while now, and it's driving me absolutely crazy.
This one here on the picture is the sensor I'm using.
I have attached a 4.7K Ohm resistor between the VCC and Digital cables, and attached to OPi Zero as follows:
VCC -> BCM pin 2 (5V, I've also tried with 3.3V)
Digital -> BCM pin 26 (PA10)
Ground -> BCM pin 25
After that, I've edited my /boot/armbianEnv.txt and it looks like this now:
verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost2 usbhost3 i2c0 i2c1 w1-gpio
param_w1_pin=PA10
param_w1_pin_int_pullup=0
rootdev=UUID=374d182b-7b9e-4570-b7c5-519a1eb837a7
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u0x2537:0x1066:u,0x2537:0x1068:u0x2537:0x1066:u,0x2537:0x1068:u
Also adapted the /etc/default/cpufrequtils file as follows:
# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
ENABLE=true
MIN_SPEED=480000
MAX_SPEED=1200000
GOVERNOR=interactive
And the /etc/modules-load.d/modules.conf:
g_serial
i2c-dev
w1-gpio
w1-therm
So, after all these modifications, I do a reboot and I can see the w1_gpio and w1_therm modules loaded in the output from lsmod, and I can see the device in /sys/bus/w1/devices/28-something
I can get my readings and everything works properly. Then, I do a reboot. Here is where I get super confused, because it seems like there's no systematic error in the wiring or the kernel modules being loaded as far as I can see. But, the device disappears after the reboot. Sometimes it will get detected again, without me doing any changes in the configuration. I've already tried two of the same sensor, but it doesn't seem to make any difference, same problem still.
I've also put the armbianmonitor output to the post. Looking desparately for some ideas to help me debug this problem. Thanks!