What Is the DS18B20? 1-Wire Digital Temperature Sensor and Uses
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.
| Pin | Function |
|---|---|
| 1 | GND |
| 2 | DQ (1-Wire data) |
| 3 | VDD (3.0–5.5 V) |
A 4.7 kΩ pull-up resistor is needed between DQ and VDD.
Highlights
| Parameter | Value |
|---|---|
| Interface | 1-Wire (single data line) |
| Range | −55 … +125 °C |
| Accuracy | ±0.5 °C (−10…+85 °C) |
| Resolution | 9–12 bit (configurable) |
| Supply | 3.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.