Second 1-wire

Hello,

I use 1-wire on Pin P8.11

Now I want to use a second 1-wire on Pin P8.12

I made the first 1-wire with this instructions:
http://www.bonebrews.com/temperature-monitoring-with-the-ds18b20-on-a-beaglebone-black/

I wrote a new file called w2.dts
changed the exclusive pin to “P8.12” and Pin offset to “0x30” and the names to “w2”

I can compile and load the overlay … but nothing is found on this Pin.

The existing 1-wire Pin is working, but the new Pin seems are not working.

Should I have a new folder called w2?

`

/dts-v1/;
/plugin/;

/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “BB-W2”;
version = “00A0”;

exclusive-use = “P8.12”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
bb_w2_pins: pinmux_bb_w2_pins {
pinctrl-single,pins = <0x30 0x37 /* gpmc_ad13.gpio1_12, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w2-$
};
};
};

fragment@1 {
target = <&ocp>;
overlay {
onewire@0 {
status = “okay”;
compatible = “w1-gpio”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_w2_pins>;

gpios = <&gpio2 12 0>;
};
};
};
};

`

How can I setup a second 1-Wire bus?

Thank you!

Why do you think you’ll need a second bus?

Hello!

Because of 2 points:
a) wire length
b) different poll times

I want to poll temperature as fast as possible (now around 800ms) … when I use many temperatur sensors, it takes long to poll all sensors. So I want to use a second bus to increase polling speed.

1.) The cable radius is the same, regardless if you use one or two pins for the W1 bus. So it only makes a difference regarding the cable weight, wich isn’t as critical as the radius.

2.) To speed up the conversation time trigger all sensors by a broadcast message. After a delay of 750 ms you can read the value from each sensor which takes 11 ms per sensor. This means 22 sensors in a second (= 750 + 22 * 11, and each further sensor takes 11 ms). You can reduce the delay by sampling at lower resolution (11 … 9 bit). Check out the TRM. But (again), this feature isn’t supported by the kernel driver.

BR

Hello!

  1. Oh, so W1 control both Pins? I thought that each PIN is handle by his own … sure, then a second bus did not help!
  2. Not sure if I unterstand you. When this feature is not supported by Kernel driver, I can used, right?

Thank you!

sorry, mean:
2. can´t used, right?

You can use the broadcast triggering, but you need an other driver (or you have to adapt the existing). Ie. you can use owfs, which needs additional hardware. This hardware also supports long cable networks.

In my case I want to avoid extra hardware (for maintenance reasons). So I made a custom driver using the PRU.

BR