Realistic Limitations on 1-Wire and a Atmel 328P?

Hi,

I wonder what the practical limits are re: 1-Wire and the Atmel 328P processor. As I understand it, multiple instances of 1-Wire can be invoked, i.e. more than 1 pin can host 1-wire sensors at once. Since every string of 1-wire sensors can have up to 127 sensors, even a few pins being dedicated to 1-wire would lead to hundreds of sensors that would have to be read.

Due to the 2kB limit on SRAM on the 328P, I'd expect fully loaded 'strings' of daisy-chained one-wire sensors to be potentially problematic. Does anyone have experience with large numbers of DS18B20 sensors sharing a bus on a Arduino? Did you ever run out of SRAM or how did you resolve any conflicts you may have had?

FWIW, I'm considering building a board with twelve 1-wire buses and wonder whether I should base it on a 328P or a 1284P. As conceived, I'm only planning on having one sensor per bus to make discovery as simple as possible (i.e. only one device to discover). Ideally, data would be processed into temperatures, humidity, etc. before being shipped out over a serial link. Ideally, all data would be shipped in one shot, i.e. using Easytransfer.

Due to the 2kB limit on SRAM on the 328P, I'd expect fully loaded 'strings' of daisy-chained one-wire sensors to be potentially problematic.

I don't see what difference RAM makes. You read them one at a time.

Hi Nick and thanks for the response - you are correct, one could read individually and then send each entry. However, I was hoping to bundle multiple device readings into one transmission. On top of that, I wonder how much RAM each instantiation of the One-Wire library will absorb (sort of fixed overhead, if you will).

Why wonder, when you can find out?

#include <OneWire.h>

OneWire  ds(10);  // on pin 10

void setup(void) {
  Serial.begin(115200);
  Serial.println (sizeof ds);
}

void loop () {}

Output:

14

Thank you, sir.

Didn't know of the sizeof function!