DS1820 Temperature Sensor

The DS1820 and DS1820B are 1-wire equipped temperature sensors. There are two common forms for the Sensor. One is a single probe with three wires, the other comes in a transistor-like form.

You can enable the 1-wire interface by using the sudo rasbi-config utility and enabling it from interfacing options.

Connecting the sensor is easy, as 1-wire will function through any GPIO pin. Note that you will need to use a 4.7kΩ resistor connected between data and Positive voltage. Further, make sure you are delivering 5v to the device or it may not function properly.

Here is the wiring diagram for the Probe type device:


And this is for the transistor type:


Note that the pins here are oriented with the FLAT side of the transistor facing you.