Jump to content


Photo

Using W1-Wire on more than one GPIO


  • Please log in to reply
5 replies to this topic

#1 nedoskiv

nedoskiv

    Member

  • Senior Members
  • PipPip
  • 16 posts

Posted 17 February 2017 - 06:35 PM

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?



#2 Thomas Pfeiffer

Thomas Pfeiffer

    Newbie

  • Senior Members
  • Pip
  • 7 posts

Posted 17 February 2017 - 07:04 PM

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.maximint...ndex.mvp/id/148



#3 nedoskiv

nedoskiv

    Member

  • Senior Members
  • PipPip
  • 16 posts

Posted 18 February 2017 - 05:29 AM

It is very usefull, but still do not fix my problem, I need to initialize another W1 bus



#4 jkajolin

jkajolin

    Advanced Member

  • Senior Members
  • PipPipPip
  • 42 posts

Posted 18 February 2017 - 08:26 AM

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)



#5 Thomas Pfeiffer

Thomas Pfeiffer

    Newbie

  • Senior Members
  • Pip
  • 7 posts

Posted 18 February 2017 - 09:51 AM

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.



#6 martinayotte

martinayotte

    Advanced Member

  • Senior Members
  • PipPipPip
  • 442 posts

Posted 18 February 2017 - 02:49 PM

Check every sensors individually, because one could be defective and shorting the bus.

Choosing the right wiring topology could help also...