ESP32 with multiple DS18B20 temperature sensors

This guide shows how to read temperature from multiple DS18B20 temperature sensors with the ESP32 using Arduino IDE. We’ll show you how to wire the sensors on the same data bus to the ESP32, install the needed libraries, and a sketch example you can use in your own projects. This tutorial is also compatible with the ESP8266 and the Arduino boards.

ESP32 with multiple DS18B20 temperature sensors

We have a getting started guide for the DS18B20 temperature sensor that you may find useful: Guide for DS18B20 Temperature Sensor with Arduino.

Introducing the DS18B20 Temperature Sensor

The DS18B20 temperature sensor is a 1-wire digital temperature sensor. Each sensor has a unique 64-bit serial number, which means you can use many sensors on the same data bus (this means many sensors connected to the same GPIO). This is specially useful for data logging and temperature control projects. The DS18B20 is a great sensor because it is cheap, accurate and very easy to use.

The following figure shows the DS18B20 temperature.

Note: there’s also a waterproof version of the DS18B20 temperature sensor.

Here’s the main specifications of the DS18B20 temperature sensor:

  • Comunicates over 1-wire bus communication
  • Operating range temperature: -55ºC to 125ºC
  • Accuracy +/-0.5 ºC (between the range -10ºC to 85ºC)

From left to right: the first pin is GND, the second is data, and the rightmost pin is VCC.

Where to Buy the DS18B20 Temperature Sensor?

Check the links below to compare the DS18B20 temperature sensor price on different stores:

Wiring Multiple DS18B20 Sensors

Here’s a list of the parts you need to follow this example:

You can use the preceding links or go directly to to find all the parts for your projects at the best price!

Read more: ESP32 with multiple DS18B20 temperature sensors

Leave a Comment

= 4 + 2

(Spamcheck Enabled)

Read previous post:
Smart Tank – Arduino Powered Aquarium

It can be a daunting experience buying, setting up and maintaining (or even thinking about) a fish tank and if...

Scroll to top