nedoskiv Posted February 17, 2017 Posted February 17, 2017 Hello, I decided to monitor some temperature stuff at home and used few ds18b20 w1 sensors and they work, but due to some cable limitation and number of the sensors at same point they failed. I decided to test with 10 meters CAT5 FTP cable, changed pull up resistor to 4KO and 3 ds18b20 work at 10m cable on 3.3V, If I add one more they all fail. I switched volatage to 5V and all good, but I wondering is it possible to initialize w1 bus on another GPIO? After I google that and so some reading, people achieve that on raspberry but they patched the kernel somehow. Any idea how can that be done on armbian?
Thomas Pfeiffer Posted February 17, 2017 Posted February 17, 2017 I use a DS18B20 with about 30 m twisted pair cable. As far as i remember, my pullup resistor is about 1K. Maybe you could give it a try and check if a 1K resistor is working? You can find more information here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/148
nedoskiv Posted February 18, 2017 Author Posted February 18, 2017 It is very usefull, but still do not fix my problem, I need to initialize another W1 bus
jkajolin Posted February 18, 2017 Posted February 18, 2017 from my understanding you can't. unlike in arduino which can run 1wire on any free pin the linux soc's use kernel driver which is tied to a single master. the raspberry version is hack to the kernel driver creating a new 'duplicated' master port.. (haven't personally used it but read the guides)
Thomas Pfeiffer Posted February 18, 2017 Posted February 18, 2017 It is very usefull, but still do not fix my problem, I need to initialize another W1 bus According to the website linked above, 1-wire should work up to 500 m. If your circuit fails at 10 m, there's something wrong with your wiring, resistors, devices, ... - so i'd aim to fix the root cause rather than trying to initialize a second 1-wire bus. My suggestion is to do some experiments with different pull-up resistors.
martinayotte Posted February 18, 2017 Posted February 18, 2017 Check every sensors individually, because one could be defective and shorting the bus. Choosing the right wiring topology could help also...
nedoskiv Posted February 21, 2017 Author Posted February 21, 2017 Main problem is that one sensor uses 10m cable, other uses 50 and they cannot work with same pull up resistor, that is why I need to use second w1 bus Feb 21 21:23:05 localhost kernel: [13093.443868] w1_slave_driver 28-0315826d0aff: 18S20 doesn't respond to CONVERT_TEMP.Feb 21 21:23:06 localhost Temperature-Trigger2: Executing command off for relay 1Feb 21 21:23:13 localhost kernel: [13101.284256] w1_slave_driver 28-0315826d0aff: 18S20 doesn't respond to CONVERT_TEMP. there may be a way, but i do not have big knowledge of electronics. So far it works with all sensors, with same cable length. and still above error show in log.
Recommended Posts