Am 29.04.2016 um 18:36 schrieb John Bass:
> 
> Well I have found why it’s happening. I conclude owfs is not handling
> passive devices correctly.
>
Dallas/Maxim calls them "parasite-powered", to use right terms.


> 
> 
> So.. NOT in passive mode, i.e. all three legs of the temperature
> sensor connected, and a 4.7k pull up on the data line, Both
> /sys/bus/w1/DEVICE/temperature returns correct temperature. The same
> is true for owserver, when owread is run the correct temperature is
> returned.
> 
Nice.


> 
> Now… I rewire the temperature sensor to two wires, GND pin and VDD
> pin shorted to GND and the data pin with a 4.7k pullup to +3.3V.
> 
Reduce the pullup to 1k at 3.3V please. Having a pullup of 4.7k at 3.3V
means your devices can draw at most 3.3V/4.7k == 0.7mA.

The chip needs about 1mA during conversion.

Having the pullup value also enhances bus performance, as it allows a
bigger capacitive load (long, bad cables). So, always choose the pullup
as small as possible. 1k at 3.3V; 1.5k at 5V.


> 
> So Passive mode,  /sys/bus/w1/DEVICE/temperature returns correct
> temperature, however owserver with owread return 85c, thus I would
> surmise that owserver is not handing passive devices correctly.
>
When you read from the sysfs node, the w1 temp class driver activates
the strong pullup, overriding your "too weak" pullup. This is done
automagically within microseconds. However, that function isn't exposed
in the w1 kernel<->userspace interface.

Instead, usespace programs like owserver have to use another transaction
for activating the strong pullup. Depending on process scheduling, this
may be delayed a few milliseconds, and in the meantime, your DS18B20
runs low on power and power-cycles, which gives you the 85°C reading.


So, the solution is to choose a "weak pullup" of 1k instead of 4.7k.
That way the DS18B20 never runs out of power.

Kind regards

        Jan

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to