The sensor behind the coop's ZigBee Sensor Network
grid deployments - Grid 45 (three
columns, A/B/C) and BUILDlab's historical
Temperature6 (six sensors in a
vertical line) - and the sensor the newer DS18B20GridNode example (part of
ESP32 Sensor Node) is built around: an asymmetric up-to-3
column, up-to-7-probe-per-column grid read over a DS2482-800 1-Wire bridge.
It's the 1-Wire protocol and the DS18B20 family itself that make this kind of grid practical -
many sensors, one bus, each addressed by its own factory-burned ROM ID.
The goal was to collect several temperature readings spatially separated across the same room or building. A simple analog sensor like the TMP36 could have done the job - it's a low-cost way to get a temperature straight off one analog pin:
//float voltage = analogRead(temperaturePin) * 5.0 / 1023.0; // 5.0V float voltage = analogRead(temperaturePin) * 3.3 / 1023.0; // 3.3V float temperatureC = voltage * 100 - 50; float temperatureF = voltage * 180 - 58;
At 5.0V and a 10-bit ADC the resolution is 0.49°C (0.88°F) and at 3.3V the resolution is 0.32°C (0.58°F).
But spreading several of these around a room or building runs into two problems. First, a TMP36 outputs a raw analog voltage - carry that over any real distance and the wire's own resistance starts skewing the reading before it even reaches the microcontroller. Second, each sensor needs its own ADC channel (a dedicated analog pin), so the sensor count is capped by how many analog pins the microcontroller has to spare.
The 1-Wire protocol sidesteps both problems: it's a real bus, so many sensors share the same two or three wires instead of one pin each, and the ADC is built into the sensor itself - the DS18B20 already returns a digital temperature reading, so there's no analog signal left to degrade over distance in the first place.
1-Wire devices share a single data line (plus ground, and optionally power - most devices can also run "parasitically" off the data line itself). Each device has a unique 64-bit ROM ID burned in at the factory, which is what lets many devices share that one bus and still be addressed individually.
The bus should be wired more or less linearly, not as a star, and the total length has limits. In theory the 64-bit ROM ID space allows for unlimited devices on a bus, but in practice bus loading and timing make somewhere around 20 devices a more realistic ceiling. Devices can be found with a search/scan, but the algorithm walks the ROM ID space as a binary tree, so devices show up in an order determined by their ROM IDs - not by how physically close they are to the microcontroller.
You can talk to 1-Wire devices two ways: bit-bang the protocol yourself with a 3rd-party library, or use a bridge chip that handles the protocol details in hardware and exposes the bus over I2C instead - which many microcontrollers already support natively, or at least have better-supported libraries for.
I2C to 1-Wire Bridge, comes in two flavors: the single-channel DS2482-100 and the 8-channel DS2482-800. Both are interesting for the same reason - no bit-banging and no 3rd-party libraries, since the 1-Wire timing is handled by the chip and driven over a standard I2C bus.
The most popular 1-Wire sensor is probably the DS18B20 (DS1820, DS18S20) family. The DS18B20 is the successor of the DS1820 and DS18S20 and should be used for all new projects. They are low cost, high precision digital temperature sensor. The documentation for the DS18B20 is here.

