External Temperature Sensor

A project log for Solar Powered WiFi Weather Station V3.0

ESP32 based Open Source Weather Station

Debasish DuttaDebasish Dutta 10/07/2021 at 14:360 Comments

If you need, you can connect an external temperature sensor like DS18B20 to monitor the ambient temperature. DS18B20 is One Wire interface Temperature sensor manufactured by Dallas Semiconductor Corp. It requires only one digital pin for two-way communication with a microcontroller. I have hooked up this sensor with ESP32 GPIO pin4.

The DS18B20 comes usually in two form factors. One that comes in the TO-92 package looks exactly like an ordinary transistor and another one in a waterproof probe with an extension cable. I have used DS18B20 probe for measuring the temperature. It uses a one-wire protocol to communicate with the ESP32. It can be hooked up to the 3 pin screw terminal on the PCB.

To interface with the DS18B20 temperature sensor, you need to install the One Wire library and the Dallas Temperature library. You can read this articlefor more details on the DS18B20 sensor.