To be fair, there were some OneWire issues some time ago.
I am using DS18B20 sensors for some of my projects for the last years and the issue mainly was that 'some' transactions went 'bad' as in the checksum was not valid. These transactions ( I had a rate of about 1 in 50 transactions going bad, depending on the particular code ) could be filtered from the stream quite easy.
I did not have any catastrophic ( eg. have to reboot, like the op ) failures, just the occasional weird value with a bad checksum.
These issues were solved initially by stickbreaker in
his OneWire repo and are now incorporated in the Arduino OneWire library.
I DID have catastrophic failures during the hardware R&D phase using parasitic power. Using 5 or 6 sensors on a pin would be very unstable.
12 sensors feeding from a ESP32 pin is way too much.
From the
DS18B20 datasheet:
...However, when the DS18B20-PAR is performing temperature conversions or copying data from the
scratchpad memory to EEPROM, the operating current can be as high as 1.5 mA.
Assuming this code:
Code: Select all
ds.reset();
ds.write( 0xCC, 1); /* Skip ROM - All sensors */
ds.write( 0x44, 1); /* start conversion, with parasite power on at the end */
All sensors will start start to draw current at the same time from the ESP32 pin.
12 times 1.5 is 18mA which is way too much...
12mA is the maximum current you can pull from a single ESP32 pin, but I would like to stay significantly below that.