OPi Zero - 1 Wire DHT11 not detected


Recommended Posts

Armbianmonitor:

Dear Armbian Friends,

 

My temperature sensor is not detected by board.

Can somebody give me some advice what should I chceck / change / test now?

 

Cheers!

Lucas

 

I tried:

- another sample of DHT11

- changed cables to different ones

- changed 

- both tested sensors were connected with 4.7k resistor between positive and data cable

- tried different system versions like bionic,  stretch and now jessie

- tried to load modules via /etc/modules-load.d/modules.conf

g_serial
w1-sunxi
w1-gpio
w1-therm

- or with /boot/armbianEnv.txt (disabling loading with modules.conf)

wverbosity=1
logo=disabled
console=serial
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost2 usbhost3 w1-gpio
param_w1_pin=PA10
param_w1_pin_int_pullup=1
rootdev=UUID=9cecf84e-027e-40ad-b711-ae5d323d9043
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

- tried to change data pin from GPIO10 (number 26) to GPIO 15 MOSI (number 19)

 

Below some info about my system.

sysadm@orangepizero:~$ ls /sys/bus/w1/devices/
w1_bus_master1
sysadm@orangepizero:~$ cat /sys/devices/w1_bus_master1/w1_master_slave_count
0
sysadm@orangepizero:~$ dmesg | grep wire
[    7.802453] Driver for 1-wire Dallas network protocol.
[    7.807173] gpio-10 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
sysadm@orangepizero:~$ sudo cat /sys/kernel/debug/gpio
[sudo] password for sysadm:
gpiochip0: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:
 gpio-10  (                    |onewire@0           ) in  lo
 gpio-17  (                    |orangepi:red:status ) out lo
 gpio-20  (                    |vcc-wifi            ) out hi
 gpio-166 (                    |cd                  ) in  lo
 gpio-204 (                    |usb0_id_det         ) in  hi IRQ

gpiochip1: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl:
 gpio-358 (                    |vdd-cpux            ) out hi
 gpio-359 (                    |reset               ) out hi
 gpio-362 (                    |orangepi:green:pwr  ) out hi
sysadm@orangepizero:~$ uname -a
Linux orangepizero 4.19.17-sunxi #5.73 SMP Mon Jan 28 21:06:40 CET 2019 armv7l GNU/Linux
sysadm@orangepizero:~$ cat /etc/issue
Debian GNU/Linux 9

 

85Exb4N.jpg

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

9 hours ago, lukaszertel said:

 tried different system versions like bionic,  stretch and now jessie

 

Only usable change is to change a kernel. You can do this in armbian-config -> system -> alternative kernel. Try 4.14.y and 4.20.y too see if that helps. Changing systems is pointless - they all share the same kernel.

Link to post
Share on other sites
3 hours ago, lukaszertel said:

Hope it will do the job.

I've took the time to try it on one of my OPiZeros, and it works !

But I didn't took chance : like mentioned in your link, and read in some other thread read in the past, I've set /etc/default/cpufrequtils with MIN_SPEED=480000 instead of MIN_SPEED=240000 .

Maybe this is also required for your DHT11 ...

Link to post
Share on other sites

Thank you for taking your time on tests :)

My cpufreg now looks like

root@orangepizero:~# more /etc/default/cpufrequtils
# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
ENABLE=true
MIN_SPEED=480000
#MIN_SPEED=240000
MAX_SPEED=1200000
#GOVERNOR=ondemand
GOVERNOR=interactive

But nothing is discovered.

I hope that new sensor will come soon!

Stay tuned ;-)

Link to post
Share on other sites

I'm back :-)

Well, it's working! Almost..

When I checking temperature not evey response is proper,  some anwers are with "crc=c9 NO".

I have checked wiring and connections on board few times, changed resistor and cables.

Do you have any idea?

root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
00 00 00 00 00 00 00 00 00 t=-62
root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
57 01 55 05 7f 7e 81 66 9d : crc=9d YES
57 01 55 05 7f 7e 81 66 9d t=21437
root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
54 01 55 05 7f 7e 81 66 58 : crc=58 YES
54 01 55 05 7f 7e 81 66 58 t=21250
root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
54 01 55 05 7f 7e 81 66 58 t=-62
root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
54 01 55 05 7f 7e 81 66 58 t=-62
root@orangepizero:~# cat /sys/bus/w1/devices/28-020b92459bc7/w1_slave
53 01 55 05 7f 7e 81 66 88 : crc=88 YES
53 01 55 05 7f 7e 81 66 88 t=21187

============================

EDIT:

Okay, I got it

echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Default was 120000

root@orangepizero:~# more /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
120000


 

 

I found answer in this topic:

 

 

Link to post
Share on other sites
Guest
This topic is now closed to further replies.