Brigadoon - An Occasional Corner on the Internet
Circuit for Ground Temperature Sensor
Designed by Mark Little
The digital temperature sensor is contained in a sealed metal tube. Because each sensor has a unique digital address, all three lines of the sensors (power, earth and data ) are connected in parallel with the corresponding lead of each sensor.
The DS18B20 sensors in parallel require a pull-up resistor on the data line. The standard voltage to the 8-pin DIN connector is +5V which means if the pull-up resistor is connected to the +5V rail, it may overload the Raspberry Pi GPIO input bit, causing damage to the Raspberry Pi.
There are a number of methods of overcoming this issue, but the easiest to implement is to connect the data lines to 3.3V via a pull-up resistor at the Raspberry Pi. Because the output of the temperature sensor is open-drain, the data line can be pulled up to +3.3V without any issues, even though the supply to the sensors is +5V from the Raspberry Pi board.
The only potential issue is whether the resistance of the wire between the sensors and the pull-up resistor will be sufficient to upset the detection of the high and low logic levels at the Raspberry Pi input pin. Assuming that the resistance of each wire is 0.5 ohms, the equivalent circuit is something like shown below.
INSERT DIAGRAM HERE.
The operating supply current for each sensor is approximately 1.5 mA. Assuming that there are four (4) sensors, that is 6 mA. The voltage drop across the Ground wire back to the Raspberry Pi is 0.5 ohms (assumed) x 6 mA, or 3mV, which will not affect whether the Raspberry Pi can detect high and low voltage levels. The voltage divider effect caused by the o.5 ohm resistance of the data wire and the 4.7 kOhms pull-up resistor are also negligible.