1-Wire Temperature Sensor - DS18B20 - on Omega2
-
Confirmed as working fine on my 2+
-
@Costas-Costas Did you find a solution for your backup problem?
-
Nope, reinstalling now.
-
At a crude level you could probably do something like tar up everything in /overlay to /tmp, and scp that off. The question would be if you could then put it back exactly, or if you would have to do so piece by piece. If changes to the underlying system are small it might go back exactly.
But LEDE/openwrt normally have their own backup capability when doing a sysupgrade.
-
It is still not working for me. I just upgraded to the b151 firmware. I got the directory
/sys/devices/w1_bus_master1
, but I got slave entries like:root@omega:/sys/devices/w1_bus_master1# ls -1d ??-* 00-100000000000 00-900000000000 00-e00000000000
And it keeps changing. But I never see the correct serial number of the device.
-
@Bertalan-Gergaly that suggests you haven't wired up the sensor correctly.
-
My first thought was exactly that. So I redid the wires before posting. Same result.
I did a check just now. The data pin is not connected to the omega, just the ground and the power and I still got the weird devices:
root@omega:/sys/devices/w1_bus_master1# ls -1d ??-* 00-400000000000 00-c00000000000
And I just did a retest without anything connected to the omega and I still got the weird devices:
root@omega:/sys/devices/w1_bus_master1# ls -1d ??-* 00-400000000000 00-800000000000
-
@Bertalan-Gergaly said
I did a check just now. The data pin is not connected to the omega, just the ground and the power and I still got the weird devices:
Is something pulling up the data line as required for 1-wire?
If the line is floating, odd results should not be unexpected.
Try it again with a 4.7 K resistor (or for a temporary experiment, anything from 1K - 10K) between the data line and the 3.3 v rail.
-
OK, I got it working. I had to change the power supply from a phone charger to a 'real' power supply.
-
@Bertalan-Gergaly what you mean by "phone charger to a 'real' power supply"? I have the USB cable connected to my computer, using screen to admin my Omega2, so I am powering my Omega2 via the USB cable out of my PC. What is the good power setup? Thank you.
-
@Vaclav-VESELY Probably my phone charger was giving out less than 5V and that affected my O2+ or the DS18B20. Now I'm using a Meanwell RS-15-5 adjustable power supply (http://www.meanwell.com/webapp/product/search.aspx?prod=RS-15)
-
As @Robert-Wenzel mentioned, b151 fixes the one-wire issue
Here's a new article on using One-Wire with the Omega2: https://docs.onion.io/omega2-docs/communicating-with-1w-devices.html
Happy hacking!
-
@Lazar-Demin perfect. All works correctly now. I appreciate the speed of Onion team and the power of the community.
-
Thanks @Lazar-Demin for the correction.
But it seems not to work on my omega 2+.
I just upgrade my firmware, and try to follow the tutorial you mentioned.
But I can't see my DS18B20... I see only slaves like : "00-800000000000" it seems "fake".First question : the sensor must be plugged into the board before or after omega started ?
And here is my output when I just install the "master" one-wire, without plug any sensor :
# insmod w1-gpio-custom bus0=0,19,0 [ 100.959174] Custom GPIO-based W1 driver version 0.1.1 root@Omega-0000:/# [ 102.882550] w1_master_driver w1_bus_master1: w1_search: max_slave_count 64 reached, will continue next search. [ 150.298561] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered [ 209.629280] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered. root@Omega-0000:/# cat /sys/devices/w1_bus_master1/w1_master_slaves 00-800000000000 00-400000000000 [ 257.010981] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered. root@Omega-0000:/# cat /sys/devices/w1_bus_master1/w1_master_slaves 00-400000000000 00-c00000000000
So there is "ghost" sensors appearing automatically, and If I try to plug my real sensor, I can't see him...
Am I doing something wrong ?
Thanks for your help,
-
@Joris-Mulliez the ghost ID means you didn't wire the sensor correctly.
-
@Costas-Costas Even if I don't plug anything ?
-
Yes the 1-Wire just makes up the ghost ID.
-
@Joris-Mulliez did you add a pull-up resistor to the data line of your sensor?
-
I have the Power Dock. Where is GPIO19? I don't think it is brought out. What other pin could I use for testing the 1-wire DS18B20?
-
@Don-DeGregori This is really strange. For the Expansion Dock (see https://docs.onion.io/omega2-docs/expansion-dock.html) GPIO 19 (and GPIO 18) are shown as exposed next to I2C SCL/GPIO 4 but for the Power Dock (see https://docs.onion.io/omega2-docs/power-dock.html) these two same pins are shown as GND
To Onion devs:
what gives?
I understood that the expansion header on the Expansion Dock and on the Power Dock were supposed to be the same thing for connecting expansion boards. It is more than concerning that the documentation shows that they are different