Skip to main content
PartAndStock
Blog

What Is the DS18B20? 1-Wire Digital Temperature Sensor and Uses

October 13, 2026 5 min read
Quick answer

The DS18B20 is a digital temperature sensor that communicates over a single wire (1-Wire). Its unique 64-bit address lets dozens of sensors share one data line; it measures −55…+125 °C (±0.5 °C). Being digital it needs no ADC; the DQ line needs a 4.7 kΩ pull-up. The waterproof probe version is common.

The DS18B20 is a digital temperature sensor that communicates over a single wire (1-Wire). Because each sensor has a unique 64-bit address, dozens of sensors can share one data line. The waterproof probe version is very common. For the concept, see what is a temperature sensor.

What is the DS18B20 used for?

Ambient/liquid temperature measurement, multi-point temperature monitoring (aquarium, boiler, greenhouse), data logging. Being a digital output it needs no ADC; it connects straight to an MCU digital pin.

DS18B20 pinout (TO-92)

With the flat face toward you, leads down, left to right: GND – DQ (data) – VDD.

PinFunction
1GND
2DQ (1-Wire data)
3VDD (3.0–5.5 V)

A 4.7 kΩ pull-up resistor is needed between DQ and VDD.

Highlights

ParameterValue
Interface1-Wire (single data line)
Range−55 … +125 °C
Accuracy±0.5 °C (−10…+85 °C)
Resolution9–12 bit (configurable)
Supply3.0–5.5 V (parasite-power option)

Limitations

  • Conversion takes ~750 ms at 12-bit (lower the resolution for faster sampling).
  • A pull-up resistor is required; on long lines wiring/noise matters.

Equivalents and alternatives

  • DS18S20: a close relative.
  • LM35 / TMP36: analog temperature sensors.
  • DHT22: temperature + humidity together.

Find it in our catalog

Use the DS18B20 search.

Frequently Asked Questions

What is the DS18B20?+
The DS18B20 is a digital temperature sensor that communicates over a single wire (1-Wire). Thanks to its unique 64-bit address, many sensors can share one line; the waterproof probe version is common.
What is the DS18B20 pinout?+
TO-92, flat face toward you, left to right: GND – DQ (data) – VDD. A 4.7 kΩ pull-up resistor is needed between DQ and VDD.
What temperature range does the DS18B20 measure?+
It measures −55 … +125 °C; over the −10…+85 °C range its accuracy is ±0.5 °C. Resolution is configurable between 9 and 12 bit.
Why does the DS18B20 need a pull-up?+
The 1-Wire line is open-drain; without a 4.7 kΩ pull-up between DQ and VDD the line cannot be pulled to the 'high' level and communication fails.
What is an equivalent of the DS18B20?+
Its close relative the DS18S20; the analog alternatives LM35/TMP36; the DHT22 for temperature+humidity together.