The maximum cable length for the DS18B20 is approximately 100 meters (328 feet) for a single device, but this can be extended to 300 meters (984 feet) or more by using repeaters or multiple masters.
Yes, you can use multiple DS18B20 devices on the same bus, but each device must have a unique 64-bit ROM code. The maximum number of devices on a single bus is limited by the bus capacitance and the master's ability to drive the bus.
In parasite power mode, the DS18B20 derives its power from the data line. To handle this mode, ensure that the data line is pulled high when not transmitting data, and use a pull-up resistor to maintain the voltage level. Also, avoid using long cables or high-capacitance loads that can drain the power from the data line.
The DS18B20 has an accuracy of ±0.5°C from -10°C to +85°C, and ±1°C from -40°C to +125°C. However, this accuracy can be affected by factors such as self-heating, thermal gradients, and noise on the bus.
To prevent bus contention, use a unique ROM code for each device, and ensure that each device is properly addressed and configured. You can also use a bus arbiter or a multiplexer to manage multiple devices on the same bus.