I'm running a wire of 12 ds18b20 sensors on a esp32. The wire (utp5 cable) is 1m to the first sensor, and then 15cm between every sesnor. Power via 3.3v pin of the esp32 (wroom32 dev board) a resister of 4.7k between positive and the data wire (connected to pin 32). I'm not using parasite mode.
If I run the software (esphome) while powering it via the usb port, it all works as intended, all the 12 sensors nicely report their temperature, no errors.
In "deployment" the ESP in operation is powered by a relays board (that takes 12v input from a beefy power source) and translates it to 5v (LM2596 rated for 2A). This 5v is directly connected to the 5v (and gnd) pins of the dev board, it powers up, and does all it's work as intended by controlling the relay board. And so does reading out the sensors. Except for the first in the chain and the last in the chain, these report: Scratch pad checksum invalid!
, consistently, without every managing to read the correct values.
I only have a simple multi-meter, so I've checked the voltages I could think of:
measurement | via usb | via relay board |
---|---|---|
5v on esp | 4.80v | 5.03v |
3.3v on esp | 3.35v | 3.35v |
3.3v on last sensor | 3.35v | 3.35v |
I'm truly confused, the voltage that the sensor get is the same, I see no drops, it looks clean, only noticeable differences is the 5v pin, that is a bit lower for the USB powered version, but I would expect the converter on the esp not to have a problem with that.
So, what could be happening here? What should I measure? To be clear, I've detached all the other output pins of the esp, to avoid the relay board operations influencing the tests.