I'm having 176 sensors, all connected in parallel to the one and only 1-wire pin GPIO4 of Raspberry Pi 3. It is arranged in a star topology with four branches, each with 44 sensors. The readout is done in about 16 seconds, as I mentioned. The only thing which appears to be different to all tutorials I found online: I using a very low pullup-resistor. Using the 4.7kOhm or even 1kOhm as suggested by almost everybody out there will not work for networks like this big. I changed the resistor to be 270 Ohm. Maybe somebody can explain if this is either critical or briliant
So far I can tell the system is running stable for 4 weeks collecting data without any error.
Now the new setup using the DS2482-800
I managed to set the default time caching of the OWFS to 0 by passing --timeout_volatile=0 when starting the owfs, like so:
Code: Select all
sudo /opt/owfs/bin/owfs --i2c=/dev/i2c-1 --allow_other /mnt/1wire/ --timeout_volatile=0
or adding it to the /etc/owfs.config like:
Doing this makes sure, that all temperature values are new
and not just some old cached values. (You can test this by having a while loop reading just one sensor each second. Take the sensor between your fingers and you will see the rising temperature every second.)
Since I did not manage to get the [url:http://owfs.sourceforge.net/owpython.html
]owfs python binding[/url] running I decided to use pyownet
. Once your owfsserver is running pyownet works very well. Using a modified version the provided python example from github called 'scan.py' it is possible to time the readout. Like described in the datasheet of the DS18B20 sensors
it takes 750ms to readout the temperature of one sensor (in the highest resolution, which I need for my project). So I maned to readout 4 sensors in about 3 seconds, having them all connected to just one bus of the DS2482. Sadly my plan of decreasing the time consumption by using multiple buses did not work out. Connecting the 4 sensors to two buses (2 each) I still have the same readout time of about 3 seconds. This leads to the assumption that the DS2482 is not capable of reading multiple buses simultaneously, even though owfs server documentary
tells "owserver (1) is by default multithreaded".
This issue leads to the first question:
How is it possible to readout the buses in parallel?
I know there is something like "reading out simultaneously" by writing a "1" to the "simultaneous/temperature" register, like described here, but I did not managed to get this working. How exactly do I write a "1" to the mentioned register?
An additional question
is about the maximum number of sensors connected:
So far the DS2482-800 is not capable of reading out 44 sensors on one single bus. As described in the datasheet
it comes with an active pullup resistor and does not tell anything about limitations in the matter of maximum number of connected sensors. Any suggestions about this problem?
Thanks for reading and taking the time
All help is appreciated!