Am 04.09.2016 um 17:21 schrieb Colin Law:
> 
> Could I ask for further clarification on this please?  I have used
> dtoverlay=w1-gpio,gpiopin=4
> and installed the kernel module using
> sudo modprobe w1-gpio
> and the DS18B20 works fine in three wire mode with a 4.7k pullup on DQ
> 
1.5k please. PLEEEEAAAAAASE! (and to 3.3V, not 5V)

Why? Because when you use parasitic power on the DS18B20, a 4.7k pullup
to 3.3V will only deliver 3.3V/4.7k = 0.7mA to the chip. That's not
enough during conversion. You will get power-on-resets (aka 85°C readings).


> Google tells me (Ithink) that if I use
> dtoverlay=w1-gpio-pullup,gpiopin=4,pullup=5
> then I can use parasitic mode with an external strong pullup driven by
> gpio05 in the way described in [1]
>
Yes. You can use that strong pullup. But usually that's not needed, you
can feed up to 4mA to the Onewire by the normal "weak" pullup. That's
what the chips can sink.

There are two drawbacks when you use such a strong "weak" pullup. First,
the power consumption. I think that's negliable. Second, heating up the
sensor from inside by its bus output transistor. That's negliable as
long as you don't measure low temperatures.

In that case, use the host-controlled strong pullup. Or better, power
your sensor.


> However other results appear to suggest that I can use parasitic mode
> without the strong pullup, and I have also seen suggestions that to
> install the module I could use
> modprobe w1-gpio pullup=1
>
You have to do that in addition to the dtb configuration. The dtb only
connects symbolic hardware names like "w1-gpio-pullup,gpiopin" and
"w1-gpio-pullup,pullup" to existing pin numbers.

The driver use the symbolic name and the device tree core gives it back
the real pin number, as configured by the admin.


Kind regards

        Jan

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to