The following 1-wire components are used by me:


For cabling and connectors I use with 4 wire RJ11 telephone cord. The same pin order as are using.
Pin 1 external 5V, pin 4 external ground,pin 2  data / power and 3 ground for data.

The DS18B20 comes in TO92, a transistor housing. The rest of the ICs are SMD.

The DS18B20 can also be used to measure the water temperature. Solder of the four-wire telephone wire pin 2 to the data pin (middle pin of the DS18B20) and ground at pin 1 and 3!. When the external power or ground pin 3 is not connected, the sensor is not stable. Insulate with shrink tubing legs and do a full shrink sleeve over everything. The sensor can now be cast in resin or can be used in a watertight tube.

Be careful with moisture, the RJ11 connectors or DS18B20 be affected by oxidation

The sensors are encapsulated in epoxy resin. On the right for water temperature, with the U-shaped tube, the sensor and wire does not touch the water.