Skip to content

Connecting DS18B20 temperature sensor

Olli edited this page Aug 6, 2022 · 3 revisions

Connecting DS18B20 temperature sensor

You can connect one or more (3 sensors in the default configuration) DS18B20 temperature sensors to Arska. DS18B20 uses 1-wire data bus which requires a minimum of one wire for data and a second wire for the ground but using a third wire for voltage is recommended. Connect 4.7 kΩ pull-up resistor between the data and 3.3V pin close to the microcontroller.

Each sensor is identified by a unique id. After connecting or disconnecting a sensor use "Scan sensors" function on the admin page.

ESP32                           sensor(s)
GPIO 27 ----------------          --------          --- ... -----
(data)          |
             4.7k ohm pull-up
                |
 3V3    ----------------  DS18B20 --------  DS18B20 --- ... -----

 GND    ----------------          --------          --- ... -----

Sensors should be bound to the warmest part of the pipeline (outside), so that it get as hot as possible (may silicon paste and insulation outside could help). Anyway, keep in mind that sensor values will be lower than real water temperature. See mounting example https://www.openheating.org/doc/faschingbauer/thermometers.html

This article will be updated in the future....

Note: There are a lot of fake or counterfeit DS18b20 sensors on the market. They are not as reliable as original sensors.