Refresh/update time on 1-wire network

Forum about 1-Wire devices.

Refresh/update time on 1-wire network

Postby the__creature » Sun Jan 03, 2016 6:16 pm

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
the__creature
Starting Member
Starting Member
 
Posts: 2
Joined: December 2015

Re: Refresh/update time on 1-wire network

Postby KMTronic » Tue Dec 15, 2020 1:27 pm

Hi,

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("----------------------------");


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
KMTronic
Starting Member
Starting Member
 
Posts: 1
Joined: December 2020


Return to 1-Wire Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron