shimitar Posted December 18, 2019 Posted December 18, 2019 Hi all! First time poster, i apologize in advance for any etiquette violations... I have an OrangePi Zero H2+ board and the DS18B20 sensor (waterproof version). I have soldered the pullup resistor between power and data cables. I have Armbian Stretch 5.83 with 4.19.38-sunxi kernel. I have enabled the w1-gpio overlay and loaded the w1-therm driver. Data is on PD14 (GPIO 10), power is on 5v (tried also on 3.3v) I can see this in my dmesg: [ 10.371825] w1_master_driver w1_bus_master1: w1_search: max_slave_count 64 reached, will continue next search. [ 58.171052] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c [ 58.183072] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered. [ 118.047572] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46 [ 118.055622] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered. [ 165.855415] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca [ 165.859633] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered. [ 237.774053] w1_master_driver w1_bus_master1: Attaching one wire slave 00.200000000000 crc 23 [ 237.790557] w1_master_driver w1_bus_master1: Family 0 for 00.200000000000.23 is not registered. [ 297.625355] w1_master_driver w1_bus_master1: Attaching one wire slave 00.a00000000000 crc af [ 297.631722] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered. [ 333.371600] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65 [ 333.379481] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered. [ 371.005370] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9 [ 371.014569] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered. [ 430.421257] w1_master_driver w1_bus_master1: Attaching one wire slave 00.100000000000 crc 9d [ 430.428462] w1_master_driver w1_bus_master1: Family 0 for 00.100000000000.9d is not registered. [ 467.081328] w1_master_driver w1_bus_master1: Attaching one wire slave 00.900000000000 crc 11 [ 467.095848] w1_master_driver w1_bus_master1: Family 0 for 00.900000000000.11 is not registered. And it just goes on and on. Under /sys/bus/w1/devices i can see the device (which changes over time) but there is no w1_slave file inside to read... Am i doing something wrong or the sensor is faulty? thank you in advance for your support!
Igor Posted December 18, 2019 Posted December 18, 2019 21 minutes ago, shimitar said: First time poster When you ask for tips always provide armbianmonitor -u I (and many others) am using this sensor (on H5 based board) and it works fine. What is the content of /boot/armbianEnv.txt ?
shimitar Posted December 18, 2019 Author Posted December 18, 2019 My /boot/armbianEnv.txt: verbosity=1 logo=disabled console=serial disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost2 usbhost3 w1-gpio rootdev=UUID=a974851a-d7f7-46a1-9c1a-3a66d31e8f7b rootfstype=ext4 param_w1_pin=PD14 param_w1_pin_int_pullup=0 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068: The armbianmonitor -U output is here (board is not connected to internet): http://www.gardiol.org/mon As additional notes, i use DHT22 sensors on other H2+ boards with no issue, this is my first time with the DS18B20
martinayotte Posted December 18, 2019 Posted December 18, 2019 2 hours ago, shimitar said: this is my first time with the DS18B20 We've seen this symptom in the past where CPU frequency was relevant since W1-GPIO is done in software, so check the MIN_SPEED in your /etc/default/cpufrequtils, it should be at least 480000, but you can try higher.
shimitar Posted December 18, 2019 Author Posted December 18, 2019 I had this: _enabled # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=480000 MAX_SPEED=1400000 GOVERNOR=interactive i am now tyring this: # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=1400000 MAX_SPEED=1400000 GOVERNOR=interactive Of course did a /etc/init.d/cpufrequtils restart .... but seems nothing has changed
shimitar Posted December 18, 2019 Author Posted December 18, 2019 Should I use a special pin for the data or any io should do? Specially, the default PD14 is confirmed working?
martinayotte Posted December 18, 2019 Posted December 18, 2019 24 minutes ago, shimitar said: Specially, the default PD14 is confirmed working? 5 hours ago, shimitar said: Data is on PD14 (GPIO 10) This is maybe why it is not working ... Did you check the schematic ? There is no PD14 on OPiZero ! PD14 is the IO1 on OPiPC ... On OPiZero, IO1 is PA7, but you can also use other pins, but you need to adapt /boot/armbianEnv.txt accordingly ...
shimitar Posted December 18, 2019 Author Posted December 18, 2019 Could you please provide a link to an image which explains the names of all the pins on the board for the opi zero h2+? Because I'm confused... Any pin seems to have many different names... And it seems to me that the PD14 should be the bottom-right one (opposite to the 5v pin in the internal row).... But meybe I am looking to the wrong pin out?
martinayotte Posted December 18, 2019 Posted December 18, 2019 6 minutes ago, shimitar said: Could you please provide a link to an image which explains the names of all the pins on the board for the opi zero h2+? http://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Expansion_Port 6 minutes ago, shimitar said: And it seems to me that the PD14 should be the bottom-right one As I said, there is no PD14 on OPiZero ... Look again to schematic : https://linux-sunxi.org/File:Orange-Pi-Zero-Schanetics-v1_11.pdf
shimitar Posted December 18, 2019 Author Posted December 18, 2019 Yes! That was it! I had to change the pin name to PA10... Thank you for the schematics, I will treasure them... Solved!
Recommended Posts