DS18B20 temperature sensor pinout

DS18B20 temperature sensor (TO-92), DS18B20, 3.3 V logic, 7.2×11.5 mm, 3 pins

verified20.10.2026

View of the flat marked side, pins down: GND, DQ, VDD from left to right.

BuyDownload PNG
Chip
DS18B20
Logic
3.3 V
Power
VDD (pin 3) 3-5.5 V

Important

  • To ESP32: VDD to 3V3, GND to GND, DQ to any GPIO with output (GPIO34-39 are input only and do not work for 1-Wire), 4.7 kΩ from DQ to 3V3. OneWire and DallasTemperature libraries.
  • To Arduino: VDD to 5V, DQ to D2 or any digital pin, 4.7 kΩ from DQ to 5V.
  • GND and VDD swapped: the sensor heats up. Remove power at once and check the pin order.
  • Parasitic power (two wires): VDD and GND to ground, DQ through 4.7 kΩ. During a measurement the line needs a strong pull-up through a transistor; above 100 °C this mode is not recommended (Maxim).
  • At 12 bit a measurement takes up to 750 ms, at 9 bit it is 8 times faster.
  • 1-1.5 mA while measuring, up to 1 µA in standby.

Revisions and clones

  • Waterproof probe (Adafruit 381): red VDD, black or blue GND, yellow or white DQ. Unbranded probes may use other colors (low confidence): check the seller's description or buzz out the wires to the sensor.
  • SO-8 (DS18B20Z) and µSOP (DS18B20U): pins per the datasheet, SO-8 has VDD 3, DQ 4, GND 5.
  • DS18S20 and DS1820: same TO-92 pin order, different accuracy and commands.

All pins

LabelNumberFunctionsLimitsCheck
GNDpin 1Groundverified
DQpin 21-Wire: data, open drainverified
VDDpin 33.3 Vpower inputverified

Sources

Every pin is verified against the manufacturer's documents.

Size: TO-92 package 4.8×4.6 mm, leads spread to 2.54 mm pitch (the package pitch is 1.27 mm) (approximate).

FAQ

What supply voltage does the DS18B20 temperature sensor need?
VDD (pin 3): 3-5.5 V. 3.3 V logic.

You might also need

Similar boards