Hi guys,
I need your help, i would like to measure the temperature with several DS18B20 sensors which are connected to the different pins of ESP32 controller. I have wrote a code which worked properly with the old version of ESPhome, after the upgrade of ESPhome i can`t compily my code.
Here is a part of code which worked
True, but in practice it’s a bad idea. You have 6 (or more) sensors. If one of them dies you’ll have no clue which one is dead if bad one goes to short (been there…). Then you have to remove them one-by-one…
So, if there’s a chance (enough pins) it’s always better to connect them separately.
I`m using this ESP module to measuring the underfloor heating temperature in my house and if in the future i will should replace some of the temperature sensors I will just replace the sensors and I will not need for searching the addresses and reprograming the controller.
Each DS18B20 has a unique address and you assign a name in the yaml. You can also add a label => no problem at all
apreick → You don’t understand, or, should i say, you live in ideal world where nothing ever dies… But, perhaps you just had luck, and you never experienced dead sensor in parallel connection.
Yes, each of them has unique address, which is only good as long as all sensors work. When ONE OF THEM dies and causes dataline to go SHORT to GND then suddenly none of the sensors work, since they can’t communicate if dataline is shorted to GND, can they? So, address is then of no use to you since you must remove them one-by-one and see when they will start to work again. If you have, say, 6 or more sensors and they are all soldered together it can be quite P.I.T.A. finding the bad one.
Trust, me, i know, I’ve had such situation. And according to Murphy’s law seventh of 8 sensors was faulty, so I’ve had to re-solder, re-insulate… all of them again. And that’s why i always connect each of them to a separate pin from that moment on…
I agree with @Protoncek . If you have Esp full of unused pins, why to wire them parallel.
Ok, if sensors are located the way that parallel wiring is saving a “lot of wire”, I would go with that…