On 4 September 2016 at 17:39, Jan Kandziora <j...@gmx.de> wrote:
> 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).

I have it to 3.3V ok. So 4.7k is ok for 3 wire mode but for parasitic
it should be 1.5k

>
>
>> 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.

To summarize then, for parasitic mode I should not need an external
strong pullup and should be able to use just a 1.5k pullup and to
specify
dtoverlay=w1-gpio,gpiopin=4
and
sudo modprobe w1-gpio pullup=1

With in addition the 3.3 to 5V level shifter as in your first post if
any devices on the bus need 5V

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

My rudimentary knowledge of thermodynamics tells me that if one
provides a certain amount of power from inside as you suggest and that
heats the device by (for example) 0.1 degrees when the device is in
ambient 0C, then if the device were in ambient 50C then the heating
would still be the same (0.1 degrees).  Is that wrong?

Thanks again for the help

Colin
>
>
> Kind regards
>
>         Jan
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

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

Reply via email to