What response time can one expect on a 1-wire network that consist of around 20 different sensor - miliseconds, seconds?
Are trying to find out if one can use magnetic sensor on the doors connected to 1-wire to turn the on light
Thanks
Refresh/update time on 1-wire network
-
- Starting Member
- Posts: 2
- Joined: Wed Dec 02, 2015 10:53 pm
Re: Refresh/update time on 1-wire network
Hi,
I in a hurry test read Scratchpad one DS18B20 1-wire sensor 20 times.
Here is code:
SerialMonitor show:
13:02:24.882 -> ----------------------------
13:02:24.882 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.882 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.984 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.984 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.052 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.052 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.086 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.086 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.119 -> ----------------------------
So for reading 20 sensors you need approximately 200-250 ms.
Regards
KMtronic
I in a hurry test read Scratchpad one DS18B20 1-wire sensor 20 times.
Here is code:
Code: Select all
for ( int a = 0; a < 19; a++) {
present = ds.reset();
ds.select(addr);
ds.write(0xBE); // Read Scratchpad
for ( i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();
Serial.print(data[i], HEX);
Serial.print(" ");
}
Serial.println();
}
Serial.println("----------------------------");
13:02:24.882 -> ----------------------------
13:02:24.882 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.882 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.916 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.950 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.984 -> 50 5 4B 46 7F FF C 10 1C
13:02:24.984 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.018 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.052 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.052 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.086 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.086 -> 50 5 4B 46 7F FF C 10 1C
13:02:25.119 -> ----------------------------
So for reading 20 sensors you need approximately 200-250 ms.
Regards
KMtronic