I need some advice please, I have a current system setup using multiple DS18B20s current about 20 but I’m increasing this to 45 shortly, a bit of an explanation. The 20 i have installed I’m identifying via unique ID but I don’t want to redo all this to add the extra ones so am looking for a better solution.
I have 15 aquariums and each will have 3 sensors I then average this reading and turn heaters on or off depending upon the settings in my node red web interface and all works well (except the cheap relay boards I’m using are failing so I’m redoing it all with solid state relays).
I have re written my code to setup a one wire sensor on each port like so…
#define ONE_WIRE_BUS_T1 22 OneWire ONE_WIRE_T1(ONE_WIRE_BUS_T1); DallasTemperature SENSORS_T1(&ONE_WIRE_T1); #define ONE_WIRE_BUS_T2 23 OneWire ONE_WIRE_T2(ONE_WIRE_BUS_T2); DallasTemperature SENSORS_T2(&ONE_WIRE_T2);
My first question is should I just be using one instance of DallasTemperature Like so.
DallasTemperature SENSORS(&ONE_WIRE_T1); DallasTemperature SENSORS(&ONE_WIRE_T2);
Should I have all the positive and negative common with the data cable in each pin, or should i have the data common to pin 4, the negative common and the positive in each pin? then I could turn each input on and off as needed? I’ve seen lots of options from existing posts where other people have had these issues.
Many thanks in advance and hope this made sense.