To pull up or not to pull for a DS18x20

Thread Starter

davewarrington

Joined Nov 6, 2018
3
Hi all, Hoping for some advanced but perhaps obvious answers here.

The background, I have a solar controller ( solarfocus Mk-2 ) which uses three DS18x20 sensor's wired directly to it's board to monitor specific temps, in the tubes, and the top and bottom of a tank of water.
Everything works great, however, it's all located in my garage, and the tank of water, is in the house, What i was hoping to do was monitor via a sonoff th16 each sensor and in turn report on the temp ( simples )

The sensor's are two wire devices, so parasite power, where the controller appears to be pulling up the 3.3/5 v's on to the Data line.. Again all is good here.

On my sonoff's I can wire up a 2.5 mm jack, and attach to the senor's mid wire, to say GPIO14, and GND, however in doing so, the Sonoff will also pull up the VDD to 3.3 /5v

I'm concerned that in doing so, i'll be sending power twice, and possibly fry something in the process.


My resolution if the above is going to be an issue, Use GPIO4 bridge with a 0K resister but dont connect the 3.3v with a 10K resister. this would hopefully allow the sonoff to read the data from the sensor, and allow only the MK-2 provide the pull up..

Original thread altho slightly in reverse is here
 

MrChips

Joined Oct 2, 2009
30,706
Dallas Semiconductor/Maxim DS18B20 uses 1-Wire interface. This requires a pullup resistor (4.7kΩ recommended) on the DQ line. Parasitic power is taken from the DQ line. You need only one pullup resistor.
 

Thread Starter

davewarrington

Joined Nov 6, 2018
3
Dallas Semiconductor/Maxim DS18B20 uses 1-Wire interface. This requires a pullup resistor (4.7kΩ recommended) on the DQ line. Parasitic power is taken from the DQ line. You need only one pullup resistor.

So in theory, If i we're to solder for Gpio4 on a Sonoff TH 16, could tap the line, and take the Temp readings, as the Solar controller is providing power.

Last stupid Q, what's an easy way to identify which cable is which, sure i can try them connected one way, failing that resolder and try again.. but .. i'd be interested to know if there's an easier way to ID the lines.
 
Top