Orange Pi Zero 2: 1-wire does't work. Temperature sensor DS18B20
Hello,I have a problem with an 1-wire interface. I can not make a temperature sensor (DS18B20) work.
I have an Orange Pi Zero 2 board. I installed the official image os, that is Orangepizero2_3.0.0_debian_bullseye_server_linux5.16.17.
My settings:
/boot/armbianEnv.txt
overlays=w1-gpio
param_w1_pin=PC10
/etc/modules
w1-gpio
w1-therm
lsmod command shows this:
w1_therm28672 0
w1_gpio 16384 0
wire 40960 2 w1_gpio,w1_therm
The temperature sensor (DS18B20) is wired like this:
- ground on ground pin
- data on pin PC10 but I tried different pins with no success
- VCC on 3.3v pin
- a 4.7kohm resistor between the 3.3v and the data wire
Sensors (I have 3 pieces) work with Raspberry Pi so it's not a sensor problem.
Is there any issue with an 1-wire interface on Orange Pi Zero 2 boards? Or should I set it differently?
This post was finally edited by JohnB at 2023-8-23 16:52
Hello, also faced this problem.
my board is OrangePi Zero2 1GB
OS : debian 3.0.6 Bullseye (Orange Pi 3.0.6 Bullseye)
Does not work because there is no device tree file (in the /boot/dtb/allwinner/) you need to create it.
How to:
1. You need to create text file "sun50i-h616-w1-gpio.dts"
/dts-v1/;/ { compatible = "xunlong,orangepi-zero2\0allwinner,sun50i-h616";
fragment@0 { target = <0xffffffff>;
__overlay__ {
w1_pins { pins = "PC9"; function = "gpio_in"; phandle = <0x01>; }; }; };
fragment@1 { target-path = ;
__overlay__ {
onewire@0 { compatible = "w1-gpio"; pinctrl-names = "default"; pinctrl-0 = <0x01>; gpios = <0xffffffff 0x02 0x06 0x00>; status = "okay"; }; }; };
__symbols__ { w1_pins = "/fragment@0/__overlay__/w1_pins"; };
__fixups__ { pio = "/fragment@0:target:0\0/fragment@1/__overlay__/onewire@0:gpios:0"; };
__local_fixups__ {
fragment@1 {
__overlay__ {
onewire@0 { pinctrl-0 = <0x00>; }; }; }; };};
2. After you need to compile it, with command "dtc -O dtb -o sun50i-h616-w1-gpio.dtbo sun50i-h616-w1-gpio.dts"
3. Copy it too /boot/dtb/allwinner/overlay/
4. Reboot All done:)
Nice blog you got here. Id like to read something more about this theme. Thank you for giving this information. Bioma
Great post. I used to be checking continuously this blog and I’m impressed! Extremely helpful info particularly the final section I deal with such info much. I was looking for this certain info for a long time. Thank you and best of luck. david hoffmeister reddit
you provided me the correct information I really bookmark it,for further reading,So thanks for sharing the information. a course in miracles
I wanted to thank you once again for your amazing web-site you have made here. It is full of useful tips for those who are truly interested in this specific subject, specifically this very post. You really are all really sweet as well as thoughtful of others and also reading your blog posts is a superb delight in my opinion. And thats a generous surprise! Ben and I are going to have enjoyment making use of your recommendations in what we must do in a few days. Our list is a mile long so your tips might be put to beneficial use. a course in miracles
I really like what you guys are up too. This sort of clever work and coverage! Keep up the very good works guys I’ve included you guys to my own blogroll. 티비위키
My brother recommended I may like this website. He was once totally right. This put up actually made my day. You can not believe simply how a lot time I had spent for this information! Thanks! david hoffmeister I feel this is among the most important details for me. And i am glad looking at your report. But want to remark on some general things, The web site style is excellent, the articles or blog posts is truly great : D. Very good work, cheers acim daily lesson 1
That may be additionally a fantastic post i truly loved understanding. It isn't really on a daily basis we carry the opportunity to uncover another thing. acim podcast