Hello Jan,
Thanks for the info...
I did wonder about the kernel space verses user space, and not being quite the
same... I always get my passive and parasite mixed up :-)
OK.. so I tried the 1k resistor... and here are the results
root@raspberrypi:/sys/bus/w1/devices/10-000802837cda# more w1_slave
2d 00 4b 46 ff ff 07 10 e6 : crc=e6 YES
2d 00 4b 46 ff ff 07 10 e6 t=22312
root@raspberrypi:/sys/bus/w1/devices/10-000802837cda# owread
/10.DA7C83020800/temperature
127.688root@raspberrypi:/sys/bus/w1/devices/10-000802837cda#
So w1, file more = 22.3
And
Owread 127.688
So it's improved from the 85, well hotter :-)
Any thoughts, why this is so high from owserver, resistor still not quite there?
John
-----Original Message-----
From: Jan Kandziora [mailto:[email protected]]
Sent: 29 April 2016 21:14
To: OWFS (One-wire file system) discussion and help
<[email protected]>
Subject: Re: [Owfs-developers] Raspberry Pi Jessie owfs-3.1.p1 w1-driver = 85c
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers